diff options
Diffstat (limited to 'src/PlaylistControl.cxx')
-rw-r--r-- | src/PlaylistControl.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/PlaylistControl.cxx b/src/PlaylistControl.cxx index 2dbd75d6e..9d75cc26d 100644 --- a/src/PlaylistControl.cxx +++ b/src/PlaylistControl.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2013 The Music Player Daemon Project + * Copyright (C) 2003-2014 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -26,7 +26,7 @@ #include "Playlist.hxx" #include "PlaylistError.hxx" #include "PlayerControl.hxx" -#include "Song.hxx" +#include "DetachedSong.hxx" #include "Log.hxx" void @@ -195,7 +195,7 @@ playlist::SeekSongPosition(PlayerControl &pc, unsigned song, float seek_time) if (!queue.IsValidPosition(song)) return PlaylistResult::BAD_RANGE; - const Song *queued_song = GetQueuedSong(); + const DetachedSong *queued_song = GetQueuedSong(); unsigned i = queue.random ? queue.PositionToOrder(song) @@ -215,8 +215,7 @@ playlist::SeekSongPosition(PlayerControl &pc, unsigned song, float seek_time) queued_song = nullptr; } - Song *the_song = queue.GetOrder(i).DupDetached(); - if (!pc.Seek(the_song, seek_time)) { + if (!pc.Seek(new DetachedSong(queue.GetOrder(i)), seek_time)) { UpdateQueuedSong(pc, queued_song); return PlaylistResult::NOT_PLAYING; |