Add support for Spotify (squashed commit), and:

- Try to not return items which a client can't play
    - Remove inotify subscription to IN_MODIFY and IN_CREATE
    - Fix crash on unknown codec type in transcode.c
    - Probably added some new bugs...
This commit is contained in:
ejurgensen
2014-03-11 23:20:29 +01:00
parent 190f91114e
commit 7ed6cc98c3
24 changed files with 2203 additions and 171 deletions

View File

@@ -739,6 +739,10 @@ artwork_get_embedded_image(char *filename, int max_w, int max_h, int format, str
if (strncmp(filename, "http://", strlen("http://")) == 0)
return -1;
/* If Spotify item don't look for artwork */
if (strncmp(filename, "spotify:", strlen("spotify:")) == 0)
return -1;
DPRINTF(E_SPAM, L_ART, "Trying embedded artwork in %s\n", filename);
src_ctx = NULL;
@@ -854,6 +858,10 @@ artwork_get_own_image(char *path, int max_w, int max_h, int format, struct evbuf
if (strncmp(path, "http://", strlen("http://")) == 0)
return -1;
/* If Spotify item don't look for artwork */
if (strncmp(path, "spotify:", strlen("spotify:")) == 0)
return -1;
ret = snprintf(artwork, sizeof(artwork), "%s", path);
if ((ret < 0) || (ret >= sizeof(artwork)))
{
@@ -911,6 +919,10 @@ artwork_get_dir_image(char *path, int isdir, int max_w, int max_h, int format, s
if (strncmp(path, "http://", strlen("http://")) == 0)
return -1;
/* If Spotify item don't look for artwork */
if (strncmp(path, "spotify:", strlen("spotify:")) == 0)
return -1;
ret = snprintf(artwork, sizeof(artwork), "%s", path);
if ((ret < 0) || (ret >= sizeof(artwork)))
{
@@ -981,6 +993,10 @@ artwork_get_parentdir_image(char *path, int isdir, int max_w, int max_h, int for
if (strncmp(path, "http://", strlen("http://")) == 0)
return -1;
/* If Spotify item don't look for artwork */
if (strncmp(path, "spotify:", strlen("spotify:")) == 0)
return -1;
ret = snprintf(artwork, sizeof(artwork), "%s", path);
if ((ret < 0) || (ret >= sizeof(artwork)))
{