[db] Add function to get a human readable string for data and media kind

This commit is contained in:
chme
2018-02-24 11:28:42 +01:00
parent d59e62312a
commit 66bdb7c0a9
3 changed files with 74 additions and 1 deletions

View File

@@ -105,6 +105,7 @@ struct pairing_info {
char *guid;
};
/* Keep in sync with media_kind_labels[] */
enum media_kind {
MEDIA_KIND_MUSIC = 1,
MEDIA_KIND_MOVIE = 2,
@@ -114,6 +115,13 @@ enum media_kind {
MEDIA_KIND_TVSHOW = 64,
};
const char *
db_media_kind_label(enum media_kind media_kind);
enum media_kind
db_media_kind_enum(const char *label);
/* Keep in sync with data_kind_label[] */
enum data_kind {
DATA_KIND_FILE = 0, /* normal file */
DATA_KIND_HTTP = 1, /* network stream (radio) */
@@ -121,6 +129,9 @@ enum data_kind {
DATA_KIND_PIPE = 3, /* iTunes has no pipe data kind, but we use 3 */
};
const char *
db_data_kind_label(enum data_kind data_kind);
/* Note that fields marked as integers in the metadata map in filescanner_ffmpeg must be uint32_t here */
struct media_file_info {
char *path;