diff --git a/src/db.h b/src/db.h index bf08c3ce..dc2a77b3 100644 --- a/src/db.h +++ b/src/db.h @@ -95,12 +95,13 @@ enum media_kind { }; enum data_kind { - DATA_KIND_FILE = 0, - DATA_KIND_URL = 1, - DATA_KIND_SPOTIFY = 2, - DATA_KIND_PIPE = 3, + DATA_KIND_FILE = 0, /* normal file */ + DATA_KIND_URL = 1, /* url/stream */ + DATA_KIND_SPOTIFY = 2, /* iTunes has no spotify data kind, but we use 2 */ + DATA_KIND_PIPE = 3, /* iTunes has no pipe data kind, but we use 3 */ }; +/* Note that fields marked as integers in the metadata map in filescanner_ffmpeg must be uint32_t here */ struct media_file_info { char *path; uint32_t index; diff --git a/src/filescanner.c b/src/filescanner.c index 2c3ea855..ab6f7200 100644 --- a/src/filescanner.c +++ b/src/filescanner.c @@ -691,12 +691,12 @@ filescanner_process_media(char *path, time_t mtime, off_t size, int type, struct if (type & F_SCAN_TYPE_FILE) { - mfi->data_kind = DATA_KIND_FILE; /* real file */ + mfi->data_kind = DATA_KIND_FILE; ret = scan_metadata_ffmpeg(path, mfi); } else if (type & F_SCAN_TYPE_URL) { - mfi->data_kind = DATA_KIND_URL; /* url/stream */ + mfi->data_kind = DATA_KIND_URL; ret = scan_metadata_ffmpeg(path, mfi); if (ret < 0) { @@ -709,12 +709,12 @@ filescanner_process_media(char *path, time_t mtime, off_t size, int type, struct } else if (type & F_SCAN_TYPE_SPOTIFY) { - mfi->data_kind = DATA_KIND_SPOTIFY; /* iTunes has no spotify data kind, but we use 2 */ + mfi->data_kind = DATA_KIND_SPOTIFY; ret = mfi->artist && mfi->album && mfi->title; } else if (type & F_SCAN_TYPE_PIPE) { - mfi->data_kind = DATA_KIND_PIPE; /* iTunes has no pipe data kind, but we use 3 */ + mfi->data_kind = DATA_KIND_PIPE; mfi->type = strdup("wav"); mfi->codectype = strdup("wav"); mfi->description = strdup("PCM16 pipe");