Use this forum to discuss issues related to the SD-JSON service.
purplebottle
Posts: 4 Joined: Mon Sep 21, 2020 9:26 pm
Post
by purplebottle » Mon Sep 21, 2020 9:48 pm
After today's small outage it seems the StationID for the schedules endpoint has changed to an integer which seems to have broken my schedule downloader
Code: Select all
curl -s -XPOST -H "token: HIDDEN" -H "Content-Type: application/json" -d '[{"stationID":"16604"}]' https://json.schedulesdirect.org/20141201/schedules | jq
[
{
"stationID": 16604, <-------
"programs": [
{
"programID": "EP022124660353",
"airDateTime": "2020-09-22T00:00:00Z",
"duration": 7200,
From the documentation it seems a string should be expected?
https://github.com/SchedulesDirect/JSON ... stationids
stationID - max 12 characters. Mandatory. This is a string, and your code must not treat it as an integer. Provides information to the grabber regarding the stationID that this schedule is for.
rkulagow
SD Staff
Posts: 934 Joined: Tue Aug 14, 2007 3:15 pm
Post
by rkulagow » Tue Sep 22, 2020 10:11 am
That's a regression in the code. I'm fixing it now and re-building the schedules.
rkulagow
SD Staff
Posts: 934 Joined: Tue Aug 14, 2007 3:15 pm
Post
by rkulagow » Tue Sep 22, 2020 10:56 am
Schedules have been rebuilt.
ombre33
Posts: 3 Joined: Mon Sep 21, 2020 12:19 pm
Post
by ombre33 » Tue Sep 22, 2020 11:26 am
Hi,
thank you, but I still get the same error from my grabber as I mentioned in the other thread:
Code: Select all
2020/09/22 20:24:46 [URL ] https://json.schedulesdirect.org/20141201/status
2020/09/22 20:24:47 [SD ] Account Expires: 2021-05-08 12:45:40 +0000 UTC
2020/09/22 20:24:47 [SD ] Lineups: 2 / 4
2020/09/22 20:24:47 [SD ] System Status: Online [No known issues.]
2020/09/22 20:24:47 [G2G ] Channels: 52
2020/09/22 20:24:47 [URL ] https://json.schedulesdirect.org/20141201/lineups/DEU-1001951-DEFAULT
2020/09/22 20:24:47 [URL ] https://json.schedulesdirect.org/20141201/lineups/ZZZ-19.2E-DEFAULT
2020/09/22 20:24:47 [G2G ] Download Schedule: 10 Day(s)
2020/09/22 20:24:47 [URL ] https://json.schedulesdirect.org/20141201/schedules
2020/09/22 20:24:49 [ERROR] json: cannot unmarshal number into Go struct field SDSchedule.stationID of type string
2020/09/22 20:24:49 [G2G ] Download Program Informations: New: 0 / Cached: 0
2020/09/22 20:24:49 [G2G ] Download missing Metadata: 0
2020/09/22 20:24:49 [G2G ] Create XMLTV File [/guide2go/schedulesdirect.xml]
2020/09/22 20:24:49 [G2G ] Clean up Cache [/guide2go/schedulesdirect_cache.json]
2020/09/22 20:24:49 [G2G ] Deleted Program Informations: 0
rkulagow
SD Staff
Posts: 934 Joined: Tue Aug 14, 2007 3:15 pm
Post
by rkulagow » Tue Sep 22, 2020 11:32 am
Is the issue with stationID 16604? I just checked on the server, and all of the schedules now have strings for the stationID, like they're supposed to.
purplebottle
Posts: 4 Joined: Mon Sep 21, 2020 9:26 pm
Post
by purplebottle » Tue Sep 22, 2020 11:38 am
ID 16604 now seems to be returned as a string as expected.
I just tried for a different ID and that seems to come back as an integer.
Code: Select all
$ curl -s -X POST -H "token:HIDDEN" -H "Content-Type: application/json" -d '[{"stationID":"33648"}]' https://json.schedulesdirect.org/20141201/schedules | jq
[
{
"stationID": 33648,
"programs": [
{
"programID": "EP014704950053",
"airDateTime": "2020-09-22T00:00:00Z",
"duration": 3600,
"md5": "cdSwk51f4utITIQxe7XW0A",
"audioProperties": [
"cc"
],
rkulagow
SD Staff
Posts: 934 Joined: Tue Aug 14, 2007 3:15 pm
Post
by rkulagow » Tue Sep 22, 2020 11:41 am
I'm going to re-rebuild the schedules to squash this bug.
rkulagow
SD Staff
Posts: 934 Joined: Tue Aug 14, 2007 3:15 pm
Post
by rkulagow » Tue Sep 22, 2020 12:45 pm
Schedules have been re-built.
purplebottle
Posts: 4 Joined: Mon Sep 21, 2020 9:26 pm
Post
by purplebottle » Tue Sep 22, 2020 1:05 pm
rkulagow wrote: ↑ Tue Sep 22, 2020 12:45 pm
Schedules have been re-built.
Thanks for looking into this matter. Of the 47 stations I pull in there are still 17 stations appearing as ints.
Code: Select all
"stationID": 24294
"stationID": 69974
"stationID": 87694
"stationID": 87710
"stationID": 87717
"stationID": 87722
"stationID": 87724
"stationID": 87730
"stationID": 87731
"stationID": 87734
"stationID": 87759
"stationID": 87764
"stationID": 87773
"stationID": 87781
"stationID": 87811
"stationID": 87812
"stationID": 99651