Bug 135119 - Cannot enter "slash" ("/") in custom last.fm station
Summary: Cannot enter "slash" ("/") in custom last.fm station
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-04 22:53 UTC by Mathieu Ducharme
Modified: 2006-12-27 23:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Ducharme 2006-10-04 22:53:48 UTC
Version:           1.4.3 (using KDE KDE 3.5.4)
Installed from:    Ubuntu Packages

When using the custom radio feature for last.fm, the artist list is truncated if there's a slash ("/") character in the input field. 

Example: AC/DC...
Comment 1 Alexandre Oliveira 2006-12-27 23:07:10 UTC
SVN commit 617064 by aoliveira:

"slash" ("/") wouldn't work in custom last.fm stations
BUG: 135119


 M  +5 -2      playlistbrowser.cpp  


--- trunk/extragear/multimedia/amarok/src/playlistbrowser.cpp #617063:617064
@@ -590,12 +590,15 @@
 
 void PlaylistBrowser::addLastFmCustomRadio( QListViewItem *parent )
 {
-    const QString token = LastFm::Controller::createCustomStation();
+    QString token = LastFm::Controller::createCustomStation();
     if( token.isEmpty() ) return;
+    token.replace( "/", "%252" );
 
     const QString text = "lastfm://artistnames/" + token;
     const KURL url( text );
-    const QString name = LastFm::Controller::stationDescription( text );
+
+    QString name = LastFm::Controller::stationDescription( text );
+    name.replace( "%252", "/" );
     new LastFmEntry( parent, 0, url, name );
     saveLastFm();
 }