Kodi Community Forum
XBMC.MyLibrary - Scan any source to the library (Hulu/Netflix/Plugins) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+--- Thread: XBMC.MyLibrary - Scan any source to the library (Hulu/Netflix/Plugins) (/showthread.php?tid=98210)



OS X config - kfred - 2012-02-08

Ginsengbomb, I'm curious about the same thing! I only spent about 5 minutes on it, after realizing that I couldn't edit the .cmd file without cmd.exe. Please, anyone, if you have any input for ginseng and me to get started working on a mac setup, let us know!


- bradvido88 - 2012-02-08

Aenima99x Wrote:Bradvido - Any update on this? I'd love to get this fixed so I can kill the WinXP VM and just run it straight from my Ubuntu box. Thanks!
Yes, this should be working on all OS's now.
Run this command on your OS to run it:
java -jar "path/to/XBMC.MyLibrary.jar" "path/to/XBMC.MyLibrary folder"

actapon Wrote:I recently made a change to my system so that my database was moved to mysql and all my video sources were accessible over upnp or smb shares.

To transition mylibrary, i cleared out the old video sources in xbmc related to my library, deleted the strm files, and purged the cache db files used by mylibrary. I also updated mylibrary's config file to use unc instead.

But... the update meta data part of the script is failing: "SKIPPING meta-data update: the video is not yet in XBMC's library"

I can see in your source that you're substituting the unc paths with smb paths for xbmc's database, so i was puzzled. I was staring at the values in xbmc's episode information and my library's log to find the problem, but didn't see it. When i opened the mysql db, i saw it right away (i think). My smb path in xbmc appears to be holding my un and pw in clear text after the smb:\\.

first - i'm not happy my pw is in clear text there - not the problem of this forum though.

Second - how can i get the meta data to update my db entries when my smb path contains a username and password?
Yeah I knew that XBMC did that, but I didn't handle it in my code.
I can create a fix to allow any wildcard where the un/pw would be.
Otherwise, i'd suggest you configure it so you don't need to store the un/pw in XBMC:

either run XBMC under a user account that already has access to the SMB share
...or configure the share the allow read access to everyone

then delete the un/pw from XBMC's source for that share.

Otherwise you can wait until i get a fix patched for it or submit one yourself.

nocut12 Wrote:Is there a way to rename movies/TV shows automatically with this? I don't see a way to do it in the search filters.

I'm looking to append dates to certain movies and TV shows so that the scraper will recognize it correctly. Doing it manually is works, but it's a huge pain and each time I run this program it messes up renamed shows.
No, that's not really what this program is for.

ginsengbomb Wrote:Has anybody messed around with getting this to work on OS X? I just took an initial stab, played around for 45 minutes or so, and didn't get terribly far. I'm going to have another go at it later tonight but was wondering if anybody else has tried and has some pointers.
Yes, it should work just the same as Windows and *nix. See above.

kfred Wrote:Ginsengbomb, I'm curious about the same thing! I only spent about 5 minutes on it, after realizing that I couldn't edit the .cmd file without cmd.exe. Please, anyone, if you have any input for ginseng and me to get started working on a mac setup, let us know!
The cmd file is supplied just for an example. You don't need to use it, just run the java command i mentioned above.


- ginsengbomb - 2012-02-08

@bradvido88: Thank you sir! I'll give this another go later this evening and report back.

Reporting back:
Works beautifully. This is a fantastic tool!


- Aenima99x - 2012-02-08

bradvido88 Wrote:Yes, this should be working on all OS's now.
Run this command on your OS to run it:
java -jar "path/to/XBMC.MyLibrary.jar" "path/to/XBMC.MyLibrary folder"

Cool Thanks working perfect!

Edit - Actually a couple more things related to the paths. It's creating a \logs folder instead of using the logs folder and naming the log files \logs\XBMC.MyLibrary.log. Also, it's creating a \res\temp.xml instead of putting the temp.xml in the res folder. Thanks Bradvido.


- actapon - 2012-02-26

Playing around with custom filters and running into some odd issues. Two that i don't know how to fix.

1- I have the following filter with "type" specifically set to "episodes", but when mylibrary scans, it's dumping all of the strm files into my movies dropbox.

Code:
<Netflix custom_parser="PlayOn">
    <subfolder name="Instant Queue/Genres/Sports &amp; Fitness" recursive="true" type="episodes" prefix="[Netflix] "></subfolder>    
</Netflix>

Logs are even pretty clear it just considers the strm files movies:
Code:
02/26/2012 12:19:06 PM NOTICE  Summary:Netflix/ TV Success: 0, TV Fail: 0
02/26/2012 12:19:06 PM NOTICE  Summary:Netflix/ Movie Success: 5, Movie Fail: 0

Can you explain the "type" field for the filters and how the parser is determining whether a file should be a movie or a tv episode?

My second problem also appears to be a parsing issue, but is much more complicated i fear. I'm trying to add a playon:tbs filter to add "conan" to my library. It appears the TVDB lookup fails in the mylibrary scan which leaves me getting folders in "TV Shows" for each date (2/14/2012), each containing one episode, but no root "conan" folder

My config is this:
Code:
<TBS custom_parser="PlayOn">
    <subfolder name="Full Episodes/Conan" type="episodes" prefix="[TBS] "></subfolder>    
</TBS>


The logs indicate the lookup fails and will consider the episode special
Code:
02/26/2012 11:39:37 AM WARNING TVDB             Ending lookup. No series could be found by querying TheTVDB: http://www.thetvdb.com/api/GetSeries.php?seriesname=2%2F24%2F2012. Will try to archive this video again later.
02/26/2012 11:39:37 AM INFO    Archiving        Archiving as a special (Season zero) episode since TVDB lookup failed....

I guess my question is, if the tvdb lookup fails, is there a way to specify a show name in the filter and dump the strm files in that folder? That way a bunch of custom parsing doesn't create an unusable directory structure?


- actapon - 2012-02-26

bradvido88 Wrote:Yeah I knew that XBMC did that, but I didn't handle it in my code.
I can create a fix to allow any wildcard where the un/pw would be.
Otherwise, i'd suggest you configure it so you don't need to store the un/pw in XBMC:

either run XBMC under a user account that already has access to the SMB share
...or configure the share the allow read access to everyone

then delete the un/pw from XBMC's source for that share.

Otherwise you can wait until i get a fix patched for it or submit one yourself.

Following up on an older problem i had regarding unc path vs smb path containing un/pw's. I can't remove the UN/PW because i'm running cross platform (win/mac/atv and hopefully some day android/linux) and i don't have the same credentials on each.

I'm not in a rush to get this enhancement, but just thought i'd share my situation. Thanks for the great tool (still hoping for a local file dvr (ie 4therecord) scrapper that can force files into my library Nod)


- actapon - 2012-02-26

One more post for today Smile

With xbmc.mylibrary now filling my movie and tv library with strm files - i have a very rich library with makes my on demand viewing very easy. But as part of this project, i also wanted to create a lazy viewing experience - the best plugin i've seen for this is pseudotv.

pseudotv works great with local files and ok with streaming files. There are two differences namely. First - streaming files take a long time to initialize (up to 10 seconds), so channel surfing to a "streamed channel" is slightly irritating. (but i'd argue not much more irritating then what digital tv has to offer today... sob's). For this problem, i don't see a workaround, and i'm not really looking for one. Just argues for more locally stored content for quicker access

Second, where pseudotv has a slight stroke of genius (i think), episodes or movies start part way through and continue "playing" in the background when you switch to other channels. But, this requires that on channel startup, a start at time can be provided. Streaming files don't seem to support this. They always start at the beginning. Do you guys know why this is? Maybe an enhancement i should push out to another XBMC forum? I thought i'd start here with this community of users before hitting pseudotv or creating a new post.


- bradvido88 - 2012-02-26

actapon Wrote:Playing around with custom filters and running into some odd issues. Two that i don't know how to fix.

1- I have the following filter with "type" specifically set to "episodes", but when mylibrary scans, it's dumping all of the strm files into my movies dropbox.

Code:
<Netflix custom_parser="PlayOn">
    <subfolder name="Instant Queue/Genres/Sports &amp; Fitness" recursive="true" type="episodes" prefix="[Netflix] "></subfolder>    
</Netflix>

Logs are even pretty clear it just considers the strm files movies:
Code:
02/26/2012 12:19:06 PM NOTICE  Summary:Netflix/ TV Success: 0, TV Fail: 0
02/26/2012 12:19:06 PM NOTICE  Summary:Netflix/ Movie Success: 5, Movie Fail: 0

Can you explain the "type" field for the filters and how the parser is determining whether a file should be a movie or a tv episode?
This is because the custom PlayOn parser automatically determines if the files are movies or tv shows, so it ignores what you set as your type. Is it incorrectly classifying them? For me, the PlayOn parser and Netflix work very well at auto-determining if its a movie or episode.
actapon Wrote:My second problem also appears to be a parsing issue, but is much more complicated i fear. I'm trying to add a playon:tbs filter to add "conan" to my library. It appears the TVDB lookup fails in the mylibrary scan which leaves me getting folders in "TV Shows" for each date (2/14/2012), each containing one episode, but no root "conan" folder

My config is this:
Code:
<TBS custom_parser="PlayOn">
    <subfolder name="Full Episodes/Conan" type="episodes" prefix="[TBS] "></subfolder>    
</TBS>


