Summary: | MetaData isn't updated while there is not metadata at all | ||
---|---|---|---|
Product: | [Applications] Elisa | Reporter: | hanyoung |
Component: | general | Assignee: | Matthieu Gallien <matthieu_gallien> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nate |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/multimedia/elisa/commit/f0d279478935bbda2de2ead40176938cee6d71e1 | Version Fixed In: |
Description
hanyoung
2021-04-30 14:09:38 UTC
Interesting. Wanna submit a merge request? :) (In reply to Nate Graham from comment #1) > Interesting. Wanna submit a merge request? :) I'd like to fix it. I found seems like songs without metadata's ID in database is nil. Can you point me to the related files? Tracks without metadata isn't present in Tracks table but exist in TracksData table. I don't know which class is responsible for insert new tracks to database. A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/322 Git commit db4720e7fa9e294a3916941749a83a0c3845e344 by Yerrey Dev. Committed on 27/01/2022 at 12:01. Pushed by ngraham into branch 'master'. Fixes issue of metadata/lyrics not updating when switching tracks The issue is due to TrackMetadataModel::trackData not providing track data for tracks with Database ID of 0, which are tracks that are missing title metadata and are not added into elisaDatabase.db. In the fix, we remove the ID check. This introduces another issue, where in ContextView.qml onDatabaseIdChanged would not update the metadata/lyrics because the ID of tracks without metadata would be 0, and it wouldn't trigger the refresh of tracks changing. To alleviate this, we'll instead monitor the filename of the track playing, and when that changes, we update trackdata by the file URL. M +1 -3 src/models/trackmetadatamodel.cpp M +3 -3 src/qml/ContextView.qml https://invent.kde.org/multimedia/elisa/commit/db4720e7fa9e294a3916941749a83a0c3845e344 Git commit f0d279478935bbda2de2ead40176938cee6d71e1 by Yerrey Dev. Committed on 27/01/2022 at 12:01. Pushed by ngraham into branch 'master'. Fix metadata view not updating when switching tabs We need to check whether to call initializeByUrl or initializeByIdAndUrl based on whether the track has database id, fixes the issue of the metadata view being blank after switching tabs. Also onTrackTypeChanged needs the same check so metadata is properly updated when switching for example from radio to a track without metadata. M +15 -7 src/qml/ContextView.qml https://invent.kde.org/multimedia/elisa/commit/f0d279478935bbda2de2ead40176938cee6d71e1 thanks a lot, I didn't manage to figure out what caused this back then. |