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

[BUG] Schedule date/time shows 0 #138

Closed
toddstar opened this issue Jan 12, 2023 · 8 comments
Closed

[BUG] Schedule date/time shows 0 #138

toddstar opened this issue Jan 12, 2023 · 8 comments
Labels
Bug Something isn't working

Comments

@toddstar
Copy link

Is your feature request related to a problem? Please describe.

Somehow my sky box is reporting that my next scheduled recording is Unix time 0

Screenshot_20230112-145507_Home Assistant

And short of factory resetting my box I can't see how to clear it; I've got zero actual scheduled recordings for that show, been through the TV guide to find all the times it's on and done a series link and unlink but still isn't clearing it.

Describe the solution you'd like
Assuming you get an array of next recordings (rather than just a single result) can you add a check so that scheduled end time must be equal or greater than now() and any that are older are ignored and it moves onto checking & listing the next recording where end time is greater than now()

Describe alternatives you've considered
Think now() should be fine but could go extra safe by just doing a date check and have anything that ended yesterday be ignored

P.S.
If anyone has any ideas for how to clear it on the sky box I'd be extremely grateful (although think it'd still be a worth while update to the code)

@toddstar toddstar added the Feature Request New feature or request label Jan 12, 2023
@RogerSelwyn RogerSelwyn changed the title Add a date/time check for scheduled start / end [BUG] Schedule date/time shows 0 Jan 12, 2023
@RogerSelwyn
Copy link
Owner

If anyone has any ideas for how to clear it on the sky box I'd be extremely grateful (although think it'd still be a worth while update to the code)

Sorry not sure what you mean by clear it.

In any case can you run this against your box and post the response (which may be long), or at least the first instance of an item that shows as a Status of SCHEDULED, ideally for the item that is giving a 0 response.

http://192.168.1.122:9006/as/pvr/?limit=1000&offset=0

@RogerSelwyn RogerSelwyn added Bug Something isn't working and removed Feature Request New feature or request labels Jan 12, 2023
@toddstar
Copy link
Author

toddstar commented Jan 12, 2023

Cropped results below, it's a failed download that was causing the erroneous next scheduled time. Once that was cancelled my next scheduled recording has changed to 7pm (1673550000) for 'House of games'

{
      "at": "S",
      "carating": "U",
      "cn": "Sky History",
      "downloadlink": "oig:\/\/ff7d4e78",
      "eg": 5,
      "episodenumber": 19,
      "esg": 6,
      "et": "HD",
      "fr": "Remote network problem",
      "hd": true,
      "lto": 0,
      "predictedsz": 1176309,
      "programmeuuid": "cbd716c5-847d-4eab-9784-ec54d5b73af0",
      "pvrid": "P2903eb47",
      "schd": 1440,
      "seasonnumber": 2,
      "seasonuuid": "320f2955-6994-4f2d-9df5-676f57e77535",
      "seriesuuid": "d75f9f32-c7bd-4383-b82f-ff798450d824",
      "src": "VOD",
      "status": "DOWNLOADING",
      "sy": "Bigfoot's Death Cry And Bird On Mars: Experts investigate the theory that Bigfoot makes sounds that can make people sick, and examine images captured by NASA on Mars. (S2, ep 19)",
      "t": "The Proof Is Out There",
      "tso": 4,
      "vodprogrammeid": 8565128,
      "w": true
    },
    {
      "at": "M",
      "c": "111",
      "canl": true,
      "cn": "Dave HD",
      "eg": 3,
      "episodenumber": 59,
      "esg": 5,
      "et": "HD",
      "hd": true,
      "lto": 0,
      "oeid": "Eee1-1cc",
      "osid": "3809",
      "osk": 3809,
      "predictedsz": 3379200,
      "programmeuuid": "d0c9e4b5-fda8-40a5-857c-26217e738d21",
      "pvrid": "P2904180b",
      "s": true,
      "schd": 2400,
      "seasonnumber": 4,
      "seasonuuid": "d99d82e3-2fd0-4baa-a6d8-b458186ffe3c",
      "seriesuuid": "4bd96fbf-db6d-4e03-a83a-a1f6bae2bf20",
      "slo": true,
      "src": "LIVE",
      "st": 1673550000,
      "status": "SCHEDULED",
      "sy": "New. TV presenter Charlotte Hawkins and comedians David Baddiel, Alex Brooker, and Sophie Duker test themselves against the best-selling author and Pointless friend's fiendish games. S4 Ep59",
      "t": "Richard Osman's House of Games",
      "w": true
    },

@RogerSelwyn
Copy link
Owner

Looks like I need to exclude items that have failed downloading. I imagine that deleting that item and then making sure it is removed from the deleted items should clear it.

@RogerSelwyn
Copy link
Owner

@toddstar just got a chance to look at this. To be honest from the extract you provided I can't see why you got that error because I filter for SCHEDULED and RECORDING, and that one shows as DOWNLOADING.

Do you still have the problem, and if so can you check if there is another instance of the program that shows as SCHEDULED?

@toddstar
Copy link
Author

toddstar commented Jan 17, 2023 via email

@toddstar
Copy link
Author

toddstar commented Jan 17, 2023

@toddstar just got a chance to look at this. To be honest from the extract you provided I can't see why you got that error because I filter for SCHEDULED and RECORDING, and that one shows as DOWNLOADING.

Do you still have the problem, and if so can you check if there is another instance of the program that shows as SCHEDULED?

I've found the issue. (altho not sure what happened with first set of data*)

Downloads that haven't started yet, or indeed go from failed to back into the download queue, also have the SCHEDULED status so these can be picked up as next recording.

e.g.
1 failed download but next recording was still fine

      {
         "at" : "DD",
         "carating" : "PG",
         "cn" : "Sky Documentaries",
         "downloadlink" : "oig://ff75e87d",
         "eg" : 3,
         "episodenumber" : 2,
         "esg" : 11,
         "et" : "HD",
         "fr" : "Remote network problem",
         "hd" : true,
         "lto" : 0,
         "predictedsz" : 4766093,
         "programmeuuid" : "1efb40e3-e0e0-459e-9d63-ec55f1b63d26",
         "pvrid" : "P2904605b",
         "r" : "PG",
         "s" : true,
         "schd" : 3060,
         "seasonnumber" : 1,
         "seasonuuid" : "32080ad7-d4c7-445c-aed3-a0bc757839fb",
         "seriesuuid" : "b1273791-0581-450b-b0bc-63add78f68f0",
         "src" : "VOD",
         "status" : "DOWNLOADING",
         "sy" : "...Transfer Window. New & Exclusive. As deadline day nears, Sasa KalajdZic considers Manchester United, Spurs cling on to Japhet Tanganga and Fabian Ruiz's dream hits a hurdle. (2 of 4)",
         "t" : "Deadline Day: Football's...",
         "vodprogrammeid" : 9049987,
         "w" : true				   
      }
   ],
   "totalPvrItems" : 97,
   "version" : 11556
}

tried to download the same show that failed before

      {
         "at" : "DD",
         "carating" : "PG",
         "cn" : "Sky Documentaries",
         "downloadlink" : "oig://ff75e87d",
         "eg" : 3,
         "episodenumber" : 2,
         "esg" : 11,
         "et" : "HD",
         "fr" : "Remote network problem",
         "hd" : true,
         "lto" : 0,
         "predictedsz" : 4766093,
         "programmeuuid" : "1efb40e3-e0e0-459e-9d63-ec55f1b63d26",
         "pvrid" : "P2904605b",
         "r" : "PG",
         "s" : true,
         "schd" : 3060,
         "seasonnumber" : 1,
         "seasonuuid" : "32080ad7-d4c7-445c-aed3-a0bc757839fb",
         "seriesuuid" : "b1273791-0581-450b-b0bc-63add78f68f0",
         "src" : "VOD",
         "status" : "SCHEDULED",
         "sy" : "...Transfer Window. New & Exclusive. As deadline day nears, Sasa KalajdZic considers Manchester United, Spurs cling on to Japhet Tanganga and Fabian Ruiz's dream hits a hurdle. (2 of 4)",
         "t" : "Deadline Day: Football's...",
         "vodprogrammeid" : 9049987,
         "w" : true
      },
      {
         "at" : "S",
         "carating" : "PG",
         "cn" : "Sky History",
         "downloadlink" : "oig://ff7d4e78",
         "eg" : 5,
         "episodenumber" : 19,
         "esg" : 6,
         "et" : "HD",
         "fr" : "Remote network problem",
         "hd" : true,
         "lto" : 0,
         "predictedsz" : 1176309,
         "programmeuuid" : "cbd716c5-847d-4eab-9784-ec54d5b73af0",
         "pvrid" : "P29046533",
         "schd" : 1440,
         "seasonnumber" : 2,
         "seasonuuid" : "320f2955-6994-4f2d-9df5-676f57e77535",
         "seriesuuid" : "d75f9f32-c7bd-4383-b82f-ff798450d824",
         "src" : "VOD",
         "status" : "SCHEDULED",
         "sy" : "Bigfoot's Death Cry And Bird On Mars: Experts investigate the theory that Bigfoot makes sounds that can make people sick, and examine images captured by NASA on Mars. (S2, ep 19)",
         "t" : "The Proof Is Out There",
         "tso" : 4,
         "vodprogrammeid" : 8565128,
         "w" : true
      }
   ],
   "totalPvrItems" : 98,
   "version" : 12574

'Deadline Day: Football' has now gone from downloading to scheduled and is now showing as my next recording

Screenshot 2023-01-17 153457

deleting these go back to the correct show

Screenshot 2023-01-17 154435

(was also able to get similar results but just downloading two large movies, the next scheduled is the second movie waiting to be downloaded)

so think easiest check is just to make sure "st" isn't null

*only think I noticed from the actual sky box is the failed download seem to rapidly try restart so assume swaps between schedule and downloading quickly but this seem to stop after 5/10 seconds so may just have been luck / unlucky to get downloading state.

@RogerSelwyn
Copy link
Owner

Maybe be easier to check src and ignore items with VOD.

@RogerSelwyn
Copy link
Owner

Fixed with - https://github.com/RogerSelwyn/Home_Assistant_SkyQ_MediaPlayer/releases/tag/v2.10.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants