Skip to content

Allow update track rating in DataListView

Summary

Allow changing tracks rating from DataListView. Screenshot_20210709_122332

Details

Currently, correct me if I'm wrong, to update tracks rating we need to edit track's details, click. modify and then confirm the change. I really would like to edit the rating on the DataListView.

This change includes:

  • RatingStar editable to true in ListBrowserDelegate (it only affects when desktop)

  • New signal on ListBrowserDelegate

    signal trackRatingChanged(var url, var rating)

  • DataListView connects previous signal and calls ElisaApplication.musicManager.updateSingleFileMetaData

Pending/Probably wrong things

  • DataListView should use DataTypes.ColumnRoles.RatingRole instead of fixed magic number.
    function updateRating(url, rating) {
        // TODO: Use DataTypes::ColumnsRoles instead of 272
        ElisaApplication.musicManager.updateSingleFileMetaData(url, ColumnsRoles.RatingRole, rating)
    }
  • I exported tracksListener->updateSingleFileMetaData through MusicListenersManager to allow call it from qml (ElisaApplication.musicManager.updateSingleFileMetaData), I suppose there is currently some way to call it but I couldn't find it.

Please excuse me if this is not the correct way to create a merge request or if I have skipped any step, but I really would like to have this feature :)

Edited by Matthieu Gallien

Merge request reports