Commit Graph

240 Commits

Author SHA1 Message Date
ejurgensen
5125e24cfe Let db_build_query_index_clause() always return an initialized idx, even on failure 2015-09-29 22:51:23 +02:00
chme
cf70c514b6 Fix memory leak if index clause is used 2015-09-29 22:43:32 +02:00
chme
a1e2f53ab1 Fix memory leak if index clause is used 2015-09-29 22:42:53 +02:00
ejurgensen
68912efa1f Enable resuming playback from saved position for certain media kinds (eg audiobooks) 2015-08-04 22:33:32 +02:00
chme
1ab318d725 [mpd] support serving artwork over http 2015-07-18 07:17:21 +02:00
ejurgensen
879c2ef350 Avoid cache regeneration triggering during db_query_run (in case the query is long running, like db_files_update_songalbumid might be) 2015-06-08 23:07:56 +02:00
ejurgensen
7d231b992b Fix typo 2015-06-04 22:17:49 +02:00
ejurgensen
cd14522915 Swap misplaced args in db.c 2015-06-04 22:10:30 +02:00
ejurgensen
271c5ff344 Change DB upgrade from v18->v19 to v18->v18.01 2015-06-04 21:58:01 +02:00
chme
7cd96690c0 Remove file extension for playlists from virtual_path during scan and
update db to v19 removing the file extensions from the stored playlists

An existing file extension in the virtual path leads to wrong entries in
MPDroid (and mpd does also not return the file extension).
2015-06-04 08:11:46 +02:00
ejurgensen
3655e26703 Code style 2015-06-02 23:10:04 +02:00
ejurgensen
64ef66f030 Merge pull request #162 from stephan-01010011/master
Fixed bug that caused icy header metadata to be not correctly encoded
2015-06-03 00:05:56 +03:00
ejurgensen
7a0dfef136 Add sub-sorting when sort=artists, because otherwise Tunesremote SE will not play the artist's tracks in proper order 2015-06-01 23:36:16 +02:00
stephan-01010011
32727bd296 Fixed bug that caused icy header metadata to be not correctly
encoded/converted. Characters above x7F were replaced by '?' character
although the rfc defines a ISO−8859−1 encoding for descriptive
field-content.

According to rfc2616 the field-content is defined as follows:
<the OCTETs making up the field-value and consisting of either *TEXT or
combinations of token, separators, and quoted-string>
The TEXT rule is only used for descriptive field contents and values
that are not intended to be interpreted by the message parser. Words of
*TEXT MAY contain characters from character sets other than ISO- 8859-1
only when encoded according to the rules of RFC 2047.

In the previous implementation the icy metadata was converted based on
fromcode "ascii".

Following incoming icy header field-values should be encoded as
"ISO−8859−1" before adding them to the metadata structure.

- misc.c unicode_fixup_string enhanced by an additional parameter to
define the fromcode
- misc.h unicode_fixup_string prototype updated
- filescanner.c function fixup_tags updated to stay compatible to the
previous implementation using fromcode "ascii"
- db.c function unicode_fixup_mfi updated to stay compatible to the
previous implementation using fromcode "ascii"
- http.c function metadata_header_get enhanced to encode the header
field-content as "ISO−8859−1" to comply with rfc2616
2015-05-31 14:05:31 +01:00
chme
2a04740ca2 [mpd] support "file" argument in list command 2015-05-30 05:56:52 +02:00
ejurgensen
4a50a7a326 [spotify] Improve Spotify loading efficiency and set time_added so smart playlists will work 2015-05-29 19:47:53 +02:00
ejurgensen
a1e417c571 Rename count_info to fix issue #157 2015-05-26 21:24:10 +02:00
ejurgensen
8dd1e0fde2 Fix problem introduced with commit 475d5db where genres and composers don't get sorted 2015-05-26 21:10:28 +02:00
chme
fefd91fabc [mpd] support "track" parameter in commands "list", "find", "search" 2015-05-09 07:35:15 +02:00
chme
1300b2f018 [mpd] support "disc" parameter in commands "list", "find", "search" 2015-05-09 07:35:15 +02:00
ejurgensen
f6f584bf84 Fix stupid oversight that can cause segfault
- how typical to discover this right after making a release
2015-05-05 20:51:59 +02:00
ejurgensen
0e1de8e0bb Add media_kind music videos and add forgotten return in db upgrade 2015-04-23 23:38:36 +02:00
chme
9f6afe0607 change pl_type for plain and special playlists and upgrade db to v18 2015-04-23 08:21:11 +02:00
chme
baa97b886d [smartpl] include smart playlists in filelist view and recreate the view
during db upgrade to v17
2015-04-23 08:21:11 +02:00
chme
4cac01ed88 [smartpl] Add support for smart playlists 2015-04-23 08:21:10 +02:00
chme
a174a1d18c [smartpl] refactoring: repurpose playlist type PL_SMART for user created
smart playlists and introduce new type PL_SPECIAL for special system
playlists
2015-04-23 08:21:10 +02:00
ejurgensen
7982bca6f0 Merge branch 'pl2'
Conflicts:
	src/db.c
2015-04-11 21:00:49 +02:00
chme
b7d5b1650e [mpd] add support for count command 2015-04-08 19:34:59 +02:00
ejurgensen
e49c941a00 Add a worker thread to support async tasks from the player thread
(and maybe others later)
2015-03-31 23:05:24 +02:00
ejurgensen
41f39ea5ca Sort playlists with ascending parent id, so that more nested playlists come after
the less nested ones (required by Retune)
2015-03-30 08:54:17 +02:00
ejurgensen
986b37ed29 Adds a playlist folder type, it is needed for sorting since some clients (eg Retune)
require that playlist folders are sent before their content. Playlist folders should,
however, be sent after the base playlists, so the numbering is changed. At the same
time makes the value of the smart playlist type a bit less hardcoded.
2015-03-30 01:03:15 +02:00
chme
516d46232b [mpd] db upgrade v16: remove unused data_kind column from files-query
and rename variable to "type" to match the pl-query
2015-03-20 13:44:29 +01:00
ejurgensen
e5a1495b49 Add DAAP logic for the Radio item 2015-03-16 23:33:42 +01:00
ejurgensen
8359a9018d Fixup parent playlist 2015-03-14 23:35:19 +01:00
ejurgensen
e68c6c4932 Change db_pl_add/db_pl_update so input is playlist struct
- so they work like db_file_add/update and can accept all the struct data (incl. parent_id)
2015-03-14 22:34:03 +01:00
ejurgensen
9fdb8a5247 Add DB and DAAP support for nested playlists 2015-03-14 22:00:57 +01:00
ejurgensen
6221e24f1b Support for live ICY metadata for streams (incl. artwork) 2015-03-14 21:42:53 +01:00
chme
f41e7014e4 [mpd] add support for commands 'listplaylists', 'listplaylist',
'listplaylistinfo', 'ping'; add support for additional tags
2015-03-10 22:15:33 +01:00
chme
9c979ef584 [mpd] fix issues with utf8 characters when selecting from filelist (lead
to an infinite loop in MPoD while importing the library and to missing
or wrong entries in ympd)
2015-03-07 10:05:09 +01:00
chme
1bbfcf61a5 Enclose DB upgrade in a single transaction (improves performance and in
case of an error does a rollback, keeping the db in a valid state)
2015-02-26 14:09:14 +01:00
chme
795926605d db: add missing field "virtual_path" in struct db_playlist_info (fixes
segfault when loading playlists)
2015-02-23 20:49:53 +01:00
chme
6f7d9f5b44 db: fix wrong number of elements for purge queries 2015-02-23 20:26:42 +01:00
chme
3eab952867 fixup: rename db_mpd_build_query to db_mpd_start_query, removed unused
function from db.h
2015-02-15 13:59:35 +01:00
chme
df5b0f779a Use view for filelist instead of separate table 2015-02-14 22:38:14 +01:00
chme
ad23c0ff30 Add missing free of virtual_path for playlists 2015-02-14 08:50:18 +01:00
chme
8401d5ad09 Removed unnecessary creation of index on db update 2015-02-14 08:50:18 +01:00
chme
830054bd71 Initial support for mpd protocol 2015-02-14 08:50:18 +01:00
ejurgensen
266d05f5eb Revert "Don't add duplicates (same fname, artist, album and title), issue #85"
This reverts commit 70365422b4.
2015-01-16 22:32:23 +01:00
ejurgensen
70365422b4 Don't add duplicates (same fname, artist, album and title), issue #85 2015-01-14 22:07:24 +01:00
ejurgensen
baa3ee63ca Adjust a few log messages 2015-01-14 20:46:03 +01:00