• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 15
SageTV Integration - Movies and TV Shows archiving compatible with XBMC
#16
Temp.xml is almost useless:

Quote: <Result></Result>

All my references are UNC on both sage and the config file.

I get results from several other functions in the sage api, just not that one. I'm wondering if it is a problem with the api.

Sage Forums suggest uninstalling and reinstalling the api files which I can try tonight.
Reply
#17
skacey Wrote:I get results from several other functions in the sage api, just not that one. I'm wondering if it is a problem with the api.

Sage Forums suggest uninstalling and reinstalling the api files which I can try tonight.
When you get an empty <Result> from the api command GetMediaFileForFilePath, it almost always means that the path you provided does not match a path Sage has for a video.

You can try uninstall/reinstall, but I would verify again that the path specified in the url is the same as sage uses.

To check what Sagex actually sees as the path, open your browser and go to:
Code:
http://wheelhouse:8080/sagex/api?c=GetMediaFiles&1=T
This gives you a list of TV recordings. Check the entries under <SegmentFiles> And you will see the exact path used.

Then you can vefiry the Sagex api is working/broken by browsing to
Code:
http://wheelhouse:8080/sagex/api?c=GetMediaFileForFilePath&1=[REPLACE_WITH_PATH_YOU_JUST_FOUND]
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply
#18
The running/stopped fixed my 1st problem.

I have it set up to email notifications. If there is a email problem (in my case a misspelled smtp server name) it goes into a loop trying to send an email. The log file can get quite large quickly. Blush
Reply
#19
TugboatBill Wrote:The running/stopped fixed my 1st problem.

I have it set up to email notifications. If there is a email problem (in my case a misspelled smtp server name) it goes into a loop trying to send an email. The log file can get quite large quickly. Blush
Yes, that is fixed in the revision coming out today.

The problem is that it sends an e-mail on errors, and I was marking failing to send an e-mail as an error. Infinite loop -- wooops!
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply
#20
I just updated this with release 1.2.
See the first post for info and the second post for how to upgrade.

I've been using this release for a while and it has been very stable for me. Most useful feature for me is the ability to use symbolic links for XBMC's library. This way, I can add episodes to XBMC's library without having to touch the SageTV recordings.

Let me know your thoughts and if you run into problems. I don't exactly have a QA team testing this stuff out Big Grin
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply
#21
In v1.1 I noticed that it tried to process a file ShowAnalyzer was still working on.

I had 3 recordings to transfer, all are the same program. They all had properties files. I did a test transfer and all went well, it recognized all 3. Transfer was set up to copy and leave the original. I then cleared the history so I could run another test.

I then downloaded ShowAnalyzer and set it up. Configured Config.xml to wait for the edl and then remove the original recordings. When the next scheduled cycle occurred I got a warning email:
Season and Episode could not be found in properties file or on thetvdb.com. Will skip this file: g:\SageTV\TheTonightShowWithJayLeno-109007-0.mpg

The weird thing is that it did transfer with the edl. However if I go back to the recording folder the file is still there, the properties file is gone, and the edl file is 0kb. Showanalyzer shows the file as processed in its history but it also shows the file as active. It also has been processing for quite a bit longer than it did the 1st time.

This could be a fluke as I've been bouncing back and forth between this box and work or maybe it caught showanalyzer at a sensitive moment?
Reply
#22
@TugboatBill
Are you manually setting up Showanalzer to generate .edl files? I have only tested with the Comskip SageTV plugin generating .edl files, so I can't guarantee anything with a manual setup.
The program tests if the .edl file has been modified in the last 60 seconds, if it hasn't it continues. Using the SageTV plugin, the .edl files are modified every second while the .edl is still being worked on, so this method works well.

As far as the .properties file going missing, that's not something this program would cause. It sounds like Sage might have gotten messed up and thought the recording was gone, thus deleting the associated .properties file?
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply
#23
bradvido88 Wrote:@TugboatBill
Are you manually setting up Showanalzer to generate .edl files? I have only tested with the Comskip SageTV plugin generating .edl files, so I can't guarantee anything with a manual setup.
The program tests if the .edl file has been modified in the last 60 seconds, if it hasn't it continues. Using the SageTV plugin, the .edl files are modified every second while the .edl is still being worked on, so this method works well.

As far as the .properties file going missing, that's not something this program would cause. It sounds like Sage might have gotten messed up and thought the recording was gone, thus deleting the associated .properties file?

