Add AlbumNormalizationGain field to BaseItemDto#1596
Conversation
| final albumNormalizationGain = | ||
| baseItem.albumNormalizationGain ?? | ||
| providerContainer.read(metadataProvider(baseItem)).valueOrNull?.albumNormalizationGain; |
There was a problem hiding this comment.
Idk why formatter suddenly changed its mind :-(
Aside from outdated comment, generated code and rename, there could be exactly one line replacement and everything else is added. I really like non-invasive changes :-)
There was a problem hiding this comment.
it's probably because of the ?? operator and Dart trying to avoid excessive indentation
556a745 to
e6978ac
Compare
|
Oh wow there's no problems with |
|
@HeroBrine1st your upstream changes have landed in the Jellyfin 12.0 RC builds, so I think it's time to merge this in? Or does this break backwards compatibility in any way? |
|
This does not break compatibility at all but I'm still considering upgrading to RC to test it |
mostlyEqual is updated following example in 658adae # Conflicts: # lib/models/jellyfin_models.g.dart - resolved with codegen
|
It required me to clean up app folder (probably just a conflict with #1630). Otherwise, this works on 10.11.x so we can merge it. I won't have enough time to update to RC due to plugin upgrades and I don't want to clone my instance. |
|
I can test this on RC-2. Any specific steps I should follow? |
|
So, this is the part where it gets tricky. You need to make metadata fetcher slow using patch from this message. It passes if it doesn't break after that :-) Or you can simulate reproduction of that bug (in PR of patch) by keeping player in background (UI won't make request) and then looking into logs to see whether it did metadata requests or not. |
|
Okay, so: I guess this means your changes are working? I did test this on 10.10 too though, with the same behavior, so I'm not entirely sure. 12.0 returns |
|
It's strange it works like that on 10.10 given you tested the same revision on both jellyfin versions. It should have waited 15 seconds before changing to album gain, but note that it will change to |
|
@HeroBrine1st I think what's happening is that music_player_background_task.dart kicks in, and that somehow get the |
Changes
Following jellyfin/jellyfin#14745, this PR uses new dto field to (hopefully) avoid using metadata provider somewhere in the future. But currently it at least allows to avoid waiting on response :-)
There's no Jellyfin release with that PR currently. Do not merge until version is updated in comment I added.
I used 658adae as an example on how to add support for download repair.
Other changes
No tests aside from basic building were done - waiting for Jellyfin release. Also there can be problems with
check-codegentask (it does a lot of removals and reformatting on my system), fortunately it prints a diff so I can apply it.