21 if(!data.takeFirst().contains(
"[playlist]", Qt::CaseInsensitive))
26 const QRegExp regx1(
"^File(\\d+)=(.+)");
27 const QRegExp regx2(
"^Length(\\d+)=(-{0,1}\\d+)");
31 for(
const QString &line :
qAsConst(data))
33 if(regx1.indexIn(line) > -1)
35 if(regx1.cap(1).toInt() > 0)
44 else if(regx2.indexIn(line) > -1)
46 if(regx2.cap(1).toInt() > 0)
80 data << QString(
"[playlist]");
83 for(
int i = 0; i < items.count(); ++i)
89 data << QString(
"File%1=%2").arg(count).arg(song.path());
90 data << QString(
"Title%1=%2").arg(count).arg(song.name());
95 data <<
"NumberOfEntries=" + QString::number(count);
virtual bool readBuffer(MusicSongItemList &items) overridefinal
virtual bool writeBuffer(const MusicSongItemList &items) overridefinal
TTK_MODULE_EXPORT QStringList split(const QString &value, const QString &key=TTK_DEFAULT_STR)
The class of the read write interface.
The class of the music song item.
The class of the music song info.
#define TTK_ERROR_STREAM(msg)
The class of the ttk file interface.
static qint64 formatDuration(const QString &time) noexcept