SRGSSR / pillarbox-android

The modern SRG SSR Pillarbox player targeting Android platforms
https://android.pillarbox.ch/api
MIT License
13 stars 1 forks source link

Add SAM endpoints and CH/WW locations #736

Closed MGaetan89 closed 2 weeks ago

MGaetan89 commented 3 weeks ago

Pull request

Description

This PR adds the ability to select the SAM endpoints in the Lists section of the demo app, as well as setting the IL location to CH or WW.

Changes made

Checklist

github-actions[bot] commented 3 weeks ago

Code Coverage

Overall Project 48.08% -0.01% 🟢
Files changed 98.72% 🟢


Module Coverage
:pillarbox-core-business 79.71% -0.04% 🟢
Files |Module|File|Coverage|| |:-|:-|:-|:-:| |:pillarbox-core-business|[ResourceSelector.kt](https://github.com/SRGSSR/pillarbox-android/blob/c560b253e540f7a94235afb2f760ef034d572dc0/pillarbox-core-business%2Fsrc%2Fmain%2Fjava%2Fch%2Fsrgssr%2Fpillarbox%2Fcore%2Fbusiness%2Fintegrationlayer%2FResourceSelector.kt)|100%|🟢| ||[SRGMediaItemBuilder.kt](https://github.com/SRGSSR/pillarbox-android/blob/c560b253e540f7a94235afb2f760ef034d572dc0/pillarbox-core-business%2Fsrc%2Fmain%2Fjava%2Fch%2Fsrgssr%2Fpillarbox%2Fcore%2Fbusiness%2FSRGMediaItemBuilder.kt)|98.57% **`-0.72%`**|🟢|
StaehliJ commented 3 weeks ago

I think the forced location should be also set for playback (mediaComposition calls) otherwise, what is the point?

MGaetan89 commented 2 weeks ago

@StaehliJ this can be reviewed again now. Most of the changes are in Playlist and DemoItem, because of the change of implementation of DemoItem.

[!NOTE] The failing Android Tests don't seem to be linked to my change. It looks like the emulator fails to start. I've restarted the build already, with the same result: https://github.com/SRGSSR/pillarbox-android/actions/runs/11290145790/job/31401749426?pr=736. I'll check again later to see what we can do.

# Run Android Tests > Launch Emulator
sh to create a custom hardware profile? [no] [command]/usr/bin/sh -c \printf 'hw.cpu.ncore=2
' >> /home/runner/.android/avd/test.avd/config.ini
/usr/bin/sh: 1: cannot create /home/runner/.android/avd/test.avd/config.ini: Directory nonexistent
MGaetan89 commented 2 weeks ago

The failing Android Tests don't seem to be linked to my change.

Indeed, the same is happening on #726: https://github.com/SRGSSR/pillarbox-android/actions/runs/11292597001/job/31409000873?pr=726 I'm investigating now to see what we can do

MGaetan89 commented 2 weeks ago

The issue seems to be related to the fact that ubuntu-latest now points to ubuntu-24.04 instead of ubuntu-22.04. Forcing ubuntu-22.04 works as expected. We can use that for now to not block our PRs.

In the meantime, I'll investigate the difference between ubuntu-22.04 and ubuntu-24.04 to see if there's something to do on our side, or if it's an issue in the new image version. I've opened this ticket for tracking.

MGaetan89 commented 2 weeks ago

I've reverted my change to the runner. See https://github.com/SRGSSR/pillarbox-android/issues/747#issuecomment-2410190157