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 2fa53ee7aaf577c1761b217e52c71878e5506b74..bd92cf20efa0e8651424f56eda85b12df766e484 100644 (file)
@@ -495,7 +495,10 @@ RESULT eServiceMP3::info(ePtr<iServiceInformation>&i)
 
 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;
 }