Bug 135119

Summary: Cannot enter "slash" ("/") in custom last.fm station
Product: [Applications] amarok Reporter: Mathieu Ducharme <linux>
Component: generalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.4.3   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

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();
 }