diff options
author | Max Kellermann <max@duempel.org> | 2014-01-08 19:22:20 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-08 19:49:21 +0100 |
commit | 89a78a5f3c4f648e9f20e83ac1d4769eff24c5b8 (patch) | |
tree | 3ead8c8c2d48c44d12808fdc4ec9d8d97d9f2ae4 /src/playlist | |
parent | bc23a6bb05705d5551117528dfcbfcfedfee4c90 (diff) | |
download | mpd-89a78a5f3c4f648e9f20e83ac1d4769eff24c5b8.tar.gz mpd-89a78a5f3c4f648e9f20e83ac1d4769eff24c5b8.tar.xz mpd-89a78a5f3c4f648e9f20e83ac1d4769eff24c5b8.zip |
DespotifyUtils: pass const ds_track reference
Diffstat (limited to 'src/playlist')
-rw-r--r-- | src/playlist/DespotifyPlaylistPlugin.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/playlist/DespotifyPlaylistPlugin.cxx b/src/playlist/DespotifyPlaylistPlugin.cxx index a1a865c08..f082778ab 100644 --- a/src/playlist/DespotifyPlaylistPlugin.cxx +++ b/src/playlist/DespotifyPlaylistPlugin.cxx @@ -34,7 +34,7 @@ extern "C" { #include <stdlib.h> static void -add_song(std::forward_list<SongPointer> &songs, struct ds_track *track) +add_song(std::forward_list<SongPointer> &songs, ds_track &track) { const char *dsp_scheme = despotify_playlist_plugin.schemes[0]; Song *song; @@ -45,10 +45,10 @@ add_song(std::forward_list<SongPointer> &songs, struct ds_track *track) snprintf(uri, sizeof(uri), "%s://", dsp_scheme); ds_uri = uri + strlen(dsp_scheme) + 3; - if (despotify_track_to_uri(track, ds_uri) != ds_uri) { + if (despotify_track_to_uri(&track, ds_uri) != ds_uri) { /* Should never really fail, but let's be sure */ FormatDebug(despotify_domain, - "Can't add track %s", track->title); + "Can't add track %s", track.title); return; } @@ -67,7 +67,7 @@ parse_track(struct despotify_session *session, if (track == nullptr) return false; - add_song(songs, track); + add_song(songs, *track); return true; } @@ -82,7 +82,7 @@ parse_playlist(struct despotify_session *session, for (ds_track *track = playlist->tracks; track != nullptr; track = track->next) - add_song(songs, track); + add_song(songs, *track); return true; } |