Julien BLACHE
762d80e0bb
Add Remote pairing info storage facility
...
This brings schema_version to 6.
2010-01-30 17:30:22 +01:00
Julien BLACHE
21098d4c89
Fix query and path for playlist #1
...
The query was erroneously put into the path column; also change the query
for 1 = 1 instead of disabled = 0 which is redundant.
2010-01-27 18:29:59 +01:00
Julien BLACHE
672e4697ae
Handle database schema upgrade from v4 to v5
...
Force a library rescan to fixup media_kind for regular videos.
2010-01-24 11:16:31 +01:00
Ace Jones
12e0c9268d
Unspecified videos are "movies", media_kind=2
...
media_kind=2 (Movies) indicates a regular video, that is, a video that
isn't a TV Show (media_kind=64).
Also fix up the system playlist for Movies, and that brings us to DB
schema_version 5.
2010-01-24 11:11:08 +01:00
Julien BLACHE
67b3a8c2da
Handle database schema upgrade from v3 to v4
2010-01-21 17:54:50 +01:00
Ace Jones
3fef4334bb
Add support for smart playlists and some default ones
...
Add system playlists for Music, Movies, TV Shows, equivalent to iTunes.
2010-01-21 17:52:51 +01:00
Julien BLACHE
fefdb23409
Simplify DB init routine
2010-01-21 17:51:44 +01:00
Julien BLACHE
944bf3f132
Check database version first, if that fails, try DB init
...
Doing it the other way around is a guaranteed way to run into issues when
a schema upgrade is needed.
2010-01-21 17:51:00 +01:00
Julien BLACHE
bf2c2b68c0
Revert "Remove default playlist & special case"
...
This reverts commit af95cee79b
.
The default playlist is actually used by iTunes, so revert its removal. I
misremembered it being there for RSP.
2010-01-14 17:39:56 +01:00
Julien BLACHE
af95cee79b
Remove default playlist & special case
...
The default playlist (called "Library") doesn't actually have a purpose; I
though it was needed for RSP (SoundBridge) but it doesn't look like it makes
any difference with or without this playlist.
2010-01-13 19:56:15 +01:00
Ace Jones
5cfbe75bae
Add database code for groups queries
2010-01-10 14:43:22 +01:00
Julien BLACHE
974a74a833
Update copyright notices for 2010
2010-01-05 19:34:00 +01:00
Julien BLACHE
60a06dfb0a
Change album and album_artist column definitions to be NOT NULL
...
Unfortunately SQLite doesn't support adding constraints with ALTER TABLE,
so this constraint cannot be added upon upgrade.
2010-01-05 19:23:52 +01:00
Julien BLACHE
26d603aa61
Introduce generic database upgrade function
2010-01-05 19:18:30 +01:00
Julien BLACHE
d273c72a4b
Add database upgrade to populate album_artist for every file
...
Bump schema_version to 3, even though this isn't exactly a schema upgrade.
2010-01-05 18:25:23 +01:00
Ace Jones
f2965f8ac6
Make daap_songalbumid available as a function inside SQLite
2010-01-05 18:25:18 +01:00
Ace Jones
995c212dc7
Support query filter in playlist list query
...
iTunes uses query filters in DAAP containers requests, so support that here.
2009-12-30 18:53:55 +01:00
Julien BLACHE
371725b0da
Fix segfault in db_file_update
...
Fix wrong type (%Q instead of %d) for tv_episode_sort and tv_season_num in
the SQL query for db_file_update().
2009-12-27 08:19:16 +01:00
Julien BLACHE
a52dcd264c
Force a full rescan after DB migration
2009-12-27 08:17:25 +01:00
Julien BLACHE
66716841ea
Handle database schema upgrade from v1 to v2
2009-12-26 09:20:51 +01:00
Julien BLACHE
42a7715c69
Reindent data tables, no code changes
2009-12-26 08:44:55 +01:00
Ace Jones
a0ec19ada6
Add TV metadata to the database
...
With this, we're bumping SCHEMA_VERSION to 2.
2009-12-26 08:39:39 +01:00
Ace Jones
a0b015f1e4
Accomodate TV meta-data in internal structures
...
Add new fields for TV-related metadata to struct media_file_info and
struct db_media_file_info.
2009-12-26 08:28:28 +01:00
Julien BLACHE
a6cbb2a8ec
Introduce db_file_id_byfilebase and db_file_id_byfile
...
File id lookup by basepath + filename and filename only.
2009-11-28 10:55:43 +01:00
Julien BLACHE
66cd10dc52
Introduce db_file_id_byurl and share code with db_file_id_bypath
2009-11-28 10:55:42 +01:00
Julien BLACHE
ecb2991881
Add db_pl_fetch_bytitlepath
2009-11-28 10:55:42 +01:00
Julien BLACHE
04ce09e5be
Rename db_pl_add_item -> db_pl_add_item_bypath
...
For consistency with db_pl_add_item_byid & similar database functions.
2009-11-28 10:55:42 +01:00
Julien BLACHE
a45f46f3eb
Introduce db_pl_add_item_byid()
2009-11-28 10:55:42 +01:00
Julien BLACHE
1a397ca79b
Check that db_pl_fetch_byquery only gets 1 query result
2009-11-28 10:55:42 +01:00
Julien BLACHE
6a1c01fa15
Allow playlists from different files to have the same title
2009-11-28 10:55:42 +01:00
Julien BLACHE
1bd3b3a076
Fix paths and rename the project
2009-06-12 13:00:34 +02:00
Julien BLACHE
e1c0b6d4b7
Move *_offsetof() macro definitions to db.h
2009-06-11 23:17:17 +02:00
Julien BLACHE
1f92052409
Rename the songs table
2009-06-11 23:03:53 +02:00
Julien BLACHE
3cadbdb1e3
Remove unused db_file_fetch_bypath()
2009-06-11 20:46:11 +02:00
Julien BLACHE
0ad20e5220
Rework process_media_file() and related DB support routines
...
Avoid pulling all the file info from the DB in process_media_file() as
anything besides the file id and timestamp is not used at all.
2009-06-11 20:44:22 +02:00
Julien BLACHE
0a8c171187
Store playlist items paths instead of resolving to file ids
...
This allows for more dynamic playlists now that files can move
around while we're running.
2009-06-11 20:27:31 +02:00
Julien BLACHE
3b7ff30c1b
Remove useless force_update field in media file info
2009-06-11 19:15:22 +02:00
Julien BLACHE
538d81b402
Always rescan and update playlists
...
This is needed to keep relative playlist items up to date in the
database when the playlist file moves around.
2009-06-11 19:04:21 +02:00
Julien BLACHE
c589d92b14
Use db_get_count() wherever applicable; simplify db_{pl,files}_get_count() prototypes
2009-06-11 18:41:50 +02:00
Julien BLACHE
2d1c35b855
Count playlist items on the fly
2009-06-11 18:28:01 +02:00
Julien BLACHE
30204cbb76
Remove unused toplevel watch attribute
2009-06-11 17:36:13 +02:00
Julien BLACHE
c81b33bd02
Bring db_watch_delete_bywd() prototype back in line with other db_watch_delete_by*()
2009-06-11 17:35:32 +02:00
Julien BLACHE
07e22d8870
Add watch query/enumeration
2009-06-11 16:44:49 +02:00
Julien BLACHE
129ca8dfff
Add watch deletion by path/match/cookie routines
2009-06-11 16:15:35 +02:00
Julien BLACHE
267ab7cb1a
Rename db_query_get_count() to db_get_count()
...
Make that a generic helper, given it's used outside queries.
2009-06-11 15:45:49 +02:00
Julien BLACHE
cef1636415
Add watch-moving routines
2009-06-11 15:42:51 +02:00
Julien BLACHE
87aa24454d
Add watch-marking routines
2009-06-11 15:24:10 +02:00
Julien BLACHE
56127b3ecc
Add file and playlist disable-by-match routines
2009-06-11 15:09:10 +02:00
Julien BLACHE
d63da9f08f
Add file and playlist enable/disable routines
2009-06-10 22:28:54 +02:00
Julien BLACHE
9ff8913dd6
Add file and playlist deletion (by path) routines
2009-06-10 22:28:49 +02:00