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
[PVR][guiinfo] Videofullscreen/Musicvisualisation: Direct channel number input #11434
[PVR][guiinfo] Videofullscreen/Musicvisualisation: Direct channel number input #11434
Conversation
thanx for the heads-up! |
@@ -1411,7 +1411,7 @@ | |||
</setting> | |||
<setting id="pvrplayback.confirmchannelswitch" type="boolean" label="19281" help="36231"> | |||
<level>1</level> | |||
<default>false</default> | |||
<default>true</default> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Isn't there a button in the OSD during full screen playback which used to open the numpad? AFAIK it was only for users with limited remotes. |
The button was "1" to "9", which does not help for remotes without these keys. |
@ksooo I mean a GUI button in the OSD. |
if there is such a GUI button i don't know it. |
@@ -603,6 +604,12 @@ namespace PVR | |||
*/ | |||
void PublishEvent(PVREvent state); | |||
|
|||
/*! | |||
* @brief Get the nmeric channel input handler. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
CSingleLock lock(m_critSection); | ||
|
||
if (iDigit == 0 && m_digits.size() == 0) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
if (m_digits.size() != m_iDigits || GetChannel() > 0) | ||
{ | ||
for (int digit : m_digits) | ||
m_strChannel.append(std::to_string(digit)); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
jenkins build this please |
8d5c1c4
to
35c5b15
Compare
@Jalle19 all changes you requested are in. good to go? |
namespace PVR | ||
{ | ||
|
||
CPVRNumericChannelInputHandler::CPVRNumericChannelInputHandler(int iDigits, int iSwitchDelay) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
return iNumber; | ||
} | ||
|
||
std::string CPVRNumericChannelInputHandler::GetChannelAsString() const |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Looks good and makes sense because the numric input dialog can only be reached by the numpad of a remote and then you will never use the numeric controls of the dialog. |
35c5b15
to
ab840a0
Compare
@xhaggi requested changes are in. |
jenkins build this please |
Thanks, that was fast :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from these +1, I don't really have an opinion on the setting default change
if (m_digits.size() != m_iDigits || GetChannelNumber() > 0) | ||
{ | ||
for (int digit : m_digits) | ||
m_strChannel.append(StringUtils::Format("%d", digit)); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
{ | ||
|
||
CPVRChannelNumberInputHandler::CPVRChannelNumberInputHandler(int iDigits, int iSwitchDelay) | ||
: m_iDigits(iDigits), |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -162,7 +163,8 @@ CPVRManager::CPVRManager(void) : | |||
m_bEpgsCreated(false), | |||
m_progressHandle(NULL), | |||
m_managerState(ManagerStateStopped), | |||
m_isChannelPreview(false) | |||
m_isChannelPreview(false), | |||
m_channelNumberInputHandler(4 /* digits */, g_advancedSettings.m_iPVRNumericChannelSwitchTimeout) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
ab840a0
to
ccaf719
Compare
@Jalle19 all of the changes you requested are now in. thanks for the review. |
ccaf719
to
9e15960
Compare
jenkins build this please |
ok, I tested this PR a bit with latest Milhouse build and found some issues.
Then I was wondering about if we could probably use the channel switch delay setting for the delay of the numeric input instead of an advanced setting. IIRC this setting is currently only used when pressing up/down in the OSD and not for channelUp/channelDown actions. Just a thought. |
Confirming the radio channel bug. Will have look. The other pvr windows suggestion is for another PR. This is simply not part of this iteration. Using the official setting instead of the advanced setting (that we were also using here before for whatever reason, btw) makes sense. EDIT: On second thought, using the official channel switch delay setting makes no sense at it serves a different purpose, imo. The advanced setting is for adjusting the time between the last key press and the actual switch. This generally will usually never be more than 3 seconds, i guess. Compared to this, the official setting is for delay between up/down press followed by immediate display of next/prev channel epg data and the delayed actual switch. Thus, the value depends on how fast people can read the epg data, which could be easily more than 3 seconds, for slower people. So, I guess people might want really different values for the twi use case and think it is fine as it is now. EDIT2: Radio channel input (other numbers than 1) works fine on my Mac, but not on my custom LibreELEC build. How I hate platform dependent issues! |
btw, thanks sooooo much for this PR. I think I owe you a brewery by now ;) |
Seems to be a remote vs. keyboard config issue problem. When using a keyboard, numbers other than 0 and 1 also work on LibreELEC. Strange. |
9e15960
to
efabcb3
Compare
thought about this feature some more. I think it might be good if the "back" action could also abort the number input process. What do you think? edit: as for the numeric input. I just saw your fix by also listening to JUMPSMS. The correct fix IMO would be to adjust the remote.xml keymap so that the keys send NUMBER[X] instead of JUMPSMS[X] action, because this mapping seems to be missing for PVR windows from a quick look at the keymap file edit2: I think the mapping has to be added to the |
efabcb3
to
c0d8714
Compare
maybe later.
both is needed, to be on the "save" side. |
jenkins build this please |
…, no longer for direct channel number input. the latter will always auto switch after the value of 'channel switch delay'.
c0d8714
to
43e86a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More complicated than the previous implementation, but hey, if it works...
@@ -45,6 +44,7 @@ using namespace EPG; | |||
|
|||
CGUIWindowPVRGuide::CGUIWindowPVRGuide(bool bRadio) : | |||
CGUIWindowPVRBase(bRadio, bRadio ? WINDOW_RADIO_GUIDE : WINDOW_TV_GUIDE, "MyPVRGuide.xml"), | |||
CPVRChannelNumberInputHandler(1000), |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
I think we should drop the JumpSMS stuff now that we found the root cause of it not working on radio channels. |
@@ -1,11 +1,23 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<window> | |||
<visible>[[Player.Seeking | Player.DisplayAfterSeek | [Player.Paused + !Player.Caching] | Player.Forwarding | Player.Rewinding | Player.ShowInfo | Window.IsActive(fullscreeninfo) | Window.IsActive(videoosd) | Window.IsActive(playerprocessinfo)] + Window.IsActive(fullscreenvideo)] | Window.IsActive(visualisation) | !String.IsEmpty(Player.SeekNumeric)</visible> | |||
<visible>[[Player.Seeking | Player.DisplayAfterSeek | [Player.Paused + !Player.Caching] | Player.Forwarding | Player.Rewinding | Player.ShowInfo | Window.IsActive(fullscreeninfo) | Window.IsActive(videoosd) | Window.IsActive(playerprocessinfo)] + Window.IsActive(fullscreenvideo)] | Window.IsActive(visualisation) | !String.IsEmpty(Player.SeekNumeric) | !String.IsEmpty(PVR.ChannelNumberInput)</visible> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Nope. Currently not needed, but correct nevertheless. |
Not really; just factored out a base class of what we had before to reuse the code for three different use cases (before it was only one). |
it's two different things, isn't it? JumpSMS is about jumping by name while numeric input is jumping by number. But up to you. |
e872535
to
3288734
Compare
… pvr core changes, new guiinfo label
… fix remote keymap numeric key definitions
jenkins build this please |
jenkins error is unrelated |
thanks a lot, huge improvement |
Instead of opening the numeric input dialog when pressing 0 - 9 while in PVR fullscreen or PVR music visualisation, now only the entered number appears on screen, like this works for almost all other tv sets and settop boxes.
2 seconds (existing advancedsettings value!) after the last digit was entered, Kodi will automatically switch to the channel with the entered number.
Entering an invalid number will be ignored and nothing will happen.
Entering more than 4 digits results in left-shifting the previously entered digits, discarding the oldest digit, and appending the just entered number.
Largest supported channel number is 9999.
Entering 4 zeros in a row will immediately end direct channel number input.
This PR was tested on latest Kodi master on Linux and macOS.
@da-anda fyi
@phil65 already reviewed the skin change
@ronie: skins must be adjusted to use the new info label PVR.ChannelNumberInput. Otherwise the feature will also work, but nothing will be seen on the screen while entering the number.
@Jalle19 for review?