mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-27 12:53:49 -05:00
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:
@@ -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)))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user