parent
c8b8556cfc
commit
acb02932bd
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include "internet/podcasts/podcastservice.h"
|
||||
|
||||
#include <QMap>
|
||||
#include <QMenu>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QtConcurrentRun>
|
||||
|
@ -643,6 +644,7 @@ void PodcastService::EpisodesAdded(const PodcastEpisodeList& episodes) {
|
|||
|
||||
void PodcastService::EpisodesUpdated(const PodcastEpisodeList& episodes) {
|
||||
QSet<int> seen_podcast_ids;
|
||||
QMap<int, Podcast> podcasts_map;
|
||||
|
||||
for (const PodcastEpisode& episode : episodes) {
|
||||
const int podcast_database_id = episode.podcast_database_id();
|
||||
|
@ -668,7 +670,10 @@ void PodcastService::EpisodesUpdated(const PodcastEpisodeList& episodes) {
|
|||
seen_podcast_ids.insert(podcast_database_id);
|
||||
}
|
||||
const Podcast podcast = parent->data(Role_Podcast).value<Podcast>();
|
||||
ReloadPodcast(podcast);
|
||||
podcasts_map[podcast.database_id()] = podcast;
|
||||
}
|
||||
for (const Podcast& podcast_tmp : podcasts_map.values()) {
|
||||
ReloadPodcast(podcast_tmp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue