ForTheLibrary - XBMC Library & ForTheRecord/Argus PVR Integration
#1
ForTheLibrary

This program automatically adds Argus TV (formerly ForTheRecord) recordings to XBMC's video library as soon as they are done recording (and also leaves the recordings available in Argus natively).

It is similar to (better than) what I have done with SageTV and XBMC.


ForTheLibrary details and download can be found here: http://code.google.com/p/forthelibrary/ (tested with Argus 2.1)

User's Guide: http://code.google.com/p/forthelibrary/wiki/UsersGuide

Feature List: http://code.google.com/p/forthelibrary/wiki/FeatureList

Note: For this program to work, your guide data needs to have accurate Season/Episode numbers in it. I built a guide enhancer, called XMLTVDB, for the purpose of doing this. It also has some custom integration into this program. If you don't have Season/Episode numbers in your guide data, you should install XMLTVDB first.

The documentation is currently a little weak. I don't have time right now to make it better. If anyone is willing to help, send me a PM and I'll give you access to the project.
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply
#2
As another SageTV user, where you go I will probably follow. I'm downloading the pacakge right now to look through it. I'm going to put my FTR install back on my list and see how it works. I had stopped because the PVR integration, based on my reading, didn't have everything I wanted. Mostly I wanted to be able to schedule series recordings, and it looks like the PVR branch doesn't do that yet. But mostly I didn't like that the recordings weren't integrated into the XBMC library. Looks like you solved the second problem at least.
Reply
#3
(2012-03-13, 03:44)pkscuot Wrote: I had stopped because the PVR integration, based on my reading, didn't have everything I wanted. Mostly I wanted to be able to schedule series recordings, and it looks like the PVR branch doesn't do that yet.
I use the FTR Web Access to do all of the recording scheduling and management. They have a decent web UI for all that stuff.
The XBMC PVR branch UI can add "timers" to record single episodes, but that's about it right now.
The nice thing about the PVR builds is having live TV in XBMC and being able to watch recordings before they are finished. I really don't use these features much since I usually watch things a while after they have aired, but it's nice to have the option.

It's much more important imho to have the recordings in the library as soon as they are done recording Smile
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply
#4
This is excellent! Big Grin

I have been thinking about this same approach lately as I also find For The Record to be the best scheduler/recorder currently available on Windows. However, I lack the programming skills to do it.

I have installed both of your programs (XMLTVDB and ForTheLibrary) and I am currently testing them. I will let you know if I find any problems.

Some initial feedback...

XMLTVDB successfully used a translation to identify the US version of Being Human. However, XBMC incorrectly scanned the British version of Being Human. Would it be possible to include a tvshow.nfo with the correct TvDB ID if XMLTVDB is used and contains a translation for the processed show?

Many thanks for sharing this.
Reply
#5
(2012-03-14, 19:58)struggles Wrote: XMLTVDB successfully used a translation to identify the US version of Being Human. However, XBMC incorrectly scanned the British version of Being Human. Would it be possible to include a tvshow.nfo with the correct TvDB ID if XMLTVDB is used and contains a translation for the processed show?

If you just put a tvshow.nfo file in the directory where the episodes are stored that have the tvdb link to the US show, XBMC will scrape it correctly.
One quick question. With the SAGETV-XBMC integration, the script would manually archive anything it couldn't match. As I looked through the documentation and settings for FTL, I didn't see anything like that. How does FTL handle things like local/national news?
Reply
#6
OK, I feel like an idiot, but I can't figure out how to get this instruction from the user's guide:

"path\to\java.exe" -jar "path\to\ForTheLibrary.jar" "path\to\recording"

to translate into what to put into the Processing Command area of FTR, which asks for:

PATH:
ARGUMENTS:

I've tried:

PATH: path to my java.exe
ARGUMENTS: -jar "path to my FTL jar" %%FILE%%

PATH: java - jar "path to my FTL.jar"
ARGUMENTS: %%FILE%%

