XBMC.MyLibrary - Scan any source to the library (Hulu/Netflix/Plugins)

  Thread Rating:
  • 5 Votes - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
bradvido88 Offline
Member+
Posts: 737
Joined: Nov 2008
Reputation: 7
Location: MN
Post: #341
When you reboot you'll need to run MyLibrary again because the PlayOn upnp links change after reboot.
I run mine on a 2 hour interval to make sure everything is always current

XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Delete unused thumbs
find quote
kevdawg Offline
Junior Member
Posts: 27
Joined: Jan 2008
Reputation: 0
Location: Pompano Beach, FL
Post: #342
I'm confused about how PlayOn works with this. Is there another thread with more info on adding it as a source? Also, I'm assuming the use of PlayOn with this requires us to pay for a PlayOn account?

Thanks
find quote
haenchensd Offline
Junior Member
Posts: 38
Joined: Jan 2011
Reputation: 0
Post: #343
kevdawg Wrote:I'm confused about how PlayOn works with this. Is there another thread with more info on adding it as a source? Also, I'm assuming the use of PlayOn with this requires us to pay for a PlayOn account?

Thanks

You will need to add a source for the subdirectory of interest in PlayOn (Netflix?). Then MyLibrary will use this source to create .strm files to the videos within that source (it must be done this way because XBMC sees everything in UPNP sources as streams, not videos). These .strm files will point XBMC to open the correct stream from PlayOn and MyLibrary does some magic to get them all in your database. However, every time PlayOn restarts, the UPNP location of things will change, thus if you still want the .strm files to point to the right location you need to rerun MyLibrary which will update the location.

And yes, if you want to use PlayOn for more than 2 weeks you will have to pay for the service.
find quote
ihaterich Offline
Member
Posts: 71
Joined: Jul 2010
Reputation: 1
Post: #344
I'm trying to get The Price is Right episodes from cbs.com

Everything appears to work correctly except the resulting folder in dropbox is named The.Price.Is.Right which causes the show not to scrape correctly. Is there anyway to correct the spacing of the name? Here is the code I'm using.

<FreeCable path="plugin://plugin.video.free.cable" recursive="true" custom_parser="PlayOn">
<subfolder name="CBS/Daytime/The Price is Right/Full Episodes" type="episodes" max_videos="5">
</subfolder>
</FreeCable>
(This post was last modified: 2012-03-12 11:45 by ihaterich.)
find quote
barney_1 Offline
Junior Member
Posts: 37
Joined: Mar 2008
Reputation: 2
Post: #345
Thank you BradVido88 for your hard work on this. I just set it up this weekend and I love it! I run a Linux server and worked up a little script that will automatically run your program. Since XBMC.MyLibrary depends on XBMC running, I also built in functionality to launch and exit XBMC if it was not already running. If it was already running it just leaves it alone and exits. Here it is for anyone else that's interested.

I've done some commenting to give you an idea of what's going on. It uses 'curl' to send an HTTP exit command to XBMC so you've got to have the correct path to control it. You also need to have correct path information for XBMC.MyLibrary to launch.
Code:
#!/bin/bash

##########################
#This script will run XBMC.MyLibrary
#    Because that program needs XBMC to already be running
#    this script will also check to see if it is running,
#    launch XBMC if it was not running, then exit or
#    leave it running depending on the starting circumstances.
#
# Last revision: 3/12/12
###########################

#Check if XBMC is running
if [ `pidof xbmc.bin` ];  then
    echo 'XBMC Already Running'
    RUNNING=1
else
    echo 'XBMC Not Running - script will start and stop it to facilitate XBMC.MyLibrary'
    RUNNING=0
    xbmc &    #launch XBMC
    echo 'Pausing 5 seconds for XBMC to launch'
    sleep 5
fi

#Run XBMC.MyLibrary program  NOTE: You must set your own paths here!!!!
java -jar "/Lenny/scripts/XBMC.MyLibrary-1.3.1/dist/XBMC.MyLibrary.jar" "/Lenny/scripts/XBMC.MyLibrary-1.3.1/"

