SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v9 Customizations

Notices

SageTV v9 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 9 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 9 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-10-2018, 04:40 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,805
Creating Show ExternalID

I'm working on a plugin to integrate Trakt.tv with Sage. One of the things I'd like to do is if a user watches a show on some other device mark the same show as watched on Sage. In the case where that show already exists on Sage it's pretty easy. In the case where it does not exist on Sage I need to use AddShow() to add a new Show/Airing Object to the wiz.bin.

My question is how do I generate a Show ExternalID that will match any future airing of that show? (Or does show ID matter?)

For example, if a user watches Breaking Bad on Netflix I want to create a Show on Sage so that if any time in the future Breaking Bad is aired on TV the episodes marked watched on NetFlix will appear as watched on Sage.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #2  
Old 10-10-2018, 09:24 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,541
Quote:
Originally Posted by tmiranda View Post
I'm working on a plugin to integrate Trakt.tv with Sage. One of the things I'd like to do is if a user watches a show on some other device mark the same show as watched on Sage. In the case where that show already exists on Sage it's pretty easy. In the case where it does not exist on Sage I need to use AddShow() to add a new Show/Airing Object to the wiz.bin.

My question is how do I generate a Show ExternalID that will match any future airing of that show? (Or does show ID matter?)

For example, if a user watches Breaking Bad on Netflix I want to create a Show on Sage so that if any time in the future Breaking Bad is aired on TV the episodes marked watched on NetFlix will appear as watched on Sage.
Personally if the show can't be found in sagetv, then I'd skip it. There won't be a reliable way for you to do this manually (ie, create the AiringID that sagetv would eventually use for that airing). Plus, it'll potentially add lots of shows and airings to the Wiz.bin, that might never originate from a recording. (ie, if I sync my netflix status to Trakt and then to Sage, then sage will get lots of shows that it would never otherwise have known about.
Reply With Quote
  #3  
Old 10-10-2018, 11:46 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,805
Quote:
Originally Posted by stuckless View Post
Personally if the show can't be found in sagetv, then I'd skip it.
That makes my life simpler.

I thought you'd want this functionality. If you don't think it's necessary then I'll skip it.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #4  
Old 10-10-2018, 12:25 PM
Tiki's Avatar
Tiki Tiki is offline
Sage Icon
 
Join Date: Feb 2005
Location: Southwest Florida, USA
Posts: 1,806
Quote:
Originally Posted by tmiranda View Post
That makes my life simpler.

I thought you'd want this functionality. If you don't think it's necessary then I'll skip it.
Iím guessing this sync routine will be run periodically (maybe a few times per day)? In that case if the missing episode does show up in Sageís EPG data at some time in the future, the watched status should transfer over then (and Sage will know that it doesnít need to record it since you already watched it somewhere else).
__________________
Server: Athlon II X4 630 CPU, Gigabyte MA770T-UD3P (AM3) Motherboard, VisionTek Radeon HD4670 PCIe w/ Component output to 50" CRT Rear-Projection HDTV (Mitsubishi), Win7-64Bit (Home Premium), 4GB RAM
Capture Devices (8 tuners): Colossus (x1), HD-PVR (x1), HDHR Prime (x2)
,USBUIRT (multi-zone)
Source:
Comcast Cable
Primary Client: Server Other Clients: (1) HD200, (1) HD300
Retired Equipment: MediaMVP, PVR150 (x2), PVR150MCE,
HDHR, HVR-2250
Reply With Quote
  #5  
Old 10-10-2018, 01:08 PM
dstanley's Avatar
dstanley dstanley is offline
Sage Aficionado
 
Join Date: Sep 2008
Location: LaHave, Nova Scotia, Canada
Posts: 273
I'm thinking along the lines of Sean as well - I don't think it is a 'deal-breaker' to leave out the possible future recording of a Sage item.
I record so little anymore that tracking that portion should be fairly easy and either delete items or monitor upcoming recordings.
If the plug-in matures and the opportunity arises to include something like that, well, then that would be fine too.

Dwight
__________________
SERVER: Intel Core i7-3770 CPU @ 3.40GHz - UnRaid Server 6.7.2/DVB LibreELEC with Docker stuckless-sagetv-server-java9 MOTHERBOARD: ASRock-Z77 Extreme4 / 32GB RAM CACHE DRIVE: SSD 1TB ARRAY: 24TB/7 DRIVES PARITY: 8TB
EXTERNAL DEVICES: 4x HD-PVR's Firewire Channel Changing
TUNERS:NO LONGER RECORDING LIVETV
CLIENTS: 2xHD300 2xHD200 SONY ANDROIDTV MINI-CLIENT
Reply With Quote
  #6  
Old 10-10-2018, 01:34 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,805
Quote:
Originally Posted by Tiki View Post
Iím guessing this sync routine will be run periodically (maybe a few times per day)? In that case if the missing episode does show up in Sageís EPG data at some time in the future, the watched status should transfer over then (and Sage will know that it doesnít need to record it since you already watched it somewhere else).
Right now the sync will run daily and will only collect data on shows that were watched since the last sync. I really do not want to have to process all the shows that were ever watched. Seems a waste of resources.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #7  
Old 10-10-2018, 01:36 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,805
Quote:
Originally Posted by dstanley View Post
I'm thinking along the lines of Sean as well - I don't think it is a 'deal-breaker' to leave out the possible future recording of a Sage item.
I record so little anymore that tracking that portion should be fairly easy and either delete items or monitor upcoming recordings.
If the plug-in matures and the opportunity arises to include something like that, well, then that would be fine too.

Dwight
Maybe I can think about it in another way. I can monitor Sage recordings and when one completes I can check trakt to see if it's been watched elsewhere. I'll have to think it through a little more but at first glance this seems reasonable.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #8  
Old 10-10-2018, 08:15 PM
EnterNoEscape's Avatar
EnterNoEscape EnterNoEscape is offline
SageTVaholic
 
Join Date: Jun 2010
Location: Harrisburg, PA
Posts: 2,505
Quote:
Originally Posted by tmiranda View Post
Right now the sync will run daily and will only collect data on shows that were watched since the last sync. I really do not want to have to process all the shows that were ever watched. Seems a waste of resources.
Why do you say that? SageTV does something like this all the time when you add favorites or finish an EPG sync. I wouldn't think it would be a problem to check once after any EPG update or maybe we could add a way to subscribe to an event generated any time a new Show is added to Wiz.bin.

Quote:
Originally Posted by tmiranda View Post
Maybe I can think about it in another way. I can monitor Sage recordings and when one completes I can check trakt to see if it's been watched elsewhere. I'll have to think it through a little more but at first glance this seems reasonable.
The only problem here is that we just recorded a show that we didn't need to and possibly prevented another show from recording. Maybe a compromise would be to get the schedule for the next 24 hours (this has some gotchas too) and use that to reduce the scope, but still mark things watched before they potentially move recordings or cause them to not happen all together.

In a similar thought process, is there any value in marking it watched the instant it starts recording? Will that cause it to stop recording and free up the tuner?
__________________
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
Reply With Quote
  #9  
Old 10-10-2018, 08:49 PM
wnjj wnjj is online now
Sage Icon
 
Join Date: Jan 2009
Posts: 1,054
Quote:
Originally Posted by EnterNoEscape View Post
Why do you say that? SageTV does something like this all the time when you add favorites or finish an EPG sync. I wouldn't think it would be a problem to check once after any EPG update or maybe we could add a way to subscribe to an event generated any time a new Show is added to Wiz.bin.



The only problem here is that we just recorded a show that we didn't need to and possibly prevented another show from recording. Maybe a compromise would be to get the schedule for the next 24 hours (this has some gotchas too) and use that to reduce the scope, but still mark things watched before they potentially move recordings or cause them to not happen all together.

In a similar thought process, is there any value in marking it watched the instant it starts recording? Will that cause it to stop recording and free up the tuner?

Can you use 'GetFavoriteAirings' along with 'GetAiringStartTime' to see if any 'already watched' favorites are scheduled in the future and then mark those as watched?
Reply With Quote
  #10  
Old 10-10-2018, 09:00 PM
EnterNoEscape's Avatar
EnterNoEscape EnterNoEscape is offline
SageTVaholic
 
Join Date: Jun 2010
Location: Harrisburg, PA
Posts: 2,505
Quote:
Originally Posted by wnjj View Post
Can you use 'GetFavoriteAirings' along with 'GetAiringStartTime' to see if any 'already watched' favorites are scheduled in the future and then mark those as watched?
I believe that would work. If you use intelligent recordings, this approach would miss those, but I guess that's not a big deal since they can't cause you to miss a recording you wanted.
__________________
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
Reply With Quote
  #11  
Old 10-11-2018, 03:50 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,805
Quote:
Originally Posted by wnjj View Post
Can you use 'GetFavoriteAirings' along with 'GetAiringStartTime' to see if any 'already watched' favorites are scheduled in the future and then mark those as watched?
I think there is a GetAiringsThatWillBeRecorded API that may be better suited.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #12  
Old 10-11-2018, 08:24 AM
wnjj wnjj is online now
Sage Icon
 
Join Date: Jan 2009
Posts: 1,054
Quote:
Originally Posted by tmiranda View Post
I think there is a GetAiringsThatWillBeRecorded API that may be better suited.
I hadnít looked in Global. Thereís a GetScheduledRecordings.
Reply With Quote
  #13  
Old 10-11-2018, 11:12 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,805
Quote:
Originally Posted by wnjj View Post
I hadnít looked in Global. Thereís a GetScheduledRecordings.
Yes, that's what I was thinking of.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I edit externalid? JohnLG Batch Metadata Tools 3 03-14-2012 05:49 AM
ExternalID and Series & Episode Numbers Black Sky Batch Metadata Tools 3 01-12-2011 02:23 PM
Help Creating A Theme robhix SageMC Custom Interface 0 01-16-2009 08:49 PM
creating STVi matrix35 SageTV Studio 6 02-25-2007 06:48 PM
Help creating h.264 mp4 with SageTVTranscoder Wade SageTV Beta Test Software 5 11-19-2006 06:17 PM


All times are GMT -6. The time now is 10:45 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.