Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Elisa Elisa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Bugzilla
    • Bugzilla
  • Merge requests 27
    • Merge requests 27
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • MultimediaMultimedia
  • ElisaElisa
  • Merge requests
  • !322

Fixes issue of metadata/lyrics not updating when switching tracks

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Yerrey Dev requested to merge yerrey/elisa:metadata-update-fix into master Jan 26, 2022
  • Overview 2
  • Commits 6
  • Pipelines 10
  • Changes 5

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.

On top of that, ContextView.qml onTrackTypeChanged now calls the proper function based on whether the track has a database id or not.

We change the order of the notifying of database id and filename in manageheaderbar.cpp, so we avoid the issue that the when the onFileUrlChanged is triggered, we actually have the database id of the current track, instead of the previous. This allows us to use the correct function knowing whether the track is in the database or not. (Hope this doesn't break any behaviour elsewhere)

Also a fix for metadata not updating when opening files through Files-browser, this was caused by files being opened as ElisaUtils::FileName TrackType instead of ElisaUtils::Track. In the fix we just allow ModelDataLoader::loadDataByDatabaseIdAndUrl to handle filenames.

BUG: 436405 BUG: 448043 BUG: 445382 BUG: 427289

Edited Jan 27, 2022 by Yerrey Dev
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: metadata-update-fix