Commit Graph

33 Commits

Author SHA1 Message Date
whatdoineed2do/Ray
9a0c7e9ad2 [db] v21.4 - add playlist..artwork_url column 2020-04-30 20:28:36 +02:00
ejurgensen
00de0a3f76 [db] Fixup commit #1edfadc 2020-02-23 20:25:22 +01:00
whatdoineed2do/Ray
78194807db [db] add S_RELEASEDATE and idx 2020-02-23 20:25:22 +01:00
ejurgensen
40c7522baa [db] Make Apple Music on Catalina work - part 2 (fix for issue #834)
Extends the playlist table with media_kind to handle playlist queries like
this from Apple Music:

/databases/71/containers?session-id=12345678&revision-number=4&delta=0&query=('dmap.itemname:Library%20name','com.apple.itunes.extended-media-kind:1','com.apple.itunes.extended-media-kind:32','com.apple.itunes.extended-media-kind:128','com.apple.itunes.extended-media-kind:65537')&meta=dmap.itemid,dmap.itemname,dmap.persistentid,dmap.parentcontainerid,com.apple.itunes.is-podcast-playlist,com.apple.itunes.special-playlist,com.apple.itunes.smart-playlist,dmap.haschildcontainers,com.apple.itunes.saved-genius,dmap.objectextradata
2019-11-01 15:44:53 -07:00
whatdoineed2do/Ray
b126a2fbc0 [db] add 'channels' to file/queue tbl 2019-06-12 16:52:02 +01:00
whatdoineed2do/Ray
c796db251d [db] schema v20.01 support codec type/bitrate/samplerate in queue tbl 2019-06-12 16:50:52 +01:00
ejurgensen
e1993bc7b6 [db] Comeback for the files-table insert trigger 2019-05-17 23:03:05 +02:00
ejurgensen
b3bfb0a5f6 [db] Move calculation of artist/album id's from sqlite to code
The purpose of this is to support library backends making their own
calculation of these id's, which is relevant if they have more information
available than just album_artist and album.

This also removes a bunch of sqlite extension code plus some triggers, which
in itself is probably an improvement.
2019-05-17 23:03:05 +02:00
whatdoineed2do/Ray
7e02eb510d [db] add songartistid to queue tbl 2019-02-12 09:21:39 +00:00
chme
010e8b2959 [db] Fix missing creation of triggers for persistent ids in db init 2019-01-01 09:38:02 +01:00
ejurgensen
19c39bf133 [scan] Always use compilation_artist for tracks in compilation dir
Reason is that tracks in compilation dir are not to be trusted when it comes
to album_artist.

See afee99d5db (commitcomment-31807556).
2018-12-31 15:55:49 +01:00
ejurgensen
a4c254e6e7 [db] Recreate v20 files table, so that new constraints take effect if upgrading
The constraints on songalbumid and songartistid where changed with v20, so we
need to make sure they take effect when upgrading.

This commit tries to do the table recreation like sqlite recommends and without
manually crafted copy queries that are probably prone to errors.

Since we are recreating anyway, this commit also reorders the columns slightly.

It also includes auto-drop/recreation of triggers (should really have been its
own commit) during upgrade, like is already done with indices.
2018-12-31 15:55:49 +01:00
ejurgensen
d3121f4ec7 [db] Use prepared statements for file insert, update and ping
Get rid of the SQL query strings, since they are prone to errors and are
probably also slower that using prepared statements.
2018-12-31 15:55:49 +01:00
chme
42cbd721fd [db] Minor version upgrade: new column "path" in directories table 2018-12-18 08:28:19 +01:00
whatdoineed2do
488f52b04f [db] schema v19.11 support composer in queue tbl 2018-11-30 17:22:21 +01:00
ejurgensen
fde0a28142 Support for skip_count and time_skipped file metadata 2018-08-18 22:56:27 +02:00
chme
6ceede44f4 [db] Use default -1 for playlists.query_limit column 2018-04-15 22:11:40 +02:00
chme
f167e975c2 Unify naming of "order by" clause in structs/table 2018-04-15 22:11:40 +02:00
chme
6bdcda1524 [db/filescanner] Upgrade database to v19.08 and support limit/order by
in smart playlist files
2018-04-15 22:11:40 +02:00
ejurgensen
ea6fd1476a [db] Improve speed of browse queries (issue #478)
Before, we returned either unordered (for RSP, meaning client had to
sort) or ordered by a client selected sort_clause[]. The latter are
multi-purpose and therefore not optimised for browse queries.

To speed up, we predefine the entire set of browse queries, including
order, with matching indices. The predefined queries are used except
if the client explicitly requests a non-default order or query.

As a special bonus, the commit also allows queries with I_SUB that
have an offset but no limit.
2018-03-02 21:11:31 +01:00
chme
91573752d9 [db] Update v19.05 to v19.06
- queue table: define id column as AUTOINCREMENT (requires drop+create)
- queue table: add column queue_version
- files table: update http-stream virtual paths (constructing the
virtual path for http-streams changed in pr #449, this migrates existing
databases to be consistent to the newly created paths)
2017-12-09 11:01:41 +01:00
ejurgensen
00b7b97382 [db] Make I_FNAME index case insensitive and search fname using COLLATE NOCASE
Also some cleaning up
2017-10-17 23:11:31 +02:00
ejurgensen
4d47307a02 [db/filescanner] Add index on fname, change playlist matching (wip) 2017-10-17 23:11:31 +02:00
ejurgensen
f63d103753 [raop] Add support for Apple TV device verification, required by tvOS 10.2 (fix for issue #377)
- also change how speakers are saved/retrieved from the db
- add generic authorization methods in outputs.c and player.c
- let filescanner read *.verification files (containing PIN)
- configure options to enable and disable, since libsodium is required
2017-06-19 21:52:01 +02:00
ejurgensen
0e9bca9e3d [db] Add column for auth key to speakers table (incl methods for saving/retrieving) 2017-06-18 01:29:40 +02:00
ejurgensen
9d8dbaffe1 [db] Fix typo (closes #347) 2017-02-01 18:56:34 +01:00
ejurgensen
e92152cadb [db] Upgrade db to 19.03: Add artwork_url column to queue table 2017-01-27 22:36:00 +01:00
chme
65ce902e3c [db_init] Set admint.value to VARCHAR(255)
Only a cosmetic change to avoid future confusion. sqlite3 ignores the
number of chars given to VARCHAR (see https://sqlite.org/faq.html#q9 ),
a db upgrade is therefor not necessary.
2017-01-13 18:56:37 +01:00
chme
e29539fa68 [db] add primary key to admin table 2016-12-10 06:15:43 +01:00
chme
b5bf1928ff [db] Rename "plversion" to "queue_version", add missing init query for
queue_version
2016-12-03 11:12:19 +01:00
chme
0beb68e1f1 [db] Upgrade db to v20.00
- New table 'queue' for persisting the queue/current playlist
- New entry 'plversion' in admin table for queue version
2016-12-03 10:58:26 +01:00
chme
f326cae142 [db] Remove duplication of db schema version 2016-11-04 14:31:15 +01:00
chme
f7aa3c225b [db] Move initialization of new db into its own file (db_init.c) 2016-11-04 14:31:15 +01:00