mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-28 16:15:57 -05:00
[player/spotify] Only pass spotify-path to spotify_playback_setup
This commit is contained in:
parent
1b6283752e
commit
2db3318ce7
@ -684,7 +684,7 @@ stream_setup(struct player_source *ps, struct media_file_info *mfi)
|
|||||||
|
|
||||||
case DATA_KIND_SPOTIFY:
|
case DATA_KIND_SPOTIFY:
|
||||||
#ifdef HAVE_SPOTIFY_H
|
#ifdef HAVE_SPOTIFY_H
|
||||||
ret = spotify_playback_setup(mfi);
|
ret = spotify_playback_setup(mfi->path);
|
||||||
#else
|
#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",
|
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);
|
ps->data_kind, mfi->title, mfi->path);
|
||||||
|
@ -1643,16 +1643,16 @@ notify_cb(int fd, short what, void *arg)
|
|||||||
|
|
||||||
/* Thread: player */
|
/* Thread: player */
|
||||||
int
|
int
|
||||||
spotify_playback_setup(struct media_file_info *mfi)
|
spotify_playback_setup(const char *path)
|
||||||
{
|
{
|
||||||
sp_link *link;
|
sp_link *link;
|
||||||
|
|
||||||
DPRINTF(E_DBG, L_SPOTIFY, "Playback setup request\n");
|
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)
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,12 +2,11 @@
|
|||||||
#ifndef __SPOTIFY_H__
|
#ifndef __SPOTIFY_H__
|
||||||
#define __SPOTIFY_H__
|
#define __SPOTIFY_H__
|
||||||
|
|
||||||
#include "db.h"
|
|
||||||
#include <event2/event.h>
|
#include <event2/event.h>
|
||||||
#include <event2/buffer.h>
|
#include <event2/buffer.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
spotify_playback_setup(struct media_file_info *mfi);
|
spotify_playback_setup(const char *path);
|
||||||
|
|
||||||
int
|
int
|
||||||
spotify_playback_play();
|
spotify_playback_play();
|
||||||
|
Loading…
Reference in New Issue
Block a user