Bug 127741

Summary: amarok invisible stream title for no-name URI
Product: [Applications] amarok Reporter: Benjamin Creekmore <ben.creekmore>
Component: generalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Benjamin Creekmore 2006-05-21 09:09:31 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Debian stable Packages
OS:                Linux

when selecting a streaming station on the left list of "cool streams", sometimes nothing will show up in the list for "title". If you go to click on the area however, there is actually a stream listed, it is just invisible. This only happens when the URI has no name, just an address... for example, this radio station is just one of those many without a name: http://stream.xtcradio.com:8069/
Perhaps radiostations without names could be listed as such, and then you could at least see something listed... or have their stats listed instead... like bps,  locations... whatever.
Comment 1 Mark Kretschmann 2006-11-06 05:35:35 UTC
Yep, I can confirm this. It's very confusing.
Comment 2 Mark Kretschmann 2006-11-06 06:21:29 UTC
SVN commit 602473 by markey:

Some radio streams would show an empty title in the playlist. Now we fall back to the URL if the title is missing.

BUG: 127741


 M  +2 -0      ChangeLog  
 M  +6 -0      src/playlistloader.cpp  


--- trunk/extragear/multimedia/amarok/ChangeLog #602472:602473
@@ -2,6 +2,7 @@
 ================
 (C) 2002-2006 the Amarok authors.
 
+
 VERSION 1.4.5
   FEATURES:
     * Support for %composer and %genre when guessing tags from filenames.
@@ -16,6 +17,7 @@
     * Amarok now saves playlists with relative paths by default.
 
   BUGFIXES:
+	* Some shoutcast streams would show an empty title. (BR 127741)
     * Pause would act as Play/Pause. (BR 116101)
     * The same track would sometimes be shown twice in suggested songs
       (BR 129395)
--- trunk/extragear/multimedia/amarok/src/playlistloader.cpp #602472:602473
@@ -576,6 +576,10 @@
                 b.setUrl( KURL::fromPathOrURL( line ) );
             }
 
+            // Ensure that we always have a title: use the URL fallback
+            if( b.title().isEmpty() )
+                b.setTitle( url );
+
             m_bundles += b;
             b = MetaBundle();
         }
@@ -666,6 +670,8 @@
                 continue;
             tmp = (*i).section('=', 1).stripWhiteSpace();
             m_bundles[index - 1].setUrl(KURL::fromPathOrURL(tmp));
+            // Ensure that if the entry has no title, we show at least the URL as title
+            m_bundles[index - 1].setTitle(tmp);
             continue;
         }
         if ((*i).contains(regExp_Title)) {