43 path = path.section(
"://", -1);
44 if(path.contains(
"#"))
46 path = path.section(
"#", 0, 0);
51 const QFile file(path);
52 if(!file.exists() || file.size() <= 0)
185 #if TTK_VERSION >= TTK_VERSION_CHECK(2,5,3,0)
186 if(cover.width() > 500 || cover.height() > 500)
188 songMeta()->m_cover = cover.scaled(500, 500, Qt::KeepAspectRatio);
192 songMeta()->m_cover = cover;
206 #if TTK_VERSION >= TTK_VERSION_CHECK(2,5,3,0)
208 pix.loadFromData(data);
217 #if TTK_VERSION >= TTK_VERSION_CHECK(2,5,3,0)
252 m_offset = other.m_offset;
253 m_path = other.m_path;
262 : m_offset(other.m_offset),
263 m_path(other.m_path),
264 m_songMetas(
std::move(other.m_songMetas))
277 m_path = other.m_path;
302 if(index < 0 || index >= songMetaCount())
340 const QString &v = songMeta()->m_metaData[type];
346 static constexpr
const char *
SPLITER =
"*******************************************************************\n";
348 static constexpr
const char *
SPLITER =
"************************************************************************\n";
365 meta->
m_path = info->path();
380 length = info->duration();
405 description +=
"ShortName: " + properties.
shortName +
"\n";
406 description +=
"DecoderName: " + properties.
name +
"\n";
407 description +=
"Description: " + properties.
description +
"\n";
418 if(item.name() ==
"Rating")
423 QString value = item.value().toString();
424 if(value.contains(
"\n"))
426 value =
"\n" + value;
429 description += item.name() +
": " + value +
"\n";
435 QString value = item.value().toString();
436 if(value.contains(
"\n"))
438 value =
"\n" + value;
441 description += item.name() +
": " + value +
"\n";
465 const QList<TagModel* > &tags = model->
tags();
469 if(tags.count() == 3)
483 const QPixmap &pix =
cover();
TTK_MODULE_EXPORT QString charactersReplace(const QString &value)
virtual MetaDataModel * createMetaDataModel(const QString &path, bool readOnly)=0
void swap(TTKAny &left, TTKAny &right) noexcept
The StateHandler class provides is the base interface class of tag editor.
Input plugin interface (decoder factory).
The TrackInfo class stores metadata and other information about track.
virtual DecoderProperties properties() const =0
virtual void setValue(Qmmp::MetaData key, const QString &value)=0
static DecoderFactory * findByFilePath(const QString &path, bool useContent=false)
Structure to store input plugin properties.
virtual QList< TrackInfo * > createPlayList(const QString &fileName, TrackInfo::Parts parts, QStringList *ignoredPaths)=0
#define TTK_ERROR_STREAM(msg)
static qint64 formatDuration(const QString &time) noexcept