https://bugs.kde.org/show_bug.cgi?id=333745

Kai Benndorf <kai.bennd...@web.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kai.bennd...@web.de

--- Comment #19 from Kai Benndorf <kai.bennd...@web.de> ---
Have had this problem when copying the Amarok generated playlists into kodi.

Tried the patch from Jan-Matthias Braun, with not much success. There have been
less % encoded characters, but not all have been removed.

I helped me by changing
~/kde/src/amarok/src/core-impl/playlists/types/file/PlayListFile.cpp, so that
the path is never encoded. As this helps me, it will not be not of much help if
you really have to store urls in the playlist. For a real fix I think you must
distinguish the cases if a track is referenced by a file path or url.

QString
PlaylistFile::trackLocation( const Meta::TrackPtr &track ) const
{
    KUrl path = track->playableUrl();
    if( path.isEmpty() )
        return track->uidUrl();

    if( !m_relativePaths || m_url.isEmpty() || !path.isLocalFile() ||
!m_url.isLocalFile() )
//        return path.toEncoded();
      return path.path();

    QDir playlistDir( m_url.directory() );
//    return QUrl::toPercentEncoding( playlistDir.relativeFilePath( path.path()
), "/" );
    return playlistDir.relativeFilePath( path.path() );
}

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to