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

  Thread Rating:
  • 9 Votes - 4.22 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
bradvido88 Offline
Donor
Posts: 796
Joined: Nov 2008
Reputation: 9
Location: MN
Post: #1
XBMC.MyLibrary - Import anything to your video library.
(Original idea was proposed here)

Code Repository (post bugs here): http://code.google.com/p/xbmc-mylibrary/

Please note: this program is not an XBMC Add-on. It is an external tool.

User's Guide (read this before posting questions)

The idea of this program is that when you want to play a movie/tv episode, you shouldn't have to think "Ok, is this movie stored locally, or is it on Netflix or Hulu, or maybe Amazon Video? You shouldn't have to search through your plugins to find the movie. The movie should just be in your library and when you click play, it should play from whatever source has it available.

Frodo Release:
Download (v1.4.1) - Compatible with Frodo & Gotham

Eden Release:
Download (v1.3.3) - Compatible with Eden Final


Old, unsupported, Dharma release:
Download (v1.1-beta) - compatible with Dharma



This code has been released as an open-source project. If you can improve it, please do so Smile
http://code.google.com/p/xbmc-mylibrary/

This program is for you if:
You know how to edit xml, configure sources in XBMC, edit a command file, post a debug log, etc.
If you don't have that skillset, this program is probably not for you. There is currently no GUI.

Overview:
This program lets you add content from anything, such as Plugins, upnp:// sources, etc. to XBMC's native video library. I created a sample video of what the end product looks like.

What's this program really doing?
This what the program basically does in order to get streaming content in the library:

  1. Use XBMC's JSON-RPC API to scan a source, based on the user's SearchFilters. The source an be any source that XBMC understands, be it a local directory, a plugin, an add-on, a upnp server, etc.
  2. Save the videos found from the source (filtered by user-defined searchfilters) as .strm files.
  3. Do some JSON-RPC magic to allow XBMC to scrape and save these .strms in its video library.
So, this program acts as an integration layer between your video source and xbmc's video database like so:
[Video source (plugin/upnp/etc)] <<--->>[XBMC.MyLibrary] <<--->>[XBMC Video Library]

Change Log:

v 1.4.3 - JSON-RPC compatibility fixes.
v 1.4.2 - Parsing fixes.
v 1.4.1 - Removed all dependencies on direct XBMC SQL execution and replaced with JSON-RPC. Other bug fixes.
v 1.4.0 - Frodo JSON-RPC compatibility. Added movie_tags option. Improved parsing. Overhauled backend code.
v 1.3.3 - Added logical OR support with double pipes in the contains element.Fixed bugs in the runtime filter. Added series name override. Added generic type (as apposed to episode, movie, or music_video). Added a couple examples to the config file to show proper usage of the above enhancements. Added series and episode name regex parsing (see parser element and example usage in the TED Talks filter).
v 1.3.2 - New features from angrycamel. (depricated)
v 1.3.1 - Improved support for Amazon Prime archiving. Better matching of duplicate TV Episodes from different sources.
v 1.3 - Added support for native .strm's. Dummy mpg's are no longer needed. Many bug fixes and clean up. All SQL queries now uses prepared statements instead of building the query on the fly and using escape chars. Removed support for downloading because it has gotten too messy to maintain.
v 1.2.1 - More Eden compatibility updates. Unused TV Show directories are no deleted in order to preserver user's cutom data incase episodes get re-added at a later date. SQL Queries for local paths have ben fixed. Other minor bug fixes.
v 1.2 - Eden compatibility updates for JSON-RPC interface. Changed default transport method from "Raw" to "HTTP" and got rid of curl. Other minor bug fixes.
v 1.1 - Numerous bug fixes. Improved tracking of meta-data to avoid double lookups. Added option to compress downloaded videos. Improved downloading process. Disabled icefilms support to keep everyone happy.
v 1.0 - Initial release.

Thanks to all that this program depends on:
XBMC JSON-RPC API, XBMC Plugin Developers, SQLite, Java, TheTVDB.com, Yahoo Music Video API


XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
(This post was last modified: 2014-06-03 22:50 by bradvido88.)
find quote
bradvido88 Offline
Donor
Posts: 796
Joined: Nov 2008
Reputation: 9
Location: MN
Post: #2
FAQ
  • I'm having a problem, how do I get help?
    If you have problems, paste the contents of your XBMC.MyLibrary.log and your Config.xml file to www.pastebin.com, and post the links to them here, along with a detailed description of what you're trying to do.
  • I can't figure out how to create a SearchFilter for the videos I want.
    See the samples here. If you still can't figure it out, ask for help in this forum.
  • Hey, the prefixes messed up the sorting in XBMC.
    You can fix it by modifying sorttokens in advancedsettings
    Example:
    Code:
    <!-- Tokens to ignore when sorting. 'the' is alwasy ignored -->
          <sorttokens>
            <token>(H) The</token><!--Order they appear here matters, longer tokens should come first, so "(H) The" before "(H)" -->
            <token>(H)</token>
            
            <token>[N] The</token>
            <token>[N]</token>        
                    
          </sorttokens>


XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
(This post was last modified: 2012-11-06 22:50 by bradvido88.)
find quote
bradvido88 Offline
Donor
Posts: 796
Joined: Nov 2008
Reputation: 9
Location: MN
Post: #3
Known Working Video Sources:
  • PlayOn (Including Netflix/Hulu/CBS/Comedy Central/VEVO...)
  • BlueCop's addon (Hulu, Amazon Prime, Yahoo Music Videos, etc...)
  • Any add-on that follows standard naming conventions for its videos.

XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
(This post was last modified: 2012-01-31 18:11 by bradvido88.)
find quote
icky Offline
Senior Member
Posts: 155
Joined: Aug 2008
Reputation: 5
Post: #4
so i have d/l and had a little play,

tried editing the searchfilter in config.xml to stream baywatch from the icefilms plugin...

but cannot find the right path to the baywatch folder i reckon....

i essentially copy and pasted the icefilms hd720p search filter and changed the path to what i thought the baywatch one was,

ie

tv shows/a-z directories/b/baywatch/

changed movie_set to tv shows.... and that was it!

does this scream noob!Confused




EDIT

Right, took my search filter out and just ran the generic hd720p icefilms one....

for some reason it doesnt import them into libraryConfused

the cmd file seems to work ok but nothing ends up in xbmc

http://www.mediafire.com/?jcizdlgipoklalz

thats my log file
(This post was last modified: 2011-04-02 09:50 by icky.)
find quote
bradvido88 Offline
Donor
Posts: 796
Joined: Nov 2008
Reputation: 9
Location: MN
Post: #5
The xbmc log doesn't help me much. I need the XBMC.MyLibrary.log from this program.

Did you add the {dropbox}\Movies as a source in xbmc?

XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
find quote
icky Offline
Senior Member
Posts: 155
Joined: Aug 2008
Reputation: 5
Post: #6
bradvido88 Wrote:The xbmc log doesn't help me much. I need the XBMC.MyLibrary.log from this program.

Did you add the {dropbox}\Movies as a source in xbmc?

added it after i ran the cmd file... should it be added before?

http://www.mediafire.com/?0aby08y1j0hhibh
find quote
bradvido88 Offline
Donor
Posts: 796
Joined: Nov 2008
Reputation: 9
Location: MN
Post: #7
They won't show up in you library until you add the source in XBMC and set the content to whatever it is (Movies/TV Shows/Music Videos), and then run my program.

From the log, my program is running fine and it is finding the videos correctly. They just haven't been scanned to XBMC yet.

Set up the source in XBMC, then run the program again.

XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
(This post was last modified: 2011-04-02 20:48 by bradvido88.)
find quote
icky Offline
Senior Member
Posts: 155
Joined: Aug 2008
Reputation: 5
Post: #8
right... have re setup everything... all music videos and movies are scanned into library.

however none of the videos want to stream, all i get is playback error failed

http://www.mediafire.com/?2yhmeqnz58p83lm
find quote
icky Offline
Senior Member
Posts: 155
Joined: Aug 2008
Reputation: 5
Post: #9
btw i am using a nightly build.... just in case this makes a difference to your script?
find quote
bradvido88 Offline
Donor
Posts: 796
Joined: Nov 2008
Reputation: 9
Location: MN
Post: #10
No, nightly should be OK.

My guess is that the source that is set up in XBMC is different than the source specified as the dropbox.

If you set logging_level to DEBUG, I will know for sure.

I see your music video dropbox is "C:\dropbox\Music Videos\".
In XBMC, is it set up as "C:/dropbox/Music Videos/"?

I have to admit that I've only tested using UNC (smb://) sources, so there may be some tuning that needs to be done for local sources.

EDIT -Yes indeed, I've found a bug where local sources are not named correctly (should use a "\" instead of a "/").

I'll make a fix for this. In the meantime, if you use network shares as your sources, and change your dropbox to a network share, it will work.

XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
(This post was last modified: 2011-04-02 21:12 by bradvido88.)
find quote
icky Offline
Senior Member
Posts: 155
Joined: Aug 2008
Reputation: 5
Post: #11
just running your program again with a debug log,

dropbox is set up exactly where it should be in xbmc, it get me the directors info etc but just doesnt stream Sad

http://www.mediafire.com/?jzyc5dpnc56kbks
(This post was last modified: 2011-04-02 21:17 by icky.)
find quote
bradvido88 Offline
Donor
Posts: 796
Joined: Nov 2008
Reputation: 9
Location: MN
Post: #12
I made a quick 1 line change.
Replace your current XBMC.MyLibrary.jar with this one. (it is in the /dist subfolder of your installation dir)

I also updated the main download.

Should now work correctly for local dropbox as well as shared dropbox.

XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
find quote
icky Offline
Senior Member
Posts: 155
Joined: Aug 2008
Reputation: 5
Post: #13
i can only imagine we are on different sides of the atlantic, so i will ask now.... is there any chance of you quickly making a search filter for icefilms tv shows a-z directories....

so that i can edit it to the show i want etc... just the basic template is needed...

this would be awesome!1
find quote
icky Offline
Senior Member
Posts: 155
Joined: Aug 2008
Reputation: 5
Post: #14
http://www.mediafire.com/?n5c65x2ah146amp

http://www.mediafire.com/?ws8lz4td4wo3p6e


right all movies are now scanned into an icefilms folder in movie library, and they stream!!!!

however...... it starts half way thru the movie on some and stops nearly immediately on others.

plus the music videos do not work, but i dont think this is due to your program i think this is to do with the plugin itself as have tried it thru the plugin and they wont stream either Sad
find quote
bradvido88 Offline
Donor
Posts: 796
Joined: Nov 2008
Reputation: 9
Location: MN
Post: #15
BlueCop has acknowledged that many of his plugin's sources are not currently working (Yahoo Music Videos). That's on the plugin, not this script.

XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
(This post was last modified: 2012-04-20 21:07 by bradvido88.)
find quote
Post Reply