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)
190 #if TTK_VERSION >= TTK_VERSION_CHECK(2,5,3,0)
191 if(cover.width() > 500 || cover.height() > 500)
211 #if TTK_VERSION >= TTK_VERSION_CHECK(2,5,3,0)
213 pix.loadFromData(data);
222 #if TTK_VERSION >= TTK_VERSION_CHECK(2,5,3,0)
257 m_offset = other.m_offset;
258 m_path = other.m_path;
262 m_songMetas <<
new Data(*data);
267 : m_offset(other.m_offset),
268 m_path(other.m_path),
269 m_songMetas(
std::move(other.m_songMetas))
282 m_path = other.m_path;
286 m_songMetas <<
new Data(*data);
306 if(index < 0 || index >= songMetaCount())
339 const QString &v = songMeta()->m_metaData[type];
345 static constexpr
const char *
SPLITER =
"*******************************************************************\n";
347 static constexpr
const char *
SPLITER =
"************************************************************************\n";
364 data->
m_path = info->path();
380 length = info->duration();
415 cover = QPixmap::fromImage(model->
cover());
421 if(item.name() ==
"Rating")
423 rating = item.value().toString();
426 QString value = item.value().toString();
432 description += item.name() +
": " + value +
TTK_LINEFEED;
435 if(!properties.isEmpty())
442 QString value = item.value().toString();
448 description += item.name() +
": " + value +
TTK_LINEFEED;
459 data->m_cover =
cover;
462 if(!lyrics.isEmpty())
467 if(!rating.isEmpty())
491 const QList<TagModel*> &tags = model->
tags();
495 if(tags.count() == 3)
509 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
QMap< TagMeta::Type, QString > m_metaData
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
The class of the music meta.
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