Expose some more track information to the JavaScript for renaming

This commit is contained in:
Martchus 2020-10-01 20:56:37 +02:00
parent 72ed928667
commit 4951f5bdc3
2 changed files with 5 additions and 2 deletions

View File

@ -192,7 +192,7 @@ if (WIDGETS_GUI OR QUICK_GUI)
endif ()
# find tagparser
find_package(tagparser${CONFIGURATION_PACKAGE_SUFFIX} 9.2.0 REQUIRED)
find_package(tagparser${CONFIGURATION_PACKAGE_SUFFIX} 9.3.0 REQUIRED)
use_tag_parser()
# enable experimental JSON export

View File

@ -208,7 +208,10 @@ TAGEDITOR_JS_VALUE TagEditorObject::parseFileInfo(const QString &fileName)
trackObject.setProperty(QStringLiteral("mediaType"), QString::fromUtf8(track.mediaTypeName()));
trackObject.setProperty(QStringLiteral("format"), QString::fromUtf8(track.formatName()));
trackObject.setProperty(QStringLiteral("formatAbbreviation"), QString::fromUtf8(track.formatAbbreviation()));
trackObject.setProperty(QStringLiteral("description"), QString::fromUtf8(track.description().data()));
trackObject.setProperty(QStringLiteral("version"), QString::number(track.version()));
trackObject.setProperty(QStringLiteral("language"), QString::fromStdString(track.language()));
trackObject.setProperty(QStringLiteral("description"), QString::fromStdString(track.description()));
trackObject.setProperty(QStringLiteral("shortDescription"), QString::fromStdString(track.shortDescription()));
tracksObject.setProperty(trackIndex, trackObject TAGEDITOR_JS_READONLY);
}
fileInfoObject.setProperty(QStringLiteral("tracks"), tracksObject TAGEDITOR_JS_READONLY);