better getName for gstreamer-based services
authorFelix Domke <tmbinc@elitedvb.net>
Mon, 6 Aug 2007 21:08:09 +0000 (21:08 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Mon, 6 Aug 2007 21:08:09 +0000 (21:08 +0000)
lib/service/servicemp3.cpp

index 2fa53ee..bd92cf2 100644 (file)
@@ -495,7 +495,10 @@ RESULT eServiceMP3::info(ePtr<iServiceInformation>&i)
 
 RESULT eServiceMP3::getName(std::string &name)
 {
 
 RESULT eServiceMP3::getName(std::string &name)
 {
-       name = "MP3 File: " + m_filename;
+       name = m_filename;
+       int n = name.rfind('/');
+       if (n != std::string::npos)
+               name = name.substr(n + 1);
        return 0;
 }
 
        return 0;
 }