Commit 0f21b665 authored by Yerrey Dev's avatar Yerrey Dev
Browse files

Change order of filename and database id update

This allows us to check database id after we receive a notify
that filename has changed, otherwise it's the database id of the
previous track instead of the current. (Hope this doesn't break
behaviour in other parts)
parent f0d27947
......@@ -355,9 +355,9 @@ void ManageHeaderBar::updateCurrentTrackData()
notifyTitleProperty();
notifyAlbumProperty();
notifyAlbumArtistProperty();
notifyFileNameProperty();
notifyImageProperty();
notifyDatabaseIdProperty();
notifyFileNameProperty();
notifyTrackTypeProperty();
notifyAlbumIdProperty();
notifyIsValidProperty();
......
......@@ -353,7 +353,11 @@ Kirigami.Page {
onFileUrlChanged: {
if (ElisaApplication.musicManager && trackType !== undefined && fileUrl.toString().length !== 0) {
metaDataModel.initializeByUrl(trackType, fileUrl)
if (databaseId !== 0) {
metaDataModel.initializeByIdAndUrl(trackType, databaseId, fileUrl)
} else {
metaDataModel.initializeByUrl(trackType, fileUrl)
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment