add albumId role to MediaPlayList and use it in ManageHeaderBar
ClosedPublic

Authored by mgallien on Jul 12 2018, 3:17 PM.

Details

Summary

add albumId role to MediaPlayList and use it in ManageHeaderBar

Test Plan

tests are OK

Diff Detail

Repository
R255 Elisa
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mgallien requested review of this revision.Jul 12 2018, 3:17 PM
mgallien created this revision.
januz added a comment.Jul 12 2018, 6:18 PM

Hey, thanks for working on this. I tried this in the links branch but it seems all albums are giving back zero (even after deleting/rebuilding the db).

console.log('id', elisa.manageHeaderBar.albumId)
// qml: id 0

@januz I will check but I think I know why.

mgallien updated this revision to Diff 37670.Jul 12 2018, 8:44 PM
  • include tests for DatabaseInterface for the albumId attribute of tracks
  • configure ManageHeaderBar to get albumId role from MediaPlayList

should fix the albumId always at 0

astippich requested changes to this revision.Jul 14 2018, 1:11 PM

You forgot to set the role in elisaapplication.cpp similar to the other roles (it's done in c++). You changed the android main qml file instead (which is horribly outdated)

This revision now requires changes to proceed.Jul 14 2018, 1:11 PM
mgallien updated this revision to Diff 37758.Jul 14 2018, 5:13 PM
  • set the AlbumIdRole for ManageHeaderBar to read data from MediaPlayList

You forgot to set the role in elisaapplication.cpp similar to the other roles (it's done in c++). You changed the android main qml file instead (which is horribly outdated)

Thanks @astippich, I had completely missed that.

januz accepted this revision.Jul 14 2018, 10:04 PM

Tested this on my branch and it works now, thanks guys

This revision was not accepted when it landed; it landed in state Needs Review.Jul 15 2018, 5:10 AM
This revision was automatically updated to reflect the committed changes.