From b45f600a4ecf9b3f6121a30794e9fcbbb2fee621 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 12 Jun 2017 12:49:11 +0000 Subject: improved m3u support (#910) git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@7227 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmpui/playlistformat.h | 7 ++++--- src/qmmpui/playlistparser.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/qmmpui') 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& contents) = 0; + virtual QString encode(const QList& 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 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 -- cgit v1.2.3-13-gbd6f