ForTheLibrary - XBMC Library & ForTheRecord PVR Integration

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ehfortin Offline
Junior Member
Posts: 14
Joined: Jul 2011
Reputation: 0
Post: #41
@bradvido88

What exactly FTL is doing when "archiving" recordings? I've read the thread and I'm still unclear about FTL. It seems to do more then just "add" the FTR recordings to XBMC but I'm not sure what.

I'm using FTR to do my recordings on a local disk and I manually (for now) move them to a repository on my NAS. This is done because I may have recordings starting or active while I may have to reboot my NAS (it is a VM under VMware and I'm modifying it from time to time or upgrading my NAS OS, etc). Anyway, I want to make sure that whatever happens on the NAS, it won't impact the recordings on FTR.

I've saw an option to add a post-processing script and that could be a place to add a move to the NAS. However, this will change the UNC to the file so... maybe a pre-processing script would be better. I can do that in the batch file that will invoke FTL but making sure that I fully understand what FTL is expecting and doing would help in my analysis of the situation.

Thank you for your various tools, they are very useful.

ehfortin
find quote
bradvido88 Offline
Donor
Posts: 736
Joined: Nov 2008
Reputation: 7
Location: MN
Post: #42
(2012-11-07 22:27)ehfortin Wrote:  @bradvido88

What exactly FTL is doing when "archiving" recordings? I've read the thread and I'm still unclear about FTL. It seems to do more then just "add" the FTR recordings to XBMC but I'm not sure what.

I'm using FTR to do my recordings on a local disk and I manually (for now) move them to a repository on my NAS. This is done because I may have recordings starting or active while I may have to reboot my NAS (it is a VM under VMware and I'm modifying it from time to time or upgrading my NAS OS, etc). Anyway, I want to make sure that whatever happens on the NAS, it won't impact the recordings on FTR.

I've saw an option to add a post-processing script and that could be a place to add a move to the NAS. However, this will change the UNC to the file so... maybe a pre-processing script would be better. I can do that in the batch file that will invoke FTL but making sure that I fully understand what FTL is expecting and doing would help in my analysis of the situation.

Thank you for your various tools, they are very useful.

ehfortin

FTL will move your recorded files into either a "_TV Shows" or "_Movies" directory after they finish recording. Within those directories, the recordings will be named in a way that XBMC can scrape/understand. If you need those directories to be located somewhere other than your default FTR recording share, you could make them symlinks to a NAS or whatever.

FTR will also be updated with the new location of the recording (using the FTR API), so the recordings will still show up as usual in your PVR listings.

XBMC.MyLibrary (add anything to the library)
ForTheLibrary (ForTheRecord & XBMC Library Integration)
SageTV & XBMC PVR Integration
Delete unused thumbs
find quote
ehfortin Offline
Junior Member
Posts: 14
Joined: Jul 2011
Reputation: 0
Post: #43
(2012-11-07 22:31)bradvido88 Wrote:  FTL will move your recorded files into either a "_TV Shows" or "_Movies" directory after they finish recording. Within those directories, the recordings will be named in a way that XBMC can scrape/understand. If you need those directories to be located somewhere other than your default FTR recording share, you could make them symlinks to a NAS or whatever.

FTR will also be updated with the new location of the recording (using the FTR API), so the recordings will still show up as usual in your PVR listings.

I read that. I should have remembered. That being said, my recordings are already created directly in a "TV Shows" or "Movies" folder tree structure. I've use the internal abilities of FTR to do it. In the section "Recording File Name Formats", I've added those:

Series: TV Shows\%%TITLE%%\Season %%SERIES%%\%%TITLE%% - S%%SERIES%%E%%EPISODENUMBER2%% - %%EPISODETITLE%%

One-time: Movies\%%TITLE%%\%%TITLE%%

As such, a TV Shows or Movies folder is created and then, below it, a folder for the movie or a subtree for a serie is built (Serie Name\Season #\Serie - s#e# - title just like XBMC is looking for).

Right now in FTL, I don't see a way to give an alternate output folder. It would be great to be able to tell FTL to do its job but with the shared folder of our choice. I would see an advantage in using FTL as it also update FTR which is great and call for the XBMC update after doing the move.

Is it something you could consider adding to FTL?

Thank you.

ehfortin
find quote
pkscuot Offline
Fan
Posts: 598
Joined: Jan 2011
Reputation: 10
Location: Honolulu, HI
Post: #44
Just in case anyone goes over to the 4TheRecord Forum and has a mild panic attack (like I did), it looks like FTR has been open sourced and is now called ArgusTV and they have a new forum. For me at least I was able to use the same login ID and password I had for the old forum site.
find quote
pkscuot Offline
Fan
Posts: 598
Joined: Jan 2011
Reputation: 10
Location: Honolulu, HI
Post: #45
So I've taken yet another stab at replacing my SageTV setup with FTR (well, ArgusTV now). Everything is working well this time around. I guess moving to Hawaii, building a new HTPC, and using an HD HomeRun instead of internal QAM cards all helped. Big Grin

I've also setup XMLTVDB to process a Schedule Direct XML file I download using XMLTV GUI. Yesterday it worked fine. Today nothing. I checked the logs and saw this:
Code:
01/05/2013 04:33:54 PM INFO    TheTVDB series ID is overridden in config file, no need to look it up. Using ID of: "164541"
01/05/2013 04:33:54 PM DEBUG   Getting episodes for series: null
01/05/2013 04:33:54 PM DEBUG   Getting URL from cache (C:\CustomApps\XMLTV\XMLTVDB\cache\1.unzipped): http://www.thetvdb.com/api/05EB6802977A1FFE/series/164541/all/en.zip
01/05/2013 04:33:54 PM DEBUG   Getting XML from file: C:\CustomApps\XMLTV\XMLTVDB\cache\1.unzipped
01/05/2013 04:33:54 PM DEBUG   Will search 61 episodes for a match.
01/05/2013 04:33:54 PM INFO    Found 61 episodes for series: tvdbid: 164541, seriesName: Hawaii Five-0, seriesYear: 2010
01/05/2013 04:33:54 PM INFO    TVDB Matches Found (title=Olelo Ho'Opa'I Make, airdate=unknown):
                                   originalAirDateMatches: []
                                   exactTitleMatches:      []
                                   fuzzyTitleMatches:      []
                                   containsTitleMatches:   [1x21 - Ho'opa'i (2011-04-18)]
01/05/2013 04:33:54 PM INFO    Found 1 TVDB.com match, will use it
01/05/2013 04:33:54 PM NOTICE  Match - Series: tvdbid: 164541, seriesName: Hawaii Five-0, seriesYear: 2010: CONTAINS_TITLE for 1 episode(s):
                                   [1x21 - Ho'opa'i (2011-04-18)]
01/05/2013 04:33:54 PM DEBUG   <episode-num system="onscreen"> - Set val to: S01E21
01/05/2013 04:33:54 PM DEBUG   <episode-num system="xmltv_ns"> - Set val to: 0.20.0/0
01/05/2013 04:33:54 PM ERROR   Error processing xml file: org.jdom.IllegalDataException: The data "null" is not legal for a JDOM attribute: A null is not a legal XML value.
                                   org.jdom.IllegalDataException: The data "null" is not legal for a JDOM attribute: A null is not a legal XML value.
                                   org.jdom.Attribute.setValue(Attribute.java:491)
                                   org.jdom.Attribute.<init>(Attribute.java:228)
                                   org.jdom.Attribute.<init>(Attribute.java:251)
                                   org.jdom.Element.setAttribute(Element.java:1149)
                                   xmltvdb.xmltvdb.updateOrCreateElem(xmltvdb.java:727)
                                   xmltvdb.xmltvdb.processXMLTVFile(xmltvdb.java:597)
                                   xmltvdb.xmltvdb.access$100(xmltvdb.java:65)
                                   xmltvdb.xmltvdb$1.onEvent(xmltvdb.java:176)
                                   btv.folderwatcher.FolderWatcher.run(FolderWatchers.java:79)
                                   java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
                                   java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
                                   java.util.concurrent.FutureTask.run(Unknown Source)
                                   java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
                                   java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
                                   java.lang.Thread.run(Unknown Source)

I did some poking around in the XML file, and it turns out the episode of Hawaii Five-0 in question had no <desc></desc> element. It looks like this:
Code:
<programme start="20130120170000 -1000" stop="20130120180000 -1000" channel="NA_SD_PC:96815_34331_5">
    <title>Hawaii Five-0</title>
    <sub-title>Olelo Ho&apos;Opa&apos;I Make</sub-title>
    <credits>
      <actor>Alex O&apos;Loughlin</actor>
      <actor>Scott Caan</actor>
      <actor>Daniel Dae Kim</actor>
      <actor>Grace Park</actor>
      <actor>Masi Oka</actor>
      <actor>Michelle Borth</actor>
      <producer>Peter Lenkov</producer>
      <producer>Alex Kurtzman</producer>
      <producer>Roberto Orci</producer>
    </credits>
    <category>Crime drama</category>
    <episode-num system="Zap2itDD_Program">EP012800630062</episode-num>
    <episode-num system="Zap2itDD_Series">EP01280063</episode-num>
    <video>
      <quality>HDTV</quality>
    </video>
    <audio>
      <stereo>Dolby</stereo>
    </audio>
    <previously-shown/>
  </programme>

So I added the description and the file processed file. The thing is, I'm assuming I'm going to have to do that every day now until this "bad" episode of Hawaii Five-0 ages out. Is there anyway XMLTVDB could be updated to at least not end with a fatal error when some of the elements of the episode description are missing?
find quote
pkscuot Offline
Fan
Posts: 598
Joined: Jan 2011
Reputation: 10
Location: Honolulu, HI
Post: #46
So never mind (sort of). XMLTV GUI is written in something called Lua (of which I had never heard). But there are two nice things about Lua. First, it appears to be compiled at runtime, so you can edit parts of the program and not have to recompile the entire thing. Second, it's pretty easy to read. So I was able to add some new logic to the Schedules Direct plugin that adds a description of "no description" to the output if no description exists. Now all the automation is running fine. If anyone happens to be using XMLTV GUI, feel free to PM me and I can send you the file you need to update.
find quote
bradvido88 Offline
Donor
Posts: 736
Joined: Nov 2008
Reputation: 7
Location: MN
Post: #47
(2013-01-07 02:48)pkscuot Wrote:  So never mind (sort of). XMLTV GUI is written in something called Lua (of which I had never heard). But there are two nice things about Lua. First, it appears to be compiled at runtime, so you can edit parts of the program and not have to recompile the entire thing. Second, it's pretty easy to read. So I was able to add some new logic to the Schedules Direct plugin that adds a description of "no description" to the output if no description exists. Now all the automation is running fine. If anyone happens to be using XMLTV GUI, feel free to PM me and I can send you the file you need to update.

Nice fix Smile

I haven't tested w/ schedules direct, so this is good to know. Glad to hear it's working.

XBMC.MyLibrary (add anything to the library)
ForTheLibrary (ForTheRecord & XBMC Library Integration)
SageTV & XBMC PVR Integration
Delete unused thumbs
find quote
pkscuot Offline
Fan
Posts: 598
Joined: Jan 2011
Reputation: 10
Location: Honolulu, HI
Post: #48
(2013-01-07 18:05)bradvido88 Wrote:  I haven't tested w/ schedules direct, so this is good to know. Glad to hear it's working.

Yea, I decided to go that route after the scare with the MCE guide data. BTW, what fields are "required" for ForTheLibrary to run successfully? I'll probably add the same logic to all those fields just in case.
find quote
pkscuot Offline
Fan
Posts: 598
Joined: Jan 2011
Reputation: 10
Location: Honolulu, HI
Post: #49
I'm seeing something that I'll classify as an undesirable behavior (rather than an outright bug). If I am recording two shows that end at the same time, only one of them shows up in the library. I can see in the file system that both shows are getting moved and renamed properly, and if I manually run another library scan, the other show appears in the library just fine. It seems like somehow having the ArgusTV post processor running twice at the same time is causing the second library update to either abort or not happen at all.
find quote
Post Reply