Call fixPath so that correct URL is passed
This commit is contained in:
committed by
Craig Drummond
parent
54f615cc77
commit
97271a60d1
@@ -271,8 +271,10 @@ QList<Song> SearchModel::songs(const QModelIndexList &indexes, bool allowPlaylis
|
||||
}
|
||||
Song *song=static_cast<Song *>(index.internalPointer());
|
||||
if ((allowPlaylists || Song::Playlist!=song->type) && !files.contains(song->file)) {
|
||||
list << *song;
|
||||
files << song->file;
|
||||
Song s=*song;
|
||||
fixPath(s);
|
||||
list << s;
|
||||
files << s.file;
|
||||
}
|
||||
}
|
||||
return list;
|
||||
|
||||
@@ -85,6 +85,7 @@ Q_SIGNALS:
|
||||
void statsUpdated(int songs, quint32 time);
|
||||
|
||||
protected:
|
||||
virtual Song & fixPath(Song &s) const { return s; }
|
||||
void results(const QList<Song> &songs);
|
||||
const Song * toSong(const QModelIndex &index) const { return index.isValid() ? static_cast<const Song *>(index.internalPointer()) : 0; }
|
||||
|
||||
|
||||
@@ -512,7 +512,8 @@ QList<Song> PodcastService::songs(const QModelIndexList &indexes, bool allowPlay
|
||||
Podcast *podcast=static_cast<Podcast *>(item);
|
||||
foreach (const Episode *episode, podcast->episodes) {
|
||||
selectedPodcasts.insert(item);
|
||||
songs.append(episode->toSong());
|
||||
Song s=episode->toSong();
|
||||
songs.append(fixPath(s));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -521,7 +522,8 @@ QList<Song> PodcastService::songs(const QModelIndexList &indexes, bool allowPlay
|
||||
if (!item->isPodcast()) {
|
||||
Episode *episode=static_cast<Episode *>(item);
|
||||
if (!selectedPodcasts.contains(episode->parent)) {
|
||||
songs.append(episode->toSong());
|
||||
Song s=episode->toSong();
|
||||
songs.append(fixPath(s));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user