Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/azatoth/minidlna.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Maggard <jmaggard@users.sourceforge.net>2011-02-15 03:37:42 +0300
committerJustin Maggard <jmaggard@users.sourceforge.net>2011-02-15 03:37:42 +0300
commitaf25804006a4aceaeed3d2871e6aa967a4449544 (patch)
tree333ea779be46510f27104d2913532ca8b22aa9b8
parent84df8c77b2f8d624342718d0f36959620bedfcd2 (diff)
* Use containter definitions instead of hard-coding them.
-rw-r--r--playlist.c2
-rw-r--r--scanner.c26
2 files changed, 14 insertions, 14 deletions
diff --git a/playlist.c b/playlist.c
index ef7961e..fadd4e3 100644
--- a/playlist.c
+++ b/playlist.c
@@ -169,7 +169,7 @@ retry:
" (OBJECT_ID, PARENT_ID, CLASS, DETAIL_ID, NAME, REF_ID) "
"SELECT"
" '%s$%llX$%d', '%s$%llX', CLASS, DETAIL_ID, NAME, OBJECT_ID from OBJECTS"
- " where DETAIL_ID = %lld and OBJECT_ID glob '64$*'",
+ " where DETAIL_ID = %lld and OBJECT_ID glob '" BROWSEDIR_ID "$*'",
MUSIC_PLIST_ID, plID, plist.track,
MUSIC_PLIST_ID, plID,
detailID);
diff --git a/scanner.c b/scanner.c
index 225055a..b4e76f8 100644
--- a/scanner.c
+++ b/scanner.c
@@ -228,7 +228,7 @@ insert_containers(const char * name, const char *path, const char * refID, const
}
else if( strstr(class, "audioItem") )
{
- asprintf(&sql, "SELECT ALBUM, CREATOR, GENRE, ALBUM_ART from DETAILS where ID = %lu", detailID);
+ asprintf(&sql, "SELECT ALBUM, ARTIST, GENRE, ALBUM_ART from DETAILS where ID = %lu", detailID);
ret = sql_get_table(db, sql, &result, &row, &cols);
free(sql);
if( ret != SQLITE_OK )
@@ -543,22 +543,22 @@ CreateDatabase(void)
int ret, i;
const char * containers[] = { "0","-1", "root",
MUSIC_ID, "0", _("Music"),
- MUSIC_ALL_ID, "1", _("All Music"),
- MUSIC_GENRE_ID, "1", _("Genre"),
- MUSIC_ARTIST_ID, "1", _("Artist"),
- MUSIC_ALBUM_ID, "1", _("Album"),
- MUSIC_DIR_ID, "1", _("Folders"),
- MUSIC_PLIST_ID, "1", _("Playlists"),
+ MUSIC_ALL_ID, MUSIC_ID, _("All Music"),
+ MUSIC_GENRE_ID, MUSIC_ID, _("Genre"),
+ MUSIC_ARTIST_ID, MUSIC_ID, _("Artist"),
+ MUSIC_ALBUM_ID, MUSIC_ID, _("Album"),
+ MUSIC_DIR_ID, MUSIC_ID, _("Folders"),
+ MUSIC_PLIST_ID, MUSIC_ID, _("Playlists"),
VIDEO_ID, "0", _("Video"),
- VIDEO_ALL_ID, "2", _("All Video"),
- VIDEO_DIR_ID, "2", _("Folders"),
+ VIDEO_ALL_ID, VIDEO_ID, _("All Video"),
+ VIDEO_DIR_ID, VIDEO_ID, _("Folders"),
IMAGE_ID, "0", _("Pictures"),
- IMAGE_ALL_ID, "3", _("All Pictures"),
- IMAGE_DATE_ID, "3", _("Date Taken"),
- IMAGE_CAMERA_ID, "3", _("Camera"),
- IMAGE_DIR_ID, "3", _("Folders"),
+ IMAGE_ALL_ID, IMAGE_ID, _("All Pictures"),
+ IMAGE_DATE_ID, IMAGE_ID, _("Date Taken"),
+ IMAGE_CAMERA_ID, IMAGE_ID, _("Camera"),
+ IMAGE_DIR_ID, IMAGE_ID, _("Folders"),
BROWSEDIR_ID, "0", _("Browse Folders"),
0 };