The logs indicate the lookup fails and will consider the episode special
Code:
02/26/2012 11:39:37 AM WARNING TVDB             Ending lookup. No series could be found by querying TheTVDB: http://www.thetvdb.com/api/GetSeries.php?seriesname=2%2F24%2F2012. Will try to archive this video again later.
02/26/2012 11:39:37 AM INFO    Archiving        Archiving as a special (Season zero) episode since TVDB lookup failed....

I guess my question is, if the tvdb lookup fails, is there a way to specify a show name in the filter and dump the strm files in that folder? That way a bunch of custom parsing doesn't create an unusable directory structure?
The problem here is that the TBS listings aren't easily parsed. They don't provide any Season/Episode number information, so it has to try and look that up on TheTVDB.com. Secondly, the name of the listings follow the format of "date - title", which is uncommon. The program sees the " - " in the listing and assumes it is splitting the title of the series from the title of the episode, something like "Conan - A big celebrity is interviewed". But since it's acutally specifying a date before the -, it uses that to lookup the series and fails.

Sooo.... what you suggested, explicitly specifying the show name for a filter would work. I would need to add that in though. All of my filters lookup multiple shows so I never really thought of that as a good option.

It may be better to have the generic parser realize that there is a date in the listing and ignore it. That way it would correctly get the Series name and manually archive the listing if it didn't find a match on the TVDB.

I'll probably do the latter.


- bradvido88 - 2012-02-26

actapon Wrote:Thanks for the great tool (still hoping for a local file dvr (ie 4therecord) scrapper that can force files into my library Nod)

I've built a 4tr scraper/archiver for XBMC and am currently testing it. It has successfully added about 30 4TR recordings to XBMC's library and just did my first movie too.

Keep you eyes peeled for a release sometime relatively soon.

EDIT: Here it is: http://bit.ly/zQKWpX


- bradvido88 - 2012-02-26

actapon Wrote:Second, where pseudotv has a slight stroke of genius (i think), episodes or movies start part way through and continue "playing" in the background when you switch to other channels. But, this requires that on channel startup, a start at time can be provided. Streaming files don't seem to support this. They always start at the beginning. Do you guys know why this is? Maybe an enhancement i should push out to another XBMC forum? I thought i'd start here with this community of users before hitting pseudotv or creating a new post.

Yes, this is a general XBMC problem. It treats .strm files as playlists, so it doesn't track resume points or watched status for the .strms. However, it does track this information for the files inside of the .strm files.

I have been thinking about building a listener that will update the XBMC database with resume points and watched statuses of .strm files, based on the resume points and watched status of the files inside the strm (since this is already in the DB)...

...But I don't know when i'll get to that or if it will be more trouble than it's worth.


- actapon - 2012-02-26

bradvido88 Wrote:This is because the custom PlayOn parser automatically determines if the files are movies or tv shows, so it ignores what you set as your type. Is it incorrectly classifying them?

hmm... i don't know. The videos in particular i'm looking at are my wife's exercise videos. I'm sure they could be considered movies, but i wanted to create a filter that puts them into tv shows.

I guess i just want my movie library not be cluttered with something i'd consider non- movie


- bradvido88 - 2012-02-26

actapon Wrote:hmm... i don't know. The videos in particular i'm looking at are my wife's exercise videos. I'm sure they could be considered movies, but i wanted to create a filter that puts them into tv shows.

I guess i just want my movie library not be cluttered with something i'd consider non- movie

I would add a movie_set=" Exercise" to your filter....
Then you will only have 1 entry/folder in you movie library for all those videos.


- actapon - 2012-02-26

bradvido88 Wrote:I have been thinking about building a listener that will update the XBMC database with resume points and watched statuses of .strm files, based on the resume points and watched status of the files inside the strm (since this is already in the DB)...

this would be really cool - particularly for watch status. But i'm guessing the pseudotv implementation wouldn't be able to take advantage of this since they want to set this at time of opening.


2nd XBMC Install - tmm0f5 - 2012-03-03

Hey All,

Quick Question.... I have my main XBMC computer running XBMC.MyLibrary just perfectly so that my Netflix queue ends up in my Movies list and everything plays just fine.

My question is how do I set this up on a second XBMC installation. Do I need to setup all of this again or can I just access the Dropbox STRMs from the new XBMC install on a separate computer.

Thanks so much,
Tim


- actapon - 2012-03-03

bradvido88 Wrote:I would add a movie_set=" Exercise" to your filter....
Then you will only have 1 entry/folder in you movie library for all those videos.

Good idea, i've done this for now. Although more finite control (if i want it) in the config xml would be nice instead of solely using the tvdb lookup

This actually ran me into another minor issue i've noticed outside of mylibrary. Moviesets share fanart (at least in my skin - transparency). It appears though that everything added from mylibrary and dumped into movies is sharing fanart even though they are not in a movieset. :confused2:Any ideas what might be causing this?