I've set up showanalyzer to monitor the folder and generate the edl automatically. It appears that Showanalyzer or the OS (Win7 Pro x64) caches the changes to the edl file until it is done. I didn't notice if the time on the edl file was changing, but I did notice it stayed a 0 size. Maybe a entry in the Config.xml for how long to wait on the edl would be a viable solution? My server takes about 8 minutes per hour of recording to process so if I were able to set it at 15 minutes I'd be good (I don't record movies).

As for the properties file, yes, Sage could have removed it.
Reply
#24
I'm watching a recording as it happens right now. ShowAnalyzer is processing it at the same time. The file size of the mpg is changing, but the time stamp (date modified) isn't. The edl time stamp (date modified) is changing and size is 0.

Note that I'm looking at the "Date Modified" column (not on by default). If I look at the std WE date column neither of the times are changing.
Reply
#25
TugboatBill Wrote:I'm watching a recording as it happens right now. ShowAnalyzer is processing it at the same time. The file size of the mpg is changing, but the time stamp (date modified) isn't. The edl time stamp (date modified) is changing and size is 0.

Note that I'm looking at the "Date Modified" column (not on by default). If I look at the std WE date column neither of the times are changing.

Well there seems to be some strange things going on with the date modified, especially since the size remains zero.
To be compatible with ShowAnalyzer, here's the options I see:

  1. If you use v1.2 and set "redirect=true", then this is not an issue. A symbolic link can be created to the .edl file before the .edl is finished, and it will gracefully reflect all the changes of the final .edl.
  2. I could add a minimum wait time, as you suggested to Config.xml. So that the program will wait at least X minutes after the video has finished recording before it processes the file.
I will probably add #2 in the next release, but in the meantime, you may want to consider #1.

--Hope this helps.
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply
#26
I think I'll wait. My XBMC videos are on a unraid box and the recording folder is on my HT server. The symbolic links probably won't work in a mixed OS environment like that and even if they did it is too prone to problems.

I'll upgrade to 1.2 anyway.

Now I have to figure out how I'm going to manage recordings that don't ID. IE This Old House and BBC World News.
Reply
#27
Ok, I did find a problem. My Sage did use UNC paths, but was referring to the directory as \\localhost instead of \\Wheelhouse - the problem is that I cannot access \\localhost from another computer.

I'm working on changing the directory reference and reindexing the files - should know more soon.
Reply
#28
Got this installed and running manually. Automation is on the list for next weekend. I have one question though. Is there anyway to have a filter that is all tv shows? Right now if I want this to move all my SageTV recordings I have to remember to add another filter to the config.xml file every time I add another season pass or even individual recording.
Reply
#29
pkscuot Wrote:Is there anyway to have a filter that is all tv shows?
Currently, there is no wildcard filter for TV Shows. I didn't integrate one because (currently) TV Shows that can't be looked up on TheTVDB can't be added to XBMC. So, it wont help to add programming like News or less common shows because their meta-data can't be looked up.
I am working on a way to manually add TV shows that don't have Season Number/Episode Number, but haven't gotten that far yet (your input is welcome).

So for now, you have to set up a showfilter for each TV Show.

Next release, this will be changed.
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply
#30
bradvido88 Wrote:So for now, you have to set up a showfilter for each TV Show.

No worries. New problem now though. Yesterday I successfully moved an episode of CSI Miami from last week. This morning I tried to manually run it again to get Hawaii Five-0 moved over, but it didn't work. I ran it again at log level 4 and got the following. It looks like the program isn't finding the .properties file where it's expecting it, and I'm not sure where to look to find it. There is a SageTV.properties file in /Program Files/SageTV/SageTV, but it looks like that only has config stuff in it, not the actual TV program data.

Unfortunately it also failed to find it on TVDB the first time, and now it looks like I have to wait for at least more than 13 minutes before I can try again to get a log file that might have more about why TVDB failed as well. That one is my fault though, I had a the tvdb override left in the file from the example. I've fixed that and will try again when I get home for that part.

