![]() |
|
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
|
||||
|
||||
GetSeriesID not working on Sage 9
I have noticed that I am not getting the seriesID back when I am running on Sage 9(9.0.8.429) with Java Version 1.7.0_79. The code I am using is (sorry I don't know how to keep the forum post from formatting the code)
Object files[]; files = MediaFileAPI.GetMediaFiles("DT"); if (files != null) { for(int x=0; x < files.length; x++) { Object mediafile = files[x]; Object airing = MediaFileAPI.GetMediaFileAiring(mediafile); Object show = AiringAPI.GetShow(airing); Object seriesInfo = ShowAPI.GetShowSeriesInfo(show); if (seriesInfo != null) { String seriesID = SeriesInfoAPI.GetSeriesID(seriesInfo); The seriesID is coming back "0" for every media item when running on Sage 9. If I run the same code on my older server with Sage 7 then I get the seriesID. I am not sure if its an issue with sagex or with Sagetv. Thanks! David Last edited by davidb; 10-09-2016 at 02:39 PM. |
#2
|
||||
|
||||
Quote:
Code:
Object files[]; files = MediaFileAPI.GetMediaFiles("DT"); if (files != null) { for(int x=0; x < files.length; x++) { Object mediafile = files[x]; Object airing = MediaFileAPI.GetMediaFileAiring(mediafile); Object show = AiringAPI.GetShow(airing); Object seriesInfo = ShowAPI.GetShowSeriesInfo(show); if (seriesInfo != null) { String seriesID = SeriesInfoAPI.GetSeriesID(seriesInfo);
__________________
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 |
#3
|
|||
|
|||
I wonder if this is the same issue i raised back in Feb
here..... It was not resolved as far as i know but i moved on to other items at the time. k
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page |
#4
|
||||
|
||||
Yes it sure looks like the same issue! It should be an easy fix as the STV is able to get the seriesID info. I hope someone with more java experience than I can look at it. I am writing most of my server side code in c# and am least comfortable with java.
David Quote:
|
#5
|
|||
|
|||
I am curious about this issue as well. Do you notice that the series id is also not set for the item (like when browsing via BMT) That's what I am noticing. Of course my samples are all imported but I do have guide data and a tuner.
Regardless as a "temp" but messy solution I do this to get the series information Code:
public static Object getSetMissingSeries(Object sObj) { Object rSeries = new Object(); String mTitle= phoenix.metadata.GetMediaTitle(sObj); for(Object series:sagex.api.SeriesInfoAPI.GetAllSeriesInfo()) { String sTitle=sagex.api.SeriesInfoAPI.GetSeriesTitle(series); if(sTitle.equals(mTitle)) { rSeries=series; break; } } return rSeries; } } |
#6
|
||||
|
||||
OK, I know what happened here. I've submitted a change to resolve it which shouldn't have any negative impact.
__________________
Jeffrey Kardatzke Founder of SageTV |
#7
|
|||
|
|||
Unfortunately mine are still not being set. I am not sure if its BMT or sage. Narflex is there a way to set the id's myself once I find them by looping through?
|
#8
|
||||
|
||||
No, you can't set the IDs for a SeriesInfo object in the database because it's using those as keys for indexing. If you use the latest code though the GetSeriesID method should be returning non-zero values...is it not?
__________________
Jeffrey Kardatzke Founder of SageTV |
#9
|
||||
|
||||
I am currently using SageTV version 9.1.5.683 and still using the code in the first message to get the SeriesID. My current sagetv has 30 episodes of the Hallmark channel "When Calls the Heart" series and the stv is grouping them all together. However when I run the above code I am getting 27 episodes with one SeriesID and 3 episodes with another SeriesID. I am using the SeriesID for my app to group series epiosodes together. Both seriesID's are greater than 0. Any idea if it's an issue on my code or is this an issue on the sagetv side?
Thanks David |
#10
|
||||
|
||||
Quote:
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#11
|
||||
|
||||
Quote:
Edit: The code doesn't go into the Wizard to see if a SeriesInfo entry already exists, so that could be an improvement I guess.
__________________
SageTV v9 Server: ASRock Z97 Extreme4, Intel i7-4790K @ 4.4Ghz, 32GB RAM, 6x 3TB 7200rpm HD, 2x 5TB 7200rpm HD, 2x 6TB 7200rpm HD, 4x 256GB SSD, 4x 500GB SSD, unRAID Pro 6.7.2 (Dual Parity + SSD Cache). Capture: 1x Ceton InfiniTV 4 (ClearQAM), 2x Ceton InfiniTV 6, 1x BM1000-HDMI, 1x BM3500-HDMI. Clients: 1x HD300 (Living Room), 1x HD200 (Master Bedroom). Software: OpenDCT :: WMC Live TV Tuner :: Schedules Direct EPG Last edited by EnterNoEscape; 03-05-2018 at 07:07 PM. |
#12
|
||||
|
||||
Quote:
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#13
|
||||
|
||||
I am not sure if the problems I was having with GetSeriesID had to do with the fact that some episodes were recorded with sage7 with the sage epg and some with the sage9 with schedules direct.
I gave up on using GetSeriesID as I was getting one non zero seriesID for 27 episodes and a different non zero seriesID for 3 episodes. Thanks to a private message from EnterNoEscape I am now using the ShowExternalID. It will return a value like "EP015474730074". I strip off the first two left most characters "EP" and then convert to an integer. This is what appears to be a unique number for the series and the 4 least significant digits the episode number. I take that number and and with with 0xffff to get the episode number. Next I right shift by 4 to get a unique number for the series. |
#14
|
||||
|
||||
Quote:
![]()
__________________
Jeffrey Kardatzke Founder of SageTV |
#15
|
||||
|
||||
If it comes back to you, I would really like to know under what circumstances this doesn't work. The only thought I have is if the series has more than one "ID" which I guess could happen if they reach 9999 episodes?
__________________
SageTV v9 Server: ASRock Z97 Extreme4, Intel i7-4790K @ 4.4Ghz, 32GB RAM, 6x 3TB 7200rpm HD, 2x 5TB 7200rpm HD, 2x 6TB 7200rpm HD, 4x 256GB SSD, 4x 500GB SSD, unRAID Pro 6.7.2 (Dual Parity + SSD Cache). Capture: 1x Ceton InfiniTV 4 (ClearQAM), 2x Ceton InfiniTV 6, 1x BM1000-HDMI, 1x BM3500-HDMI. Clients: 1x HD300 (Living Room), 1x HD200 (Master Bedroom). Software: OpenDCT :: WMC Live TV Tuner :: Schedules Direct EPG |
#16
|
||||
|
||||
I have reworked my code to use the ShowExternalID as described a few posts above as a "seriesID" and now all of my shows are grouping properly. The frustrating thing was GetSeriesID was so "close" to right but ShowExternalID worked for me in grouping all of my episodes in a series. To anyone lurking BEWARE if you use GetSeriesID to "attempt" to group all episodes for a series!
I am not sure if the api docs are auto generated or if there is a way to put a note about this in the GetSeriesID or not. David |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
SAGE DCT x64 2.2.0 is not working | mguebert | Hardware Support | 6 | 03-30-2012 06:36 PM |
Sage just isn't working out for me.. | meep | SageTV Software | 23 | 01-17-2009 05:47 PM |
ATI HDTV Wonder Not Working w/ Sage | jsidlosky | SageTV Beta Test Software | 1 | 10-02-2005 10:04 PM |
Sage TV listings not working? | jkaisre | SageTV EPG Service | 5 | 10-04-2003 05:25 PM |
dtv to sage not working | IKK | SageTV Software | 1 | 08-02-2003 05:01 AM |