23 const QRegExp regx(
"#EXTINF:(-{0,1}\\d+),(.*)");
28 if(str.startsWith(
"#EXTM3U") || str.isEmpty())
33 if(regx.indexIn(str) > -1)
35 length = regx.cap(1).toInt();
39 if(str.startsWith(
"#"))
67 data << QString(
"#EXTM3U");
69 for(
int i = 0; i < items.count(); ++i)
75 data.append(song.path());
TTK_MODULE_EXPORT QStringList split(const QString &value, const QString &key=TTK_DEFAULT_STR)
virtual bool writeBuffer(const MusicSongItemList &items) overridefinal
The class of the read write interface.
The class of the music song item.
The class of the music song info.
virtual bool readBuffer(MusicSongItemList &items) overridefinal
The class of the ttk file interface.
static qint64 formatDuration(const QString &time) noexcept