Summary: | Broken podcast that causes weird side-effects | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Marcel Dischinger <mdspam> |
Component: | Podcast | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bart.cerneels |
Priority: | NOR | ||
Version: | 2.3-GIT | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Marcel Dischinger
2010-02-18 13:32:21 UTC
Confirmed on current Amarok 2.3-git commit e6ecbbeed48cb82a6dbba9d522c6b26dea0155eb Author: Bart Cerneels <bart.cerneels@kde.org> Date: Thu Feb 18 14:55:47 2010 +0100 Fix bug in rss feed parsing using wrong url. This actually broke all feeds that do not include a guid and possible overwrited data from other feeds. Introduced in 2.3 beta. BUG:227515 diff --git a/ChangeLog b/ChangeLog index f3c563f..2742f2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,9 @@ VERSION 2.3 last check. BUGFIXES: + * Fixed a bug in podcast parsing that broke all feeds that do not include a + guid and possible overwrited data from other podcasts. Introduced in 2.3 beta. + (BR 227515) * Correctly show progress description of last remaining job in the statusbar after multiple jobs have been running. * Fixed a regression that broke the playlist save button. diff --git a/src/podcasts/PodcastReader.cpp b/src/podcasts/PodcastReader.cpp index 91c3b67..a18efe4 100644 --- a/src/podcasts/PodcastReader.cpp +++ b/src/podcasts/PodcastReader.cpp @@ -1153,14 +1153,16 @@ PodcastReader::endItem() if( useGuid ) useGuid = !m_item->guid().contains( "[A-Z]" ); //KUrl only uses lowercase - const KUrl trackId( useGuid ? m_item->uidUrl() : m_item->guid() ); + const KUrl trackId( useGuid ? m_item->guid() : m_item->uidUrl() ); Meta::PodcastEpisodePtr episode = Meta::PodcastEpisodePtr::dynamicCast( m_podcastProvider->trackForUrl( trackId ) ); - if( !episode.isNull() ) + //make sure that the episode is not a bogus match. The channel has to be correct. + // See http://bugs.kde.org/show_bug.cgi?id=227515 + if( !episode.isNull() || episode->channel() != m_channel ) { - debug() << "updating episode: " << m_item->title(); + debug() << "updating episode: " << episode->title(); episode->setTitle( m_item->title() ); episode->setSubtitle( m_item->subtitle() ); diff --git a/src/podcasts/sql/SqlPodcastProvider.cpp b/src/podcasts/sql/SqlPodcastProvider.cpp index 1af4b48..2f37c57 100644 --- a/src/podcasts/sql/SqlPodcastProvider.cpp +++ b/src/podcasts/sql/SqlPodcastProvider.cpp @@ -195,13 +195,13 @@ SqlPodcastProvider::possiblyContainsTrack( const KUrl &url ) const Meta::TrackPtr SqlPodcastProvider::trackForUrl( const KUrl &url ) { - DEBUG_BLOCK + if( url.isEmpty() ) + return TrackPtr(); SqlStorage *sqlStorage = CollectionManager::instance()->sqlStorage(); if( !sqlStorage ) return TrackPtr(); - QString command = "SELECT id, url, channel, localurl, guid, " "title, subtitle, sequencenumber, description, mimetype, pubdate, " "duration, filesize, isnew FROM podcastepisodes " commit 78b00addfac22438b3b8fba42275c4540cf2f480 Author: Mathias Panzenböck <grosser.meister.morti@gmx.net> Date: Fri Feb 19 02:43:45 2010 +0100 Fix barts fix for bug in rss feed parsing using wrong url. The condition was exactly wrong, which caused amarok to crash when there was no match for a podacst episode. BUG:227515 diff --git a/src/podcasts/PodcastReader.cpp b/src/podcasts/PodcastReader.cpp index a18efe4..35ea736 100644 --- a/src/podcasts/PodcastReader.cpp +++ b/src/podcasts/PodcastReader.cpp @@ -1160,7 +1160,7 @@ PodcastReader::endItem() //make sure that the episode is not a bogus match. The channel has to be correct. // See http://bugs.kde.org/show_bug.cgi?id=227515 - if( !episode.isNull() || episode->channel() != m_channel ) + if( !episode.isNull() && episode->channel() == m_channel ) { debug() << "updating episode: " << episode->title(); Just as a side-note as this is not related to this bug per-se: this fix brought back the "multiplying podcast episodes" bug (https://bugs.kde.org/show_bug.cgi?id=219516) that was fixed for beta1. (In reply to comment #4) > Just as a side-note as this is not related to this bug per-se: this fix brought > back the "multiplying podcast episodes" bug > (https://bugs.kde.org/show_bug.cgi?id=219516) that was fixed for beta1. Could you please comment on that bug, then? Else it gets difficult to track. |