![]() |
|
SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github. |
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
stationID: string or integer?
I'm going to be adding test data for Australia shortly to gauge user interest in feeds for AU and NZ.
However, there's a collision between the existing stationID values and the ones that I would have for those countries. In the API for the JSON service, stationID has always been sent as a string. Does Sage / the Open Source grabber maintain that stringification? If yes, then I will be able to use "AU18294" and "18294" to make sure that on the server those are unique schedule entities so that I don't need to maintain multiple databases. If no, then the grabber may need to strip the first two characters if they're not digits (because it's unlikely that a user will is going to use both AU data _and_ data for anywhere else that we currently have lineups and schedules.) |
#2
|
|||
|
|||
Looks like int in Channel.java:
Code:
stationID = in.readInt(); |
#3
|
||||
|
||||
Do you think you might look at doing UK data
__________________
Server: Win 10 64bit Core i3 8GB 20TB, TBS6985, TBS6984, Sage 9. Clients: 5 x HD300, 2 x HD200, Placeshifter. |
#4
|
||||
|
||||
We've had UK data for quite a while on the JSON service. If you PM me your postal code I can let you know which lineups we have and a sample of the data.
Unless the grabber is hardcoded for US/Canada? |
#5
|
|||
|
|||
It should work with any country so long as the raw json data is in the same format as US/Canada.
It will definitely not work with any data where the stationid contains non-numeric characters. The Sage client to the data assumes that Interger.parseInt(airing.stationid) will "just work". If that doesn't, boom goes the dynamite.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#6
|
||||
|
||||
Good to know; I've asked a few other consumers of the JSON data, and they all treat the stationID as a string; Sage seems to be the exception, so if AU/NZ data moves forward then it may be something where the grabber needs to add/remove "AU" or "NZ" prior to sending the request so that it can continue to treat the remainder as an integer.
|
#7
|
||||
|
||||
Modifying the SageTV internals so that stationID is a String would not be all that complex to do.
![]()
__________________
Jeffrey Kardatzke Founder of SageTV |
#8
|
||||
|
||||
Likely the biggest issue would be dealing with the wiz.bin, as I'm guessing StationID is there in the Airings, right?
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#9
|
|||
|
|||
It's in Channel at a minimum. The snippet I posted is from the wiz.bin reading code.
|
#10
|
||||
|
||||
If there's going to be a limited number of String prefixes on stationIDs; then I'd just recommend creating a mapping of them to some higher values. So for example if it's AU12345, then map AU to be 100000000 and this one becomes 100012345. StationIDs are stored in 32 bit integers...so there's plenty of extra room in that field to encode a set of 2 character prefixes.
__________________
Jeffrey Kardatzke Founder of SageTV |
#11
|
||||
|
||||
Quote:
__________________
Server: Ryzen 2400G with integrated graphics, ASRock X470 Taichi Motherboard, HDMI output to Vizio 1080p LCD, Win10-64Bit (Professional), 16GB RAM Capture Devices (7 tuners): Colossus (x1), HDHR Prime (x2),USBUIRT (multi-zone) Source: Comcast/Xfinity X1 Cable Primary Client: Server Other Clients: (1) HD200, (1) HD300 Retired Equipment: MediaMVP, PVR150 (x2), PVR150MCE, HDHR, HVR-2250, HD-PVR |
#12
|
||||
|
||||
Quote:
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to shorten a string? | tmiranda | SageTV Studio | 6 | 10-10-2009 09:59 AM |
What is the best way to get the width in pixels of a string? | BobPhoenix | SageTV Studio | 4 | 12-16-2007 02:56 AM |
Studio String help | evilpenguin | SageTV Studio | 1 | 06-10-2006 08:55 PM |
OK to string tv splitters/boosters together? | jimbobuk | General Discussion | 5 | 05-16-2003 10:01 AM |