Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Split TV/Radio into separate main menus #386

Merged
merged 14 commits into from
Oct 29, 2021

Conversation

wutschel
Copy link
Collaborator

@wutschel wutschel commented Sep 5, 2021

Description

Closes #221.

Current Kodi server (v19) splits PVR into "TV" and "Radio" main menus. With this PR the Remote App now follows this principle as well. When entering TV or Radio menu, the full channel list is shown as default. In addition, it is possible to navigate through the channel groups, recordings and timers as before.

Menu structure (example based on Live TV): https://abload.de/img/bildschirmfoto2021-09a2kze.png

Summary for release notes

Feature: Split TV/Radio into separate main menus

@wutschel wutschel force-pushed the radio_menu branch 2 times, most recently from 195a64f to 4f90642 Compare September 6, 2021 08:43
@kambala-decapitator kambala-decapitator added this to the 1.8.1 milestone Sep 17, 2021
@wutschel wutschel force-pushed the radio_menu branch 2 times, most recently from 4b0ac64 to 32c81ac Compare September 19, 2021 13:34
@kambala-decapitator kambala-decapitator modified the milestones: 1.8.1, 1.8.2 Oct 2, 2021
@wutschel wutschel force-pushed the radio_menu branch 2 times, most recently from 9021df5 to d361a35 Compare October 3, 2021 18:08
@wutschel wutschel force-pushed the radio_menu branch 3 times, most recently from 1e08500 to 52546e4 Compare October 15, 2021 14:19
@wutschel wutschel force-pushed the radio_menu branch 2 times, most recently from fe52743 to c8d1e56 Compare October 22, 2021 05:23
Copy link
Collaborator

@kambala-decapitator kambala-decapitator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I skipped commits dd009c9, efb5421 and 6b6d38f.

With this change Kodi < 19 still behaves as before?

XBMC Remote/AppDelegate.m Outdated Show resolved Hide resolved
XBMC Remote/DetailViewController.m Outdated Show resolved Hide resolved
@wutschel
Copy link
Collaborator Author

With this change Kodi < 19 still behaves as before?

Valid question. The Split into Radio and TV is done for all versions. Thanks you asked and made me recheck as I now found an issue with adding the radio key to PVR.GetRecordings. This fails with Kodi 15 (JSON RPC v6), it needs to be removed in this case. This will result in showing all recordings in both TV and Radio submenu -- like it is done in the Kodi 15 UI as well. This is a bit unpleasant as PVR.GetRecording is working, but not even documented for JSON RPC v6. For any version before v6 there are no PVR methods documented and I expect that the Remote App always would try to request PVR, and always did.

Well, I cannot boil the ocean and will look at a more robust way to handle this for RPC v6 and higher.

@wutschel
Copy link
Collaborator Author

wutschel commented Oct 22, 2021

Update see below.

@wutschel
Copy link
Collaborator Author

wutschel commented Oct 22, 2021

Rebased to master.

@wutschel
Copy link
Collaborator Author

Tested with a lot of old versions (11, 12.3, 13.2, 14.2, 15.2, 16.1, 17.6, 18.4 and 19.1) and worked out the handling of PVR commands:

  1. xbmc 11: no PVR support at all
  2. xbmc 12: PVR support without recordings and timers
  3. xbmc 13 - kodi 16: PVR support with recordings (Radio/TV not seperated) and timers (Radio/TV seperated)
  4. Kodi 17: All recordings reported as "TV", timers have correct separate Radio/TV results
  5. Kodi 18: Recordings have correct separate Radio/TV results, all timers reported as "TV"
  6. Kodi 19 ff: Full API support (incl. "sort"), correct and separate handling of Radio + TV for recordings

It is a bit frustrating to see such inconsistent behaviour. I cannot rely solely on the API supporting a request, and the behaviour might even depend on the PVR add-on. I now decided to configure the feature as follows:

  • xbmc 11: no support for PVR at all, just showing empty results
  • xbmc 12: PVR support for separate channel lists and channel groups. No support for recordings and timers.
  • xbmc 13 - Kodi 18: PVR support for separate channel lists and channel groups. Common recordings and timers.
  • Kodi 19 ff: PVR support for separate channel lists, channel groups, recordings and timers.

As a result the Remote App supports TV and Radio separate channel lists and channel groups from xbmc 12 on. The behaviour for recordings and timers is the same as before (always showing the aggregated lists including both Radio and TV items) until Kodi 19. Only with Kodi 19 you get the full experience also showing filtered results for recordings and timers. At least this PR still gives a more direct access to Radio and TV channels instead of being required to do multiple clicks to get there.

@wutschel
Copy link
Collaborator Author

@kambala-decapitator, if you are generally fine with the code I will squash where possible and mark it as ready-for-review to allow merging it. I see no other way getting further test depth than to bring this to TF. Right after this one we can add the Video menu PR. It is partly building on top of this, but will need some rebasing.

Copy link
Collaborator

@kambala-decapitator kambala-decapitator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the approach and apart from minor requested changes looks good.

XBMC Remote/DetailViewController.m Outdated Show resolved Hide resolved
XBMC Remote/DetailViewController.m Outdated Show resolved Hide resolved
@wutschel
Copy link
Collaborator Author

I agree with the approach and apart from minor requested changes looks good.

Ok. I just submitted the fixups and will later today do the squashing and rebasing.

Important remark: The persistence depends on the API method and the parameters. As they are typically same for TV and Radio (the results are filtered later) the object "lifetime" is  commented out for Radio. This gives the required difference which now allows to have separate Radio and Live TV persistence.
@wutschel wutschel marked this pull request as ready for review October 28, 2021 17:21
@wutschel
Copy link
Collaborator Author

Squashed and rebased to master.

@kambala-decapitator kambala-decapitator merged commit dff7b7a into xbmc:master Oct 29, 2021
@wutschel wutschel deleted the radio_menu branch October 29, 2021 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Main menu items PVR
2 participants