PATH: path to my java.exe -jar "path to my FTL jar"
ARGUMENTS: %%FILE%%

PATH: java
ARGUMENTS: -jar "path to my FTL jar" %%FILE%%

I have confirmed that the Processing Command is set to run one minute after the recording finishes and that the schedules have the Processing Command attached to them. I can run FTL from the command line, pass in a path to the recording, and it works fine.

Any suggestions?
Reply
#7
Nevermind. After fighting with FTR for two days I still have one channel that basically never tunes correctly and two more than don't tune correctly about half the time. I'm doing a restore right now and going back to SageTV. It may not be supported anymore, but it does have the advantage of being rock solid for me.
Reply
#8
(2012-03-16, 18:26)pkscuot Wrote: OK, I feel like an idiot, but I can't figure out how to get this instruction from the user's guide:

"path\to\java.exe" -jar "path\to\ForTheLibrary.jar" "path\to\recording"

to translate into what to put into the Processing Command area of FTR, which asks for:

PATH:
ARGUMENTS:

I've tried:

PATH: path to my java.exe
ARGUMENTS: -jar "path to my FTL jar" %%FILE%%

PATH: java - jar "path to my FTL.jar"
ARGUMENTS: %%FILE%%

PATH: path to my java.exe -jar "path to my FTL jar"
ARGUMENTS: %%FILE%%

PATH: java
ARGUMENTS: -jar "path to my FTL jar" %%FILE%%

I have confirmed that the Processing Command is set to run one minute after the recording finishes and that the schedules have the Processing Command attached to them. I can run FTL from the command line, pass in a path to the recording, and it works fine.

Any suggestions?


I had to try this a couple of times but this works for me...


Name: For The Library (XBMC Integration)
Path: C:\Program Files\Java\jre7\bin\java.exe
Arguements: -jar "C:\MyApps\ForTheLibrary\ForTheLibrary.jar" %%FILE%%
When: Run when the recording ends


(2012-03-14, 21:56)pkscuot Wrote: One quick question. With the SAGETV-XBMC integration, the script would manually archive anything it couldn't match. As I looked through the documentation and settings for FTL, I didn't see anything like that. How does FTL handle things like local/national news?

I am still testing but I did process a show that does not currently exist on thetvdb.com.

The show was archived correctly and appears in XBMC. The data within For The Record (like the description) is shown in XBMC. Understandably, banners and fanart are missing. But it works great!

So far, I am a happy camper...


(2012-03-16, 22:16)pkscuot Wrote: Nevermind. After fighting with FTR for two days I still have one channel that basically never tunes correctly and two more than don't tune correctly about half the time. I'm doing a restore right now and going back to SageTV. It may not be supported anymore, but it does have the advantage of being rock solid for me.

I am sorry to hear that you are having problems. I was not able to get Argus (For The Record Tuner) to work with all of my ATSC channels. However, I also need an analog tuner which Argus doesn't support.

I am using For The Record with the MediaPortal TV Server. It works great and is VERY stable for me. The initial setup took some work but the results are worth it. I am using it with a HDHomeRun tuner and a HD-PVR.

I have flip-flopped several times between SageTV and For The Record since SageTV sold out to Google. But I am now firmly planted into For The Record. The website integration, management console, and API are top rate.

Let me know if I can help you if you decide to try again in the future.

Reply
#9
(2012-03-16, 22:41)struggles Wrote: Name: For The Library (XBMC Integration)
Path: C:\Program Files\Java\jre7\bin\java.exe
Arguements: -jar "C:\MyApps\ForTheLibrary\ForTheLibrary.jar" %%FILE%%
When: Run when the recording ends

I could have sworn I tried that variation, but I'll keep it in mind when I decide to try again. I did get a news show recorded and archived the way SAGE-XBMC used to, so at least that was good.

Quote:I am sorry to hear that you are having problems. I was not able to get Argus (For The Record Tuner) to work with all of my ATSC channels. However, I also need an analog tuner which Argus doesn't support.

