From 2db3318ce79a4650125fb8644f7fc1e8b939819a Mon Sep 17 00:00:00 2001 From: chme Date: Wed, 26 Oct 2016 19:37:41 +0200 Subject: [PATCH] [player/spotify] Only pass spotify-path to spotify_playback_setup --- src/player.c | 2 +- src/spotify.c | 6 +++--- src/spotify.h | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/player.c b/src/player.c index d6423b9e..ee9a7724 100644 --- a/src/player.c +++ b/src/player.c @@ -684,7 +684,7 @@ stream_setup(struct player_source *ps, struct media_file_info *mfi) case DATA_KIND_SPOTIFY: #ifdef HAVE_SPOTIFY_H - ret = spotify_playback_setup(mfi); + ret = spotify_playback_setup(mfi->path); #else DPRINTF(E_LOG, L_PLAYER, "Player source has data kind 'spotify' (%d), but forked-daapd is compiled without spotify support - cannot setup source '%s' (%s)\n", ps->data_kind, mfi->title, mfi->path); diff --git a/src/spotify.c b/src/spotify.c index a75be67d..41f6b1d6 100644 --- a/src/spotify.c +++ b/src/spotify.c @@ -1643,16 +1643,16 @@ notify_cb(int fd, short what, void *arg) /* Thread: player */ int -spotify_playback_setup(struct media_file_info *mfi) +spotify_playback_setup(const char *path) { sp_link *link; DPRINTF(E_DBG, L_SPOTIFY, "Playback setup request\n"); - link = fptr_sp_link_create_from_string(mfi->path); + link = fptr_sp_link_create_from_string(path); if (!link) { - DPRINTF(E_LOG, L_SPOTIFY, "Playback setup failed, invalid Spotify link: %s\n", mfi->path); + DPRINTF(E_LOG, L_SPOTIFY, "Playback setup failed, invalid Spotify link: %s\n", path); return -1; } diff --git a/src/spotify.h b/src/spotify.h index eb457a47..495b6577 100644 --- a/src/spotify.h +++ b/src/spotify.h @@ -2,12 +2,11 @@ #ifndef __SPOTIFY_H__ #define __SPOTIFY_H__ -#include "db.h" #include #include int -spotify_playback_setup(struct media_file_info *mfi); +spotify_playback_setup(const char *path); int spotify_playback_play();