Open oxyroid opened 1 month ago
Relation Code: https://github.com/oxyroid/M3UAndroid/blob/master/data/src/main/java/com/m3u/data/database/dao/ProgrammeDao.kt#L23-L35 https://github.com/oxyroid/M3UAndroid/blob/master/data/src/main/java/com/m3u/data/database/model/Programme.kt https://github.com/oxyroid/M3UAndroid/blob/master/data/src/main/java/com/m3u/data/database/model/Playlist.kt#L54-L57 https://github.com/oxyroid/M3UAndroid/blob/master/data/src/main/java/com/m3u/data/database/model/Channel.kt#L54-L66 https://github.com/oxyroid/M3UAndroid/blob/master/data/src/main/java/com/m3u/data/repository/programme/ProgrammeRepositoryImpl.kt#L52-L74 https://github.com/oxyroid/M3UAndroid/blob/master/feature/channel/src/main/java/com/m3u/feature/channel/ChannelViewModel.kt#L281-L336 https://github.com/oxyroid/M3UAndroid/blob/master/feature/channel/src/main/java/com/m3u/feature/channel/components/ProgrammeGuide.kt#L216-L231
Describe the bug Currently, user can select multiple EPG sources for each playlist.
There are programmes in each channel of the playlist from different EPG sources after syncing programmes. The time range of the matched programmes may be very large, and the ProgrammeGuide component will try to draw a very large height rect in the canvas to place the component max height to keep the nice appearance.
Compose failed to measure such large height rect.
https://github.com/oxyroid/M3UAndroid/blob/master/feature/channel/src/main/java/com/m3u/feature/channel/components/ProgrammeGuide.kt#L216-L231
We can just remove the placed rect but it has not been completely solved. There may be quite a bit of blank space between programs from different EPG sources.
We can change the strategy of matching programs from diff EPG source. We want to add a new concept called Matching Priority in playlist and EPG source association. User can drag the selected EPG source to change the priority in order to we can at most show programs from one EPG source which contains valid programs.
To Reproduce Steps to reproduce the behavior:
Expected behavior The component can at most show programmes from one EPG source which contains valid programmes and there is no measure error.