Move som comments

This commit is contained in:
ejurgensen 2015-04-24 22:57:08 +02:00
parent fa4496c729
commit 072810c4aa
2 changed files with 9 additions and 8 deletions

View File

@ -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;

View File

@ -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");