#Exit XBMC if this script was responsible for launchig it in the first place
if [ "$RUNNING" == 1 ]; then echo Ending script without exiting XBMC
else
    echo 'Exiting XBMC'
    #Send HTTP command for XBMC to exit  NOTE: You must set your own paths here!!!!
    curl 'http://xbmc:xbmc@192.168.1.105:8080/xbmcCmds/xbmcHttp?command=Exit()'
fi

Save this script and make it executable (chmod +x scriptname.sh) and it is then possible to use a cron job to run it. Since XBMC will launch a GUI you must specify a display in the cron command. Here is what I set up which runs the script once a day at 7:45am (add this using 'crontab -e'):
Code:
45 07 * * * env DISPLAY=:0 /Lenny/scripts/launch-xbmc-mylibrary.sh
find quote
bradvido88 Offline
Member+
Posts: 737
Joined: Nov 2008
Reputation: 7
Location: MN
Post: #346
(2012-03-12 11:40)ihaterich Wrote:  I'm trying to get The Price is Right episodes from cbs.com

Everything appears to work correctly except the resulting folder in dropbox is named The.Price.Is.Right which causes the show not to scrape correctly. Is there anyway to correct the spacing of the name?

XBMC will handle the dots in the filename just fine. If you need to help XBMC scrape the right show, browse to the folder in XBMC 'files' mode, then hit 'i' for information and you can specify the name to use and the correct show.

@barney_1
Nice work on the script. I'm not a *nix guy by any means, so I'm sure this will help others out there!

XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Delete unused thumbs
(This post was last modified: 2012-03-13 16:47 by bradvido88.)
find quote
barney_1 Offline
Junior Member
Posts: 37
Joined: Mar 2008
Reputation: 2
Post: #347
Is there a way to prevent shows removed from the library from being scanned back in?

I'm using the Bluecop plugin to add my Hulu Queue to the library. After I've watched a show I remove it from the library. Whether I also delete the file or not the show will be added back in the next time XBMC.MyLibrary runs.

Has anyone found a way to prevent this?
find quote
wilson.joe Offline
Fan
Posts: 449
Joined: Nov 2010
Reputation: 6
Location: Salem, Or
Post: #348
I just set xbmc to hide watched, hulu will eventually remove given videos from its
library as they push other episodes in and with time it will be removed.

(2012-03-15 16:10)barney_1 Wrote:  Is there a way to prevent shows removed from the library from being scanned back in?

I'm using the Bluecop plugin to add my Hulu Queue to the library. After I've watched a show I remove it from the library. Whether I also delete the file or not the show will be added back in the next time XBMC.MyLibrary runs.

Has anyone found a way to prevent this?
find quote
Aenima99x Offline
Member+
Posts: 1,036
Joined: Aug 2007
Reputation: 7
Location: California
Post: #349
Bradvido - Seems that some changes were done in the JSONRPC/Webserver functions on March 27th and it's broken XBMC.MyLibrary. Any idea what it would take to fix this? Thanks!

Log snip
Quote:03/30/2012 12:03:41 AM INFO Init Testing connectivity to JSON-RPC interface...
03/30/2012 12:03:41 AM ERROR Init Failed to POST to http://192.168.1.2:9006/jsonrpc
java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:78)
at java.io.InputStreamReader.<init>(InputStreamReader.java:72)
at utilities.tools.readStream(tools.java:1119)
at utilities.tools.post(tools.java:1099)
at utilities.XbmcJsonRpc.callMethodWithRetry(XbmcJsonRpc.java:748)
at utilities.XbmcJsonRpc.callMethod(XbmcJsonRpc.java:699)
at utilities.XbmcJsonRpc.ping(XbmcJsonRpc.java:608)
at mylibrary.importer.importVideos(importer.java:175)
at mylibrary.importer.main(importer.java:35)

03/30/2012 12:03:41 AM WARNING Init The response from XBMC is not a valid JSON string:
find quote
bradvido88 Offline
Member+
Posts: 737
Joined: Nov 2008
Reputation: 7
Location: MN
Post: #350
(2012-03-30 16:58)Aenima99x Wrote:  Bradvido - Seems that some changes were done in the JSONRPC/Webserver functions on March 27th and it's broken XBMC.MyLibrary. Any idea what it would take to fix this? Thanks!
What version of XBMC are you using? It is working fine for Eden Final for me....

XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Delete unused thumbs
find quote
Post Reply