xbmc / xbmc

Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS, tvOS and Windows.
https://kodi.tv/
Other
18.53k stars 6.3k forks source link

Nexus: ListItem.TimerIsActive returns always false #21999

Open b-jesch opened 2 years ago

b-jesch commented 2 years ago

Bug report

The bool condition "ListItem.TimerIsActive" returns always false. This has worked on Matrix (v19)

Describe the bug

As the condition returns an incorrect value, it's not possible to decide between active and disabled timers or schedules. This has worked on matrix.

Expected Behavior

Has to return a true/false as expected if a timer is enabled or disabled ;)

See above.

Your Environment

Used Operating system:

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required. Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

ksooo commented 2 years ago

Which PVR add-on (incl. version) and backend (incl. version) are you using?

ksooo commented 2 years ago

Has to return a true/false as expected if a timer is enabled or disabled ;)

That's not the exact purpose of this list item. It returns true (and this has not changed for Nexus), if:

  return m_state == PVR_TIMER_STATE_SCHEDULED
    || m_state == PVR_TIMER_STATE_RECORDING
    || m_state == PVR_TIMER_STATE_CONFLICT_OK
    || m_state == PVR_TIMER_STATE_CONFLICT_NOK
    || m_state == PVR_TIMER_STATE_ERROR;
ksooo commented 2 years ago

What you are looking for seems is to check PVR_TIMER_STATE_DISABLED, but there is currently no GUIInfo bool for that.

b-jesch commented 2 years ago

Im using TVHeadend 4.3-1979~g8fc2dfa on a dedicated Ubuntu Server (16.04.7) running on a net client (futro-s550). PVR Addon is "Tvheadend HTSP Client 20.5.0.2". Determinig the appropiate label for displaying the timer status is done by a variable PVRStatusImageVar which is very similar to PVRTimerIcon used in Estuary (but not used in my skin).

https://github.com/b-jesch/skin.estuary.modv2/blob/8554eb3dca6f4138f4467ac9a4033fde58f601f2/xml/Variables.xml#L1110-L1127

This variable works as expected in Matrix. For Nexus I have implemented a workaround which use a label ListItem.Comment (!) in MyPVRTimers.xml which is signaling an active or inactive timer ($LOCALIZE[305]):

https://github.com/b-jesch/skin.estuary.modv2/blob/9b06c3cea27e285a6f86b5b11f0e4348d475486e/xml/Variables.xml#L1110-L1127

Only with this workaround the displayed Icon is correct.

screenshot00002

On the screenshot (Nexus) You see from left a reminder, an enabled (active) schedule, an enabled single timer, an inactive (disabled) schedule and on the right at least an active schedule.

b-jesch commented 2 years ago

What you are looking for seems is to check PVR_TIMER_STATE_DISABLED, but there is currently no GUIInfo bool for that.

Maybe the best choice to introduce such a info bool...

ksooo commented 2 years ago

Maybe the best choice to introduce such a info bool...

I agree. Somebody needs to step up and do the work. ;-)

ksooo commented 2 years ago

This variable works as expected in Matrix.

Then, something must have changed, but this is really hard to track down, as the skin variables (both Estuary and yours) are a bit "crowded". Not sure it worked by luck only in Matrix and now something was fixed, or if something broke in Nexus.

ksooo commented 2 years ago

To conclude: I currently know no (clean) way to determine whether a timer is enabled/disabled.

github-actions[bot] commented 3 months ago

This issue is now marked stale because it has been open over a year without activity. Remove the stale label or add a comment to reset the stale state.