Kodi Community Forum

Full Version: SageTV Integration - Movies and TV Shows archiving compatible with XBMC
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
sofakng Wrote:How does this work with a SickBeard setup?

For example, here's a list of concerns/questions:

1) Suppose I record a program but SickBeard already downloaded it? Will this overwrite the downloaded copy? (which is a good thing)

2) Can I separate SageTV recordings from SickBeard recordings? I'm not sure if I would want to do this but it would be nice to know where something came from.

Would there be any issues combining the two? My goal is an seamless SickBeard+SageTV setup where I can pretty much have any TV show and both applications work together to avoid duplicates, etc.

(Ideally SickBeard could notify SageTV to record an episode if it can't find it but that's definitely too advanced for it, heh)
I don't use sickbeard, but will try to answer your questions.
1 - You will probably end up with two copies of the program.
2 - There's not an easy way to separate them. You could run a script to prefix all SageTV recordings with a "[SageTV]" label, but I didn't build this functionality into SageXBMC (it is in XBMC.MyLibrary).

There shouldn't be any issues combining the two. I'd make sure you save the corresponding videos is separate directories. But like I said, you'll probably end up with dups.
With the sale of SageTV to Google, I'm investigating options and this definitely seems like the best one. Great job on this!

Before I get started, though, I have a question on exactly how this operates. (I did read all 13 pages, too.) I'll explain my plan and, hopefully, you'll be able to tell me that's exactly how this can be set up to work! :-)

I will keep the SageTV back-end for recordings of both movies and TV shows. After each recording is done and comskip has completed, I would like to use this tool to:

1. Move (not copy) the movies and TV shows into their own XBMC-friendly folders
2. Rename the files for import to XBMC
3. Utilize the comskip file (.edl) SJQ generates for SageTV in XBMC
4. Still be able to watch the shows and movies in SageTV (I'm guessing as imported files?), with all of the SageTV fanart and metadata still intact there.
5. Keep the watched status in sync in both XBMC and SageTV
6. Delete the files from within XBMC and have SageTV delete the show/movie from its own DB. (Ideally, this would be from within XBMC, but I'd be fine with SageTV's own "library update" running on its own frequency, noticing the file missing, and removing it at that point.)

Would this all be possible via your tool? Anything I'm missing?
Skirge01 Wrote:With the sale of SageTV to Google, I'm investigating options and this definitely seems like the best one. Great job on this!

Before I get started, though, I have a question on exactly how this operates. (I did read all 13 pages, too.) I'll explain my plan and, hopefully, you'll be able to tell me that's exactly how this can be set up to work! :-)

I will keep the SageTV back-end for recordings of both movies and TV shows. After each recording is done and comskip has completed, I would like to use this tool to:

1. Move (not copy) the movies and TV shows into their own XBMC-friendly folders
2. Rename the files for import to XBMC
3. Utilize the comskip file (.edl) SJQ generates for SageTV in XBMC
4. Still be able to watch the shows and movies in SageTV (I'm guessing as imported files?), with all of the SageTV fanart and metadata still intact there.
5. Keep the watched status in sync in both XBMC and SageTV
6. Delete the files from within XBMC and have SageTV delete the show/movie from its own DB. (Ideally, this would be from within XBMC, but I'd be fine with SageTV's own "library update" running on its own frequency, noticing the file missing, and removing it at that point.)
Short version: yes that is all possible.
Long version:

  1. Yes you can move them, but if you are using Windows Vista/7, I'd recommend using symlinks (the redirect feature), so the recordings will be in both SageTV and XBMC.
  2. Yes, the videos will always get XBMC-friendly names.
  3. Yes, the .edl files are fully supported by this program and XBMC.
  4. Only if you use redirect=true, or make a copy instead of moving the video.
  5. Yes, watched statuses will sync between Sage and XBMC if you configure them too.
  6. If you are using symlinks and you configure it to propagate symlink deletes, then when a video is deleted from XBMC it will be cleaned out of sage by it's periodic library updater.
Congrats on reading the whole thread Big Grin
Thanks for the fast response! (Reading the whole thread was the LEAST I could do before asking questions. Wink )

My server is currently under WHS and I'm using the drive pool feature for storing my SageTV recordings, so I'm not on Vista/7 there yet. But, the XBMC HTPC is using Windows 7 (64-bit). Will the redirect work under this scenario?
Skirge01 Wrote:Thanks for the fast response! (Reading the whole thread was the LEAST I could do before asking questions. Wink )

My server is currently under WHS and I'm using the drive pool feature for storing my SageTV recordings, so I'm not on Vista/7 there yet. But, the XBMC HTPC is using Windows 7 (64-bit). Will the redirect work under this scenario?
No I don't think it would work in this scenario.
It would work if you run this program on a Vista/7 PC that sits between WHS and your XBMC HTPC, assuming all computers can access each other.
bradvido88 Wrote:No I don't think it would work in this scenario.
It would work if you run this program on a Vista/7 PC that sits between WHS and your XBMC HTPC, assuming all computers can access each other.

Do you suspect the barrier to be WHS, the drive pool, or something else? I intend to give it a shot, but want to understand where it might go wrong, so I can do some troubleshooting of my own before begging you for help. Wink

For example, would this be installed on the client or the server? Both computers have access to each other's C: drives, as well as the drive pool being accessible via UNC on both computers.
I decided to give it a shot and the log shows exactly where I first get stuck: https. I have jetty set up to use https authentication and it's failing there. I tried passing the username and password, but that's not working. Any ideas (other than not using any authentication)?

Code:
06/23/2011 08:00:54 PM INFO    Checking Sage's Encode jobs at: https://[username]:[password]@mediaserver:8446/sagex/api?c=GetTranscodeJobs
06/23/2011 08:00:54 PM ERROR   Could not get valid XML data from URL: https://[username]:[password]@mediaserver:8446/sagex/api?c=GetTranscodeJobs
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Another SageTV user exploring my options like Skirge01.

Is there a way to import media files into XBMC and create metadata without renaming/moving/using symlinks? SageTV can create .properties files which are text files with metadata. Can XBMC read these files or other similar files?

FYI - here is what a Sage .properties file looks like:
Code:
Actor=Aleisha Allen;Cheryl Blayloc;Christiana Anbri;Cody Ross Pitts;Donovan Patton;Jonathan Press;Julia Wetherell;Kathryn Avery;Kelly Nigh;Patrick Van Wagenen;Sean Hanley;Spencer Kayden;Stephen Schmidt;Steve Burns;Thomas Sharkey;Traci Paige Johnson

Description=Needs are the order of the day. After taking care of some gardening needs, we help Mr. Salt and Mrs. Pepper, who need to know which fruits to wash for their fruit salad. Later, we help out with Steve's need to have his clothes clean and in order when Blue gets into them and they get messed up. Then we skiddoo into a picture of a beach where we help Starfish who needs to get to the ocean to get cleaned off.

Director=Matt Sheridan

EpisodeName=What Does Blue Need?

EpisodeNumber=5

Genre=Children

Guest=Cecilia Gonzalez

Guest=Cecilia Gonzalez;Annie Hagg

MediaProviderDataID=76536

MediaProviderID=tvdb

MediaTitle=Blue's Clues

MediaType=TV

OriginalAirDate=844574400000

RunningTime=1800000

SeasonNumber=1

Title=Blue's Clues

UserRating=70

Writer=John Morning

Year=1996

Year=

ParentalRating=TVM

SeriesInfoID=189504
wayner, I definitely suggest reading through the thread. You'll find, as I did, that this script does it all. From what I've gathered, you've got the option to not actually do anything with the SageTV files. This script can pull the info from the properties files or TVDB and put that info into an XBMC nfo file. It's really a one-stop-shop for getting your SageTV recordings into XBMC. Now, if I can just get past my https issue... Smile
Some further testing would seem to indicate that the sagex api is working and accessible. I entered the following from outside my network: https://[servername]:8446/sagex/api?c=Is...e:11014176

And got the following result:

Code:
This XML file does not appear to have any style information associated with it. The document tree is shown below.

      <Result>true</Result>

Based on that, does this indicate an issue with my config.xml file?
I'm considering upgrading to the latest (last) release of SAGETV. Is anyone running the new version with this script? Any issues?
SageTV Smile It's dead jim. Sucked into the vast waste land of Google.
davilla Wrote:SageTV Smile It's dead jim. Sucked into the vast waste land of Google.
True but from beyond the grave Sage is allowing free upgrades to V7. It still might make sense to upgrade to that version and continue using that as a backend for PVR functions while using XBMC as the front end.
I'm getting further. I'm no longer getting https errors and believe that the new issue is with translating the UNC path on my WHS box to a local path. The local path I entered is a valid path on the WHS box, but it does contain, essentially, symlinks to the actual file location. Here's the error I'm getting:

Code:
06/26/2011 09:43:10 AM INFO     - 21-9185689-0.ts                               - Retrieving XML from Sagex at URL: http://mediaserver:8125/sagex/api?c=GetMediaFileForFilePath&1=%5C%5Cmediaserver%5CPublic%5CDVR%5C21-9185689-0.ts
06/26/2011 09:43:10 AM INFO     - 21-9185689-0.ts                               - Local path before URL encode: D:\shares\Public\DVR\21-9185689-0.ts
06/26/2011 09:43:10 AM INFO     - 21-9185689-0.ts                               - Local path after URL encode:  D%3A%5Cshares%5CPublic%5CDVR%5C21-9185689-0.ts
06/26/2011 09:43:10 AM INFO     - 21-9185689-0.ts                               - Could not get valid data from standard file location, trying local URL: http://mediaserver:8125/sagex/api?c=GetMediaFileForFilePath&1=D%3A%5Cshares%5CPublic%5CDVR%5C21-9185689-0.ts
06/26/2011 09:43:10 AM ERROR    - 21-9185689-0.ts                               - Cannot get valid XML from SageX API even after using local path at http://mediaserver:8125/sagex/api?c=GetMediaFileForFilePath&1=D%3A%5Cshares%5CPublic%5CDVR%5C21-9185689-0.ts. Cannot continue. Please check the XML at http://mediaserver:8125/sagex/api?c=GetMediaFileForFilePath&1=%5C%5Cmediaserver%5CPublic%5CDVR%5C21-9185689-0.ts for integrity in these elements: <Airing>, <MediaFileID>, <ShowTitle>, <ShowEpisode>, <OriginalAiringDate>, <IsFileCurrentlyRecording>.
java.lang.Exception: Neither normal nor local path returned valid XML
    at sage.SageToXBMC.getRootElementFromSageX(SageToXBMC.java:1556)
    at sage.SageToXBMC.getMediaType(SageToXBMC.java:1460)
    at sage.SageToXBMC.scanForMatchingFiles(SageToXBMC.java:474)
    at sage.SageToXBMC.<init>(SageToXBMC.java:226)
    at sage.SageToXBMC.main(SageToXBMC.java:51)

06/26/2011 09:43:10 AM ERROR    - 21-9185689-0.ts                               - Valid XML not found from sagex/api (no root element). Cannot continue.

While I'm assuming the issue is related to what you suspected might cause problems, is there any chance you see a way around it? I'd really prefer to avoid moving away from the WHS drive pool, if at all possible, but I guess if that's what I need to do, I will.

Thanks for any insight you might have!
Has anyone ever tried bringing more Sage functionality into XBMC? I assume that XBMC is highly customizable - therefore would it be possible to (via a plugin) bring the SageTV guide into XBMC and also show current recordings, upcoming recordings, favorites, etc? All of this functionality is available through the SageTV web ui and can be accessed via calls to the SageTV API so the data should be available to other programs.

This should be fairly doable and would get you to almost a full SageTV frontend - minus LiveTV and (probably) currently recording TV.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15