Bug 303704 - enhanced feature for nowlistening plugin
Summary: enhanced feature for nowlistening plugin
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kopete
Classification: Unmaintained
Component: Now Listening Plugin (other bugs)
Version First Reported In: SVN
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-17 20:45 UTC by Mad
Modified: 2024-09-18 18:28 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mad 2012-07-17 20:45:31 UTC
I modified nlmpris.cpp from line 151 to 161 to:
If the file is playing doesn't have metadata, then m_artist must show " " and not %artist.
The same for m_track...
But if your mp3 file, doesn't have metadata, it show the name of file without mp3 extension

This is my piece of code

    if ( newTrack != m_track )
    {
        m_newTrack = true;
        m_track = newTrack;
        if (m_track.isEmpty())
        {
            m_track = " ";
        }
        // Fetch album
        m_album = metaData["album"].toString();
        if (m_album.isEmpty())
        {
            m_album = " ";
        }
        // Fetch artist
        m_artist = metaData["artist"].toString();
        if (m_artist.isEmpty())
        {
            m_artist = " ";
            if (m_track.isEmpty())
            {
                QStringList l;
                const QString tracktemp = metaData["location"].toString();
                l = tracktemp.split("/", QString::SkipEmptyParts);
                m_track = l[l.count() - 1];
            }
        }
    }

What do you think?

PD: It's my first time with QT, i'm a "rookie" :D

Reproducible: Always
Comment 1 Mad 2012-08-01 18:09:14 UTC
Uops! 
after  m_artist.isEmpty()

correct if (m_track.isEmpty())
by this
 if (m_track.compare(" ") == 0)
Comment 2 Christoph Cullmann 2024-09-18 18:28:23 UTC
Dear user, unfortunately Kopete is no longer maintained.

Please migrate to another solution, e.g. for Jabber a possibility is Kaidan, for Matrix a candidate is NeoChat.