| Summary: | itpc url handle podcast | ||
|---|---|---|---|
| Product: | [Applications] amarok | Reporter: | José JORGE <lists.jjorge> |
| Component: | Podcast | Assignee: | Amarok Bugs <amarok-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
José JORGE
2006-06-09 23:03:23 UTC
This is wished as manualy copying the url to amarok, and replacing itpc: with http: is not an end user solution ;-) You mean iptc? no it is itpc:// lokk in this page for example http://www.radiofrance.fr/services/rfmobiles/podcast/index.php?chaine=1 SVN commit 573571 by aumuell:
let amarok handle itpc:// and pcast:// style links for adding podcasts
BUG: 128918
M +2 -0 ChangeLog
M +3 -1 src/Makefile.am
A src/amarokitpc.protocol src/amaroklastfm.protocol#573559
A src/amarokpcast.protocol src/amaroklastfm.protocol#573559
M +8 -1 src/app.cpp
M +5 -1 src/playlistbrowser.cpp
--- trunk/extragear/multimedia/amarok/ChangeLog #573570:573571
@@ -5,6 +5,8 @@
VERSION 1.4.2:
FEATURES:
+ * Handle itpc:// and pcast:// url protocols for adding podcast feeds.
+ (BR 128918)
* New DCOP call "collection: totalComposers" returns the number of
different composers in your collection.
* Synchronize playlists to media devices.
--- trunk/extragear/multimedia/amarok/src/Makefile.am #573570:573571
@@ -231,7 +231,9 @@
$(kde_servicesdir)
protocol_DATA = \
- amaroklastfm.protocol
+ amarokitpc.protocol \
+ amaroklastfm.protocol \
+ amarokpcast.protocol
messages: rc.cpp
$(EXTRACTRC) `find . -name "*.rc" -o -name "*.ui" -o -name "*.kcfg"` > rc.cpp
--- trunk/extragear/multimedia/amarok/src/app.cpp #573570:573571
@@ -36,6 +36,7 @@
#include "osd.h"
#include "playerwindow.h"
#include "playlist.h"
+#include "playlistbrowser.h"
#include "playlistwindow.h"
#include "pluginmanager.h"
#include "refreshimages.h"
@@ -211,7 +212,13 @@
{
KURL::List list;
for( int i = 0; i < args->count(); i++ )
- list << args->url( i );
+ {
+ KURL url = args->url( i );
+ if( url.protocol() == "itpc" || url.protocol() == "pcast" )
+ PlaylistBrowser::instance()->addPodcast( url );
+ else
+ list << url;
+ }
int options;
bool appendAsDefault = amaroK::config()->readBoolEntry( "AppendAsDefault", false );
--- trunk/extragear/multimedia/amarok/src/playlistbrowser.cpp #573570:573571
@@ -1302,10 +1302,14 @@
return 0;
}
-void PlaylistBrowser::addPodcast( const KURL& url, QListViewItem *parent )
+void PlaylistBrowser::addPodcast( const KURL& origUrl, QListViewItem *parent )
{
if( !parent ) parent = static_cast<QListViewItem*>(m_podcastCategory);
+ KURL url( origUrl );
+ if( url.protocol() == "itpc" || url.protocol() == "pcast" )
+ url.setProtocol( "http" );
+
PodcastChannel *channel = findPodcastChannel( url );
if( channel )
{
|