SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Software
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Software Discussion related to the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the SageTV software application should be posted here. (Check the descriptions of the other forums; all hardware related questions go in the Hardware Support forum, etc. And, post in the customizations forum instead if any customizations are active.)

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-14-2018, 05:28 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
trakt.tv

How much interest is there for trakt support? For those interested, what are the most important functions you use?

I saw trakt mentioned in another thread so I took a look at the API. It's pretty straight forward and could certainly be integrated into Sage.

Although I have not used it much I can see where trakt can be useful.
__________________

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 09-14-2018, 07:12 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by tmiranda View Post
How much interest is there for trakt support? For those interested, what are the most important functions you use?

I saw trakt mentioned in another thread so I took a look at the API. It's pretty straight forward and could certainly be integrated into Sage.

Although I have not used it much I can see where trakt can be useful.
Here's what I'd use it for....

1. Sync my watched statuses of SageTV to Trakt, with sage being the single source of truth. This is generally an initial bulk operation using the Sync API (for TV and Movies)
2. As content is watched on SageTV, the watched status is sent to Trakt. (I'm only concerned about a boolean operation here, not the actual watched progress)
3. On a schedule, pull down Watched Statuses from Trackt and update SageTV watched status. (Typically, if sagetv is the single source of truth, then it would be good to say, only set the watched status, and NOT unwatched).

For me, and why I was considering using this, is so that I can experiment with things like Emby and Plex for a few days, watching content, understanding the pros and cons, but have it primed with my sagetv watched status, and update sagetv when I do watch content. Also, sometimes when I travel, I'll download shows/movies to my tablet using Plex, so it would be nice that as I watch them, and it syncs plex (which updates trakt), that sagetv is also aware that I've watched a show/movie.

BTW... everything that I'm talking about only requires the Sync api, I think.
Reply With Quote
  #3  
Old 09-14-2018, 07:45 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by stuckless View Post
Here's what I'd use it for....

1. Sync my watched statuses of SageTV to Trakt, with sage being the single source of truth. This is generally an initial bulk operation using the Sync API (for TV and Movies)
2. As content is watched on SageTV, the watched status is sent to Trakt. (I'm only concerned about a boolean operation here, not the actual watched progress)
3. On a schedule, pull down Watched Statuses from Trackt and update SageTV watched status. (Typically, if sagetv is the single source of truth, then it would be good to say, only set the watched status, and NOT unwatched).

For me, and why I was considering using this, is so that I can experiment with things like Emby and Plex for a few days, watching content, understanding the pros and cons, but have it primed with my sagetv watched status, and update sagetv when I do watch content. Also, sometimes when I travel, I'll download shows/movies to my tablet using Plex, so it would be nice that as I watch them, and it syncs plex (which updates trakt), that sagetv is also aware that I've watched a show/movie.

BTW... everything that I'm talking about only requires the Sync api, I think.
Pretty much what I was thinking as a starting point. I'll be away on a trip next week and will take the time on the plane to study the API and the examples. From what I have seen so for it looks straight forward.
__________________

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 09-14-2018, 08:32 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by tmiranda View Post
Pretty much what I was thinking as a starting point. I'll be away on a trip next week and will take the time on the plane to study the API and the examples. From what I have seen so for it looks straight forward.
it would be good if you could make it happen. It is on my list as well, but, I know that I can't start it until next year I can certainly try to help with any technical information/troubleshooting/testing, if you need help (but likely you won't need my help )
Reply With Quote
  #5  
Old 09-14-2018, 09:27 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by stuckless View Post
it would be good if you could make it happen. It is on my list as well, but, I know that I can't start it until next year I can certainly try to help with any technical information/troubleshooting/testing, if you need help (but likely you won't need my help )
I'm sure I will need your help. I know your email address

I appreciate all you have done for me and the Sage community.
__________________

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
  #6  
Old 09-14-2018, 04:15 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by tmiranda View Post
I'm sure I will need your help. I know your email address

I appreciate all you have done for me and the Sage community.
thx, and btw... there is a Java API wrapper. Might be useful.
https://github.com/UweTrottmann/trakt-java
Reply With Quote
  #7  
Old 09-14-2018, 04:50 PM
KeithAbbott KeithAbbott is online now
Sage Icon
 
Join Date: Oct 2009
Location: Southeastern Michigan
Posts: 1,375
Could something like this be used to backup/restore/rebuild wiz.bin?
__________________
Server: MSI Z270 SLI Plus ATX Motherboard, Intel i7-7700T CPU, 32GB Memory, Unraid 6.11.5, sagetvopen-sagetv-server-opendct-java11 Docker (version 2.0.7)
Tuners: 2 x SiliconDust HDHomeRun Prime Cable TV Tuners, SiliconDust HDHomeRun CONNECT 4K OTA Tuner
Clients: Multiple HD300 Extenders, Multiple Fire TV Stick 4K Max w/MiniClient
Miscellaneous: Multiple Sony RM-VLZ620 Universal Remote Controls
Reply With Quote
  #8  
Old 09-14-2018, 07:44 PM
EnterNoEscape's Avatar
EnterNoEscape EnterNoEscape is offline
SageTVaholic
 
Join Date: Jun 2010
Location: Harrisburg, PA
Posts: 2,657
Quote:
Originally Posted by KeithAbbott View Post
Could something like this be used to backup/restore/rebuild wiz.bin?
I think it would work for things already in the current EPG data. I guess that as new EPG data came in, it would be checked against trakt.tv and marked watched if appropriate. It wouldn't put old airings back in there though, and if it did, it's unlikely they would have the correct EPG ID's, so past airings would likely be incomplete for most shows initially according to what's in SageTV.
__________________
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 09-15-2018, 06:44 PM
dstanley's Avatar
dstanley dstanley is offline
Sage Aficionado
 
Join Date: Sep 2008
Location: LaHave, Nova Scotia, Canada
Posts: 291
So looking forward to this ... I had been running a plugin to SageTV to try to match the watched status with Plex so Plex could keep my Trakt.tv up to date.

i watch all my recorded tv and most movies (non-H.265 and UHD) with SageTV but use an Odroid C2 running OpenPHT for the 4K stuff and things my HD300's cannot run.

The plugin seemed to work well for a while but too many things were being set watched that were not so i have to abandon that scheme. So my SageTV watching had to be manually entered into Trakt - missing lots I am sure because I am lazy - lol

Dwight
__________________
SERVER: Intel Core i7-3770 CPU @ 3.40GHz - UnRaid Server 6.8.0/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
  #10  
Old 09-15-2018, 08:18 PM
jusjoken jusjoken is offline
SageTVaholic
 
Join Date: Dec 2005
Location: Strathmore, AB
Posts: 2,727
Collection sync and clean collection may be nice functions to have so your entire collection can be available to browse from any device including watched status plus the series/movie details trakt offers.

Longer term you or someone else could possibly pull down IMDB type data as well as the api seems to cover that too.

k
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page
Reply With Quote
  #11  
Old 09-18-2018, 05:48 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by stuckless View Post
thx, and btw... there is a Java API wrapper. Might be useful.
https://github.com/UweTrottmann/trakt-java
Thanks for that.

To sync it looks like I will need the imdb ID. Do your fanart APIs return that?
__________________

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 09-18-2018, 11:50 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by tmiranda View Post
Thanks for that.

To sync it looks like I will need the imdb ID. Do your fanart APIs return that?
yeah, Phoenix, when it fetches the metadata/fanart for a show/movie, then it stores the imdbid in the metadata for that item.

Now, in your case, you might want to check if the imdbid exists, and if doesn't (ie, running core stv without any fanart apis), then might need to do a search based on title to bring back the imdb id (ie, there are trakt apis for that). Or, you make phoenix metadata a core requirement, and only sync if an item already has an imdbid.
Reply With Quote
  #13  
Old 09-22-2018, 12:10 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by KeithAbbott View Post
Could something like this be used to backup/restore/rebuild wiz.bin?
Yes. Eventually ....
__________________

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
  #14  
Old 09-22-2018, 12:21 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Some thoughts ...

I've started on this plugin and am making some progress. I think I have the API figured out and I'm close to getting the oauth code working.

As a start I will probably give the ability to sync all of the sageTV watched history to trakt. I'll also be able to sync the watched history if a show in SageTV is watched to completion.

In order to handle cases where the user manually marks a show as watched I'll need to create an STVi. This is not ideal because many people do not use the default STV and I have to manually trap every "watched" keypress. It would be much better if the plugin system had a "watched" event that I could use. Making that happen in the core is above my pay grade. Volunteers?

Once I get the basics working I'll add other fun stuff. Let me know what you are interested in and I'll prioritize the development accordingly.
__________________

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
  #15  
Old 09-22-2018, 02:29 PM
dstanley's Avatar
dstanley dstanley is offline
Sage Aficionado
 
Join Date: Sep 2008
Location: LaHave, Nova Scotia, Canada
Posts: 291
This sounds great Tom - looking forward to having any sort of Trakt.tv integration into SageTV!

I wish I could contribute something but I have no knowledge of the inner workings of Sage at all ... so I rely on you and the other generous contributors for keeping SageTV awesome.

Dwight
__________________
SERVER: Intel Core i7-3770 CPU @ 3.40GHz - UnRaid Server 6.8.0/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
  #16  
Old 09-22-2018, 04:43 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by dstanley View Post
This sounds great Tom - looking forward to having any sort of Trakt.tv integration into SageTV!

I wish I could contribute something but I have no knowledge of the inner workings of Sage at all ... so I rely on you and the other generous contributors for keeping SageTV awesome.

Dwight
Guinea pigs are always welcome
__________________

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
  #17  
Old 09-22-2018, 07:34 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by tmiranda View Post
I've started on this plugin and am making some progress. I think I have the API figured out and I'm close to getting the oauth code working.

As a start I will probably give the ability to sync all of the sageTV watched history to trakt. I'll also be able to sync the watched history if a show in SageTV is watched to completion.

In order to handle cases where the user manually marks a show as watched I'll need to create an STVi. This is not ideal because many people do not use the default STV and I have to manually trap every "watched" keypress. It would be much better if the plugin system had a "watched" event that I could use. Making that happen in the core is above my pay grade. Volunteers?

Once I get the basics working I'll add other fun stuff. Let me know what you are interested in and I'll prioritize the development accordingly.
I know nothing about plugins but looked a bit in the core. There’s an event called “WatchedStateChanged” that happens after set and clear watched. Does that not work for you? Where do I find the list of available events so I can be sure I’m looking in the right code?

BigBrother.java and PluginEventManager.java is where I found it.
Reply With Quote
  #18  
Old 09-23-2018, 04:36 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by wnjj View Post
I know nothing about plugins but looked a bit in the core. There’s an event called “WatchedStateChanged” that happens after set and clear watched. Does that not work for you? Where do I find the list of available events so I can be sure I’m looking in the right code?

BigBrother.java and PluginEventManager.java is where I found it.
That seems right. The PluginEventManager is the class that defines all the known events. To my knowledge no new events has been added since it went open source, but, if there were new ones, then they should be defined in that class.

Pretty much all of the basic media events like added, removed, watched, and even progress can be monitored via events.

The SageTVEventListener contains a list of events in it's comment header, but interestingly enough, this file does not define the Watched event.
Reply With Quote
  #19  
Old 09-23-2018, 08:50 AM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by stuckless View Post
That seems right. The PluginEventManager is the class that defines all the known events. To my knowledge no new events has been added since it went open source, but, if there were new ones, then they should be defined in that class.

Pretty much all of the basic media events like added, removed, watched, and even progress can be monitored via events.

The SageTVEventListener contains a list of events in it's comment header, but interestingly enough, this file does not define the Watched event.
I found that event listener comment list first. I suspect a few were added some time ago and the list wasn’t updated. That’s why I’m wondering if some external document is missing them too, despite the fact that they seem to be real.
Reply With Quote
  #20  
Old 09-23-2018, 09:42 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by wnjj View Post
I know nothing about plugins but looked a bit in the core. There’s an event called “WatchedStateChanged” that happens after set and clear watched. Does that not work for you? Where do I find the list of available events so I can be sure I’m looking in the right code?

BigBrother.java and PluginEventManager.java is where I found it.
Ah ha. I was relying on an old document. Thanks for pointing that out.

I'm making good progress. I can now get the necessary OAUTH credentials and sync movies and TV to trakt. I still have a lot of fleshing out to do but the basic plumbing is in place.
__________________

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.

Last edited by tmiranda; 09-23-2018 at 09:46 AM.
Reply With Quote
Reply


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

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
Any interest/plans for native trakt.tv support? (watched show/movie sync) TwistedMelon SageTV Github Development 3 08-06-2018 01:58 PM
Watched Status export/sync with Trakt? Jason SageTV v7 Customizations 0 06-08-2013 06:17 AM


All times are GMT -6. The time now is 07:05 AM.


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