diff options
Diffstat (limited to 'src/qmmpui')
| -rw-r--r-- | src/qmmpui/playlistformat.h | 7 | ||||
| -rw-r--r-- | src/qmmpui/playlistparser.cpp | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/qmmpui/playlistformat.h b/src/qmmpui/playlistformat.h index ba7ca26f2..06927cfbf 100644 --- a/src/qmmpui/playlistformat.h +++ b/src/qmmpui/playlistformat.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2013 by Ilya Kotov * + * Copyright (C) 2006-2017 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -56,9 +56,10 @@ public: virtual QStringList decode(const QString& contents) = 0; /*! * Takes the list of AbstractPlaylistItem objects, should return string of - * encoded playlist file + * encoded playlist file. + * @param dir Playlist file path (May be used to adjust playlist content). */ - virtual QString encode(const QList<PlayListTrack*>& contents) = 0; + virtual QString encode(const QList<PlayListTrack*>& contents, const QString &path) = 0; }; Q_DECLARE_INTERFACE(PlayListFormat,"PlayListFormat/1.0") diff --git a/src/qmmpui/playlistparser.cpp b/src/qmmpui/playlistparser.cpp index 083cb35d4..70c3c3fe9 100644 --- a/src/qmmpui/playlistparser.cpp +++ b/src/qmmpui/playlistparser.cpp @@ -90,7 +90,7 @@ void PlayListParser::savePlayList(QList<PlayListTrack *> tracks, const QString & if (file.open(QIODevice::WriteOnly)) { QTextStream ts(&file); - ts << prs->encode(tracks); + ts << prs->encode(tracks, QFileInfo(f_name).canonicalFilePath()); file.close(); } else |