Code:
01/18/2011 07:21:35 AM INFO      ######################################START LOADING CONFIG######################################
01/18/2011 07:21:35 AM INFO      Getting config from XML file: C:\Users\HTPC\Documents\CustomApps\SAGE-XBMC\config.xml
01/18/2011 07:21:35 AM DEBUG     Logging level set to: 4
01/18/2011 07:21:35 AM DEBUG     Logs will be deleted after 365 days.
01/18/2011 07:21:35 AM DEBUG     Logging skips is set to false
01/18/2011 07:21:35 AM DEBUG     E-mail notification level set to: 2
01/18/2011 07:21:35 AM DEBUG     NotifyOnSuccess set to: true
01/18/2011 07:21:35 AM DEBUG     Notification expiration hours set to: 48.0
01/18/2011 07:21:35 AM DEBUG     Found sage recording directory: D:\Video\SageTV
01/18/2011 07:21:35 AM DEBUG     Found Dropbox: D:\Video\XBMC
01/18/2011 07:21:35 AM DEBUG     No local equivalent specified for dropbox.
01/18/2011 07:21:35 AM DEBUG     Found TheTvAB Api Key: FB17475CC7D5F4FF
01/18/2011 07:21:35 AM DEBUG     Sage Server URL found: http://localhost:8080/
01/18/2011 07:21:35 AM DEBUG     Wait for Comskip's .edl file = false
01/18/2011 07:21:35 AM DEBUG     EDL Type set to 3
01/18/2011 07:21:35 AM DEBUG     Found show filter: CSIMiami for .mpg files. KeepOriginal=false, Redirect=false, ExternalCompression=None, HDOnly=false, PreferOriginal =false
01/18/2011 07:21:35 AM DEBUG     Found show filter: HawaiiFive0 for .mpg files. KeepOriginal=false, Redirect=false, ExternalCompression=None, HDOnly=false, PreferOriginal =false
01/18/2011 07:21:35 AM DEBUG     Found encoding definition: Handbrake720p
01/18/2011 07:21:35 AM DEBUG     verify_success is enabled for the encoding definition named Handbrake720p
01/18/2011 07:21:35 AM DEBUG     Found verification line: "Rip done!"
01/18/2011 07:21:35 AM DEBUG     Found verification line: "HandBrake has exited."
01/18/2011 07:21:35 AM DEBUG     prevent_hangs is enabled for the encoding definition named Handbrake720p
01/18/2011 07:21:35 AM DEBUG     Will kill Handbrake720p encodings if processor usage < 14 and elapsed time in hours > 2.0
01/18/2011 07:21:35 AM DEBUG     fall_back_to_sage_compression is enabled for the encoding definition named Handbrake720p
01/18/2011 07:21:35 AM DEBUG     Will use Sage compression definition "MPEG4 HDTV-Medium Quality H.264 MKV" when external compression fails for Handbrake720p
01/18/2011 07:21:35 AM DEBUG     Found encoding definition: HandBrakeOptimized
01/18/2011 07:21:35 AM DEBUG     verify_success is enabled for the encoding definition named HandBrakeOptimized
01/18/2011 07:21:35 AM DEBUG     Found verification line: "Rip done!"
01/18/2011 07:21:35 AM DEBUG     Found verification line: "HandBrake has exited."
01/18/2011 07:21:35 AM DEBUG     prevent_hangs is enabled for the encoding definition named HandBrakeOptimized
01/18/2011 07:21:35 AM DEBUG     Will kill HandBrakeOptimized encodings if processor usage < 14 and elapsed time in hours > 2.0
01/18/2011 07:21:35 AM DEBUG     fall_back_to_sage_compression is enabled for the encoding definition named HandBrakeOptimized
01/18/2011 07:21:35 AM DEBUG     Will use Sage compression definition "MPEG4 HDTV-High Quality H.264 MKV" when external compression fails for HandBrakeOptimized
01/18/2011 07:21:35 AM DEBUG     CCExtract is disabled.
01/18/2011 07:21:35 AM DEBUG     ".mpg" added as a valid video extension.
01/18/2011 07:21:35 AM DEBUG     ".ts" added as a valid video extension.
01/18/2011 07:21:35 AM DEBUG     ".avi" added as a valid video extension.
01/18/2011 07:21:35 AM DEBUG     ".mkv" added as a valid video extension.
01/18/2011 07:21:35 AM DEBUG     4 valid video extensions found under <ValidVideoExtensions>
01/18/2011 07:21:35 AM DEBUG     Valid video extensions are: [mkv, ts, mpg, avi]
01/18/2011 07:21:35 AM DEBUG     XBMCServer info: XBMCServerName: "localhost", MySQLUsername: "xbmc", MySQLPassword: "xbmc", MySQLPort: "3306", VideoDBSchemaName: "xbmc_video", trigger_updates: true
01/18/2011 07:21:35 AM INFO      ######################################START CHECKING CURRENT ENCODES######################################
01/18/2011 07:21:35 AM INFO      Checking for external encodings that might have finished
01/18/2011 07:21:35 AM INFO      0 current encodings found, skipping
01/18/2011 07:21:35 AM INFO      ######################################START CHECKING XBMC UPDATES######################################
01/18/2011 07:21:35 AM INFO      Checking if XBMC needs to have its sources updated for any video files by checking entries in C:\Users\HTPC\Documents\CustomApps\SAGE-XBMC\res\xbmcFileSources.txt
01/18/2011 07:21:35 AM INFO      Will check the sources for 0 videos in XBMC
01/18/2011 07:21:35 AM INFO      Done updating XBMC sources. (checked 0 sources, updated 0, removed: 0)
01/18/2011 07:21:35 AM INFO      ######################################START PROCESSING SHOWFILTER MATCHESS######################################
01/18/2011 07:21:35 AM DEBUG     Found video: D:\Video\SageTV\HawaiiFive0-HeKaneHewaole-194567-0.mpg -- MediaType = tv, isHighDef = true, Meta-Data found from cache
01/18/2011 07:21:35 AM INFO      Found matching recording: D:\Video\SageTV\HawaiiFive0-HeKaneHewaole-194567-0.mpg
01/18/2011 07:21:35 AM INFO      Checking if D:\Video\SageTV\HawaiiFive0-HeKaneHewaole-194567-0.mpg can be processed right now.
01/18/2011 07:21:35 AM INFO      Retrieving XML from Sagex at URL: http://localhost:8080/sagex/api?c=GetMediaFileForFilePath&1=D%3A%5CVideo%5CSageTV%5CHawaiiFive0-HeKaneHewaole-194567-0.mpg
01/18/2011 07:21:35 AM INFO      sageMediaFileID = 218244
01/18/2011 07:21:35 AM INFO      seriesTitle: Hawaii Five-0
01/18/2011 07:21:35 AM INFO      episodeTitle: He Kane Hewaole
01/18/2011 07:21:35 AM INFO      origAirDate = 2011-01-17
01/18/2011 07:21:35 AM INFO      isCurrentlyRecording = false
01/18/2011 07:21:35 AM INFO      .properties file does not exist, will attempt lookup on thetvdb.com
01/18/2011 07:21:35 AM INFO      TheTVDB series ID is overridden in config file, no need to look it up. Using ID of: "78310"
01/18/2011 07:21:35 AM DEBUG     Last query was on Tue Jan 18 07:08:05 EST 2011
01/18/2011 07:21:35 AM INFO      The last time this file was queried was 13 minutes ago. NOT OK to requery because this is < max query interval of 60 minutes.
01/18/2011 07:21:35 AM INFO      Since TheTVDB was recently queried for this show, will wait. This is to avoid over-using the API.
01/18/2011 07:21:35 AM ERROR     Season and Episode could not be found in properties file or on thetvdb.com. Will skip this file: D:\Video\SageTV\HawaiiFive0-HeKaneHewaole-194567-0.mpg
01/18/2011 07:21:35 AM INFO      Deleting logfiles older than 365 days (01/18/2010 07:21:35 AM)
01/18/2011 07:21:35 AM DEBUG     Not expired, only 0 days old (01/17/2011 06:07:31 PM): C:\Users\HTPC\Documents\CustomApps\SAGE-XBMC\logs\sage-xbmc.2011-01-17.log
01/18/2011 07:21:35 AM DEBUG     Not expired, only 0 days old (01/18/2011 07:21:35 AM): C:\Users\HTPC\Documents\CustomApps\SAGE-XBMC\logs\sage-xbmc.2011-01-18.log
01/18/2011 07:21:35 AM INFO      Checked 2 log files, deleted 0 expired log files.
01/18/2011 07:21:35 AM INFO      
        Done processing 1 Sage Recording Directories: [D:\Video\SageTV]
        2 files scanned
        0 files successfully processed
        1 files can't be processed right now
        1 files skipped because they are not Videos
        0 files skipped because the dont match any filters
        0 files skipped because they've previously been processed
01/18/2011 07:21:35 AM INFO      Done...
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 15

Logout Mark Read Team Forum Stats Members Help
SageTV Integration - Movies and TV Shows archiving compatible with XBMC1