I am using For The Record with the MediaPortal TV Server. It works great and is VERY stable for me. The initial setup took some work but the results are worth it. I am using it with a HDHomeRun tuner and a HD-PVR.

Yea, I tried the MediaPortal TV Server today. It tunes all the channels fine, but FTR still insists it can't tune my ABC station. And with MediaPortal TV Server, FTR also decided to stop tuning my FOX station. That's when I hit system restore and gave up.

I saw on the FTR forum that other folks were having a similar problem as mine (a station, if tuned once can't be tuned again until you tune to a different channel). Even bradvido88 was having it, but the fix he used didn't help me. I'm hoping the FTR folks can get Argus to be more stable. I really liked FTR, but I need something that records what it's suppose to when its suppose to.
Reply
#10
EDITED FOR SOLUTION: SEE BELOW

(2012-03-16, 22:41)struggles Wrote: I had to try this a couple of times but this works for me...

Name: For The Library (XBMC Integration)
Path: C:\Program Files\Java\jre7\bin\java.exe
Arguements: -jar "C:\MyApps\ForTheLibrary\ForTheLibrary.jar" %%FILE%%
When: Run when the recording ends

OK, I took another stab at this yesterday. I spent a bunch of time with the MediaPortal TV Server testing channel combinations, and with that program I could do two ATSC channels OR one QAM channel. If I tried to have more than one QAM channel scanning at the same time as anything else, TV Server crashed. That was similar to a problem I used to have with WMC. So I went back to Argus. I finally got Argus stable and tuning all my channels consistently, but when I try to run FTL as a post processing command, FTR still doesn't call it (or at least FTL never runs). Here's what I have in my setup:

Name: ForTheLibrary
Path: C:\Program Files\Java\jre7\bin\java.exe
Arguments: -jar "C:\Users\HTPC\Documents\CustomApps\ForTheLibrary\ForTheLibrary.jar" %%FILE%%
When: Run at a Fixed Time after Program Ends (1 minute)

I looked through my FTR logs, and don't see anything indicating it even tried to do a post processing command, but then I don't know if it even logs that kind of event. I triple checked, and the job is assigned to all schedules. I'm going to try again with Run when recording ends, but I don't have very high hopes right now.

EDIT:Well how about that. Changing FTR to Run when recording ends worked. Now I need to delete that episode of Clifford the Big Red Dog before my wife starts wondering about me (we don't have any kids). Big Grin
Reply
#11
(2012-03-14, 21:56)pkscuot Wrote:
(2012-03-14, 19:58)struggles Wrote: XMLTVDB successfully used a translation to identify the US version of Being Human. However, XBMC incorrectly scanned the British version of Being Human. Would it be possible to include a tvshow.nfo with the correct TvDB ID if XMLTVDB is used and contains a translation for the processed show?

If you just put a tvshow.nfo file in the directory where the episodes are stored that have the tvdb link to the US show, XBMC will scrape it correctly.
One quick question. With the SAGETV-XBMC integration, the script would manually archive anything it couldn't match. As I looked through the documentation and settings for FTL, I didn't see anything like that. How does FTL handle things like local/national news?
This program already creates tvshow.nfo with the tvdb id in it (if you use XMLTVDB to enhance your XMLTV).


As far as the processing command.
I have FTR run a .cmd file which has this in it:
Code:
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar "C:\FTR-XBMC\ForTheLibrary.jar" %1
and in FTR, the only argument is %%FILE%% and I have it set to "Run when recording ends"

FTL will manually archive anything that doesn't have valid season/episode information in the FTR guide data (just like SAGE-XBMC did), uising as much info as possible from FTR.
However, it does not attempt to generate fanart, it will just leave it blank.

Glad to hear it's working for people. Everything is solid for me right now, so let me know if you run into any issues.
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply
#12
Happy to see this get started... loaded the script and tried to go through my manual recordings and ran into lots of errors. Is the NPE below expected?

Code:
03/22/2012 07:40:19 PM DEBUG   POST data (Content-Length: 109) =
                                   "\\\\QUARTZ-THEATER\\Recorded TV\\House\\House (Living the Dream - S04E14) (recoded Mon, 01-23-2012,0005).ts"
03/22/2012 07:40:19 PM DEBUG   HTTP response code is: 200
03/22/2012 07:40:19 PM ERROR   Failed to get Recording information from FTR webservice for recording: \\QUARTZ-THEATER\Recorded TV\House\House (Living the Dream - S04E14) (recoded Mon, 01-23-2012,0005).ts
03/22/2012 07:40:19 PM ERROR   General error processing recording: \\QUARTZ-THEATER\Recorded TV\House\House (Living the Dream - S04E14) (recoded Mon, 01-23-2012,0005).ts
                                   java.lang.NullPointerException
                                   forthelibrary.ForTheLibrary.processRecordings(ForTheLibrary.java:342)
                                   forthelibrary.ForTheLibrary.<init>(ForTheLibrary.java:323)
                                   forthelibrary.ForTheLibrary.main(ForTheLibrary.java:81)

Second, the .nfo file creation seems to be failing - i'm wondering if it's because an extra space is being added to the end of the UNC path (note the space Jeopardy! \tvshow.nfo.... you can also highlight on the directory creation at the end and see an empty space

Code:
03/22/2012 07:40:19 PM INFO    Will manually archive this recording as a Season 0 (special) using .nfo files.
03/22/2012 07:40:19 PM INFO    Creating Series Directory at: \\QUARTZ-THEATER\Recorded TV\_TV Shows\Jeopardy!
03/22/2012 07:40:19 PM INFO    Creating tvshow.nfo at: \\QUARTZ-THEATER\Recorded TV\_TV Shows\Jeopardy! \tvshow.nfo
03/22/2012 07:40:19 PM ERROR   General error processing recording: \\QUARTZ-THEATER\Recorded TV\Jeopardy!\Season #\s#e6333 - # (Wed, 2012-03-14_1630).ts
                                   java.io.FileNotFoundException: \\QUARTZ-THEATER\Recorded TV\_TV Shows\Jeopardy! \tvshow.nfo (The system cannot find the path specified)
                                   java.io.FileOutputStream.open(Native Method)
                                   java.io.FileOutputStream.<init>(Unknown Source)
                                   org.apache.commons.io.FileUtils.openOutputStream(FileUtils.java:333)
                                   org.apache.commons.io.FileUtils.writeStringToFile(FileUtils.java:1621)
                                   org.apache.commons.io.FileUtils.write(FileUtils.java:1707)
                                   org.apache.commons.io.FileUtils.write(FileUtils.java:1662)
                                   forthelibrary.ForTheLibrary.determineNewLocation(ForTheLibrary.java:966)
                                   forthelibrary.ForTheLibrary.determineNewLocation(ForTheLibrary.java:855)
                                   forthelibrary.ForTheLibrary.processRecordings(ForTheLibrary.java:583)
                                   forthelibrary.ForTheLibrary.<init>(ForTheLibrary.java:323)
                                   forthelibrary.ForTheLibrary.main(ForTheLibrary.java:81)

One more note - it seems like a lot of my recordings never moved over to the archive folders... Does this script only move items that are in the FTR db? i have a lot of older recordings in this directory that are no longer managed by FTR. Should i separate these and not let this script scan over them?
Reply
#13
(2012-03-23, 03:18)actapon Wrote: Happy to see this get started... loaded the script and tried to go through my manual recordings and ran into lots of errors. Is the NPE below expected?

One more note - it seems like a lot of my recordings never moved over to the archive folders... Does this script only move items that are in the FTR db? i have a lot of older recordings in this directory that are no longer managed by FTR. Should i separate these and not let this script scan over them?

I don't think FTL is really designed to go through old files. It's designed to run on a file right after the recording is done. I suspect that first one is failing because there isn't any data in the FTR database about a recording that is two months old. I'm not sure how your getting the script to scan over a group of files at all, so I'm not surprised the other older ones are failing as well. If you really want to get those into your XBMC library you can create the folders and rename them by hand (or use one of the file renamer programs).
Reply
#14
I guess I'm going to be the problem child. Big Grin

Everything on the FTR end is working now, as is the XBMC integration. But since I got this running I have not been able to get the XMLTV stuff to work consistently. I'm using mce2xml to download an XML file and using Task Scheduler to download the file every day at 4pm. That works fine. I have XMLTVDB.jar started and watching that directory. Twice this has all worked and FTR has had the updated enhanced scheduled. Every other time I look, the XMLTVDB DEBUG.log file says it was updated at 4pm, but there is only an empty line at the end of the file. Everything else in the log has to do with the previous days run. None of the other XMLTVDB log files are touched. The file you're suppose to delete to stop the listener is still there, but there is no java process running.

If I delete that process file, relaunch XMLTVDB and then move the xmltv file back into the other directory, it processes fine.

I could obviously write a script that would shut down the listener and then launch it again just before 4pm, but that seems suboptimal to me. I'm not sure where I should be looking for what log files to give me a clue what's happening.

Thanks.
Reply
#15
(2012-03-23, 03:40)pkscuot Wrote:
(2012-03-23, 03:18)actapon Wrote: Happy to see this get started... loaded the script and tried to go through my manual recordings and ran into lots of errors. Is the NPE below expected?

One more note - it seems like a lot of my recordings never moved over to the archive folders... Does this script only move items that are in the FTR db? i have a lot of older recordings in this directory that are no longer managed by FTR. Should i separate these and not let this script scan over them?

I don't think FTL is really designed to go through old files. It's designed to run on a file right after the recording is done. I suspect that first one is failing because there isn't any data in the FTR database about a recording that is two months old. I'm not sure how your getting the script to scan over a group of files at all, so I'm not surprised the other older ones are failing as well. If you really want to get those into your XBMC library you can create the folders and rename them by hand (or use one of the file renamer programs).

FTL can process your old recordings. You just need to pass the full UNC path of the directory they are located in and it will process all recordings in that directory.
However, it can not process recordings that FTR does not know about... So you old recordings cannot be archive by this tool and that's why you're seeing those errors.

(2012-03-28, 00:02)pkscuot Wrote: I guess I'm going to be the problem child. Big Grin

Everything on the FTR end is working now, as is the XBMC integration. But since I got this running I have not been able to get the XMLTV stuff to work consistently. I'm using mce2xml to download an XML file and using Task Scheduler to download the file every day at 4pm. That works fine. I have XMLTVDB.jar started and watching that directory. Twice this has all worked and FTR has had the updated enhanced scheduled. Every other time I look, the XMLTVDB DEBUG.log file says it was updated at 4pm, but there is only an empty line at the end of the file. Everything else in the log has to do with the previous days run. None of the other XMLTVDB log files are touched. The file you're suppose to delete to stop the listener is still there, but there is no java process running.

If I delete that process file, relaunch XMLTVDB and then move the xmltv file back into the other directory, it processes fine.

I could obviously write a script that would shut down the listener and then launch it again just before 4pm, but that seems suboptimal to me. I'm not sure where I should be looking for what log files to give me a clue what's happening.

Thanks.
I have also seen this behaviour. The listener appears to be ending and I'm not sure why as of yet. It's not consistently failing for, me so it's hard to debug. I'm going to look at the code and see if anything looks fishy.
In the meantime, i have my scheduled task to repeat every 24 hours and selected "If task is already running, do not start a new instance"....

I'll let you know what I find.
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply

Logout Mark Read Team Forum Stats Members Help
ForTheLibrary - XBMC Library & ForTheRecord/Argus PVR Integration1