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)



- bradvido88 - 2011-12-27

tmm0f5 Wrote:I've deleted the .db's in /res and cleared out the dropbox. It will then rescan my netflix queue and add everything. But if I make subsequent changes, it doesn't do anything.

Here is my log:

http://www.mediafire.com/?9f9wbxulpbx91w5

Any thoughts?

Thanks,
Tim
I'm assuming you are using PlayOn w/ Netflix. For XBMC to pick up changes to your Netflix queue, you need to restart XBMC. This is because XBMC caches UPNP listings (PlayOn listings), so it won't catch when things change in your queue until it has been restarted and the cache is erased.

TheCasa Wrote:Now that I have it pulling my queue in from Hulu, I'm ready to start really making this my own, but I need a little primer on how to discover the subfolders to use.

I use Hulu, Amazon, and Free Cable atm, so if someone can give me some guidance as to how to find how to set the subfolders, I'll run with it. At this point, I'm not sure how to start though. Is it generally the same method for other sources?

Thanks everyone that can help and especially bradvido88 for the great program. It's going to make my transition to a cable free life much easier and make the wife happy in the process.
The examples in the user's guide are all I have right now. Do you have a specific issue you can point out. I could help with that.




- TheCasa - 2011-12-28

I'll try to get some specifics as to what I'm looking for to see if you can help with the first request. What I do have going is adding all my hulu subscriptions. That's huge!

Now, for the movie thing. Here are a couple ways I've tried the search filters to make it work. None have worked. It could never find the subdirectory:

Copies straight from the sample:
<subfolder name="Movies/Feature Films \([0-9]+\)/Good Will Hunting \([0-9]+\)" max_videos="10" type="movies" movie_set=" Hulu (BlueCop)" />

Bringing it all using a filter:
<subfolder name="Movies/Feature Films/" max_videos="10" type="movies" movie_set=" Hulu (BlueCop)">
<filter>
<regexp>good.*will.*hunting.*</regexp>
</filter>
</subfolder>

I also tried:
<subfolder name="Movies/Feature Films/good.will.hunting" max_videos="10" type="movies" movie_set=" Hulu (BlueCop)" />

I'm stumped. I'm certainly no regex expert, so maybe someone with a clue can help me out.


- bradvido88 - 2011-12-28

TheCasa Wrote:Now, for the movie thing. Here are a couple ways I've tried the search filters to make it work. None have worked. It could never find the subdirectory:
Copies straight from the sample:
<subfolder name="Movies/Feature Films \([0-9]+\)/Good Will Hunting \([0-9]+\)" max_videos="10" type="movies" movie_set=" Hulu (BlueCop)" />
Bringing it all using a filter:
<subfolder name="Movies/Feature Films/" max_videos="10" type="movies" movie_set=" Hulu (BlueCop)">
<filter>
<regexp>good.*will.*hunting.*</regexp>
</filter>
</subfolder>
I also tried:
<subfolder name="Movies/Feature Films/good.will.hunting" max_videos="10" type="movies" movie_set=" Hulu (BlueCop)" />
I'm stumped. I'm certainly no regex expert, so maybe someone with a clue can help me out.
The BlueCop Hulu sample I made has an exclude that looks like:
Code:
<exclude>        
    <contains>previous page</contains>
    <contains>next page</contains>
</exclude>
That will prevent recursive listings and good will hunting probably isn't on the first page.
Change it to this and you should be good to go
Code:
<exclude>        
    <contains>previous page</contains>
</exclude>
Note: you should definitely leave an exclude for previous page or else you will end up with an infinite loop.

Then in the subfolder, add filters for whatever movies you want
Code:
<subfolder name="Movies/Feature Films/" max_videos="10" type="movies" movie_set=" Hulu (BlueCop)">
    <filter>
        <contains>Good Will Hunting</contains>
    </filter>
</subfolder>
and you'll be good to go. As you want to add other movies, just add another <contains /> to the filter


- Ryoga79 - 2011-12-28

So suddenly, after upgrading to eden beta, even the example search filters don't seem to work for me. I copied over a clean config.xml file, and the JSON and SQL checks report the connection succeeds. After that, i plugged in the example search filter for bluecop's hulu plugin, and i get this error in the log:

Code:
12/28/2011 04:06:38 PM INFO    Init...          Found source Hulu with path of plugin://plugin.video.hulu/
12/28/2011 04:06:38 PM INFO    Init...          Setting source's custom_parser to: Hulu
12/28/2011 04:06:38 PM INFO    Init...              Next Subfolder: name=Hulu/Popular/Popular Shows \([0-9]+\), recursive=true, type=episodes, max_series=10, max_videos=-1, movie_set=, prefix=, suffix= (Hulu), download=false, compression=, multi_part=false
12/28/2011 04:06:38 PM INFO    Init...          Added Global Exclude, type=contains, value=/No videos available
12/28/2011 04:06:38 PM INFO    Init...          Added Global Exclude, type=regexp, value=/clip[s]?(/|$)
12/28/2011 04:06:38 PM INFO    Init...          Added Global Exclude, type=contains, value=Dragon Ball Z
12/28/2011 04:06:38 PM INFO    Init             Testing connectivity to JSON-RPC interface...
12/28/2011 04:06:38 PM INFO    Init             JSON-RPC connected = true
12/28/2011 04:06:38 PM INFO    Find:Subfolder   Searching for subfolder: Hulu/Popular/Popular Shows \([0-9]+\)
12/28/2011 04:06:38 PM ERROR   Find:Subfolder   No matching subfolder named "Hulu/Popular/Popular Shows \([0-9]+\)" was found. Skipping
12/28/2011 04:06:38 PM INFO    Clean:Hulu       Found 0 videos that are already archived in dropbox from source "Hulu"

It's almost like it's not parsing it as a regex, just a stright-up text field. Any thoughts?


- bradvido88 - 2011-12-28

Ryoga79 Wrote:So suddenly, after upgrading to eden beta, even the example search filters don't seem to work for me. I copied over a clean config.xml file, and the JSON and SQL checks report the connection succeeds. After that, i plugged in the example search filter for bluecop's hulu plugin, and i get this error in the log:

Code:
12/28/2011 04:06:38 PM INFO    Init...          Found source Hulu with path of plugin://plugin.video.hulu/
12/28/2011 04:06:38 PM INFO    Init...          Setting source's custom_parser to: Hulu
12/28/2011 04:06:38 PM INFO    Init...              Next Subfolder: name=Hulu/Popular/Popular Shows \([0-9]+\), recursive=true, type=episodes, max_series=10, max_videos=-1, movie_set=, prefix=, suffix= (Hulu), download=false, compression=, multi_part=false
12/28/2011 04:06:38 PM INFO    Init...          Added Global Exclude, type=contains, value=/No videos available
12/28/2011 04:06:38 PM INFO    Init...          Added Global Exclude, type=regexp, value=/clip[s]?(/|$)
12/28/2011 04:06:38 PM INFO    Init...          Added Global Exclude, type=contains, value=Dragon Ball Z
12/28/2011 04:06:38 PM INFO    Init             Testing connectivity to JSON-RPC interface...
12/28/2011 04:06:38 PM INFO    Init             JSON-RPC connected = true
12/28/2011 04:06:38 PM INFO    Find:Subfolder   Searching for subfolder: Hulu/Popular/Popular Shows \([0-9]+\)
12/28/2011 04:06:38 PM ERROR   Find:Subfolder   No matching subfolder named "Hulu/Popular/Popular Shows \([0-9]+\)" was found. Skipping
12/28/2011 04:06:38 PM INFO    Clean:Hulu       Found 0 videos that are already archived in dropbox from source "Hulu"

It's almost like it's not parsing it as a regex, just a stright-up text field. Any thoughts?
I assume you upgraded the XBMC.MyLibrary build to the Eden release? (See first post)

Change the log level to DEBUG and I will be able to tell you what's happening.

Also note that the database version numbers for XBMC change when you upgrade XBMC. Make sure you use the correct ones in the Config.xml

Edit: I just rememberd, there are some issues with the JSON-RPC interface querying Plugins and UPNP directories with Eden B1. You may want to use the Dec-10 build until Beta2 is released. See here: http://forum.xbmc.org/showthread.php?tid=114921


- Ryoga79 - 2011-12-28

bradvido88 Wrote:I assume you upgraded the XBMC.MyLibrary build to the Eden release? (See first post)

Change the log level to DEBUG and I will be able to tell you what's happening.

Also note that the database version numbers for XBMC change when you upgrade XBMC. Make sure you use the correct ones in the Config.xml

Yep, using the latest version (1.2.1) and the eden beta, as well as making sure i changed the database to the correct name (in this case, xbmc_video58). Pastebin(s) follow:

Logfile:
http://pastebin.com/JKnnah7B

Configfile:
http://pastebin.com/1u9huS0H

Thanks!


- bradvido88 - 2011-12-28

Ryoga79 Wrote:Yep, using the latest version (1.2.1) and the eden beta, as well as making sure i changed the database to the correct name (in this case, xbmc_video58). Pastebin(s) follow:

Logfile:
http://pastebin.com/JKnnah7B

Configfile:
http://pastebin.com/1u9huS0H

Thanks!
Ah, yes. This is a known bug with Eden B1 having empty label's for plugin listings.
A fix has already been comitted, but it won't be available until Eden Beta2.

Until then, you can use the Dec10 build.

See here for details: http://forum.xbmc.org/showpost.php?p=969695&postcount=14


- TheCasa - 2011-12-29

Ok, well, I found it easier to find the movie I was looking through going through the studios path. I got it to discover the subfolder and find the movie. It adds the mpg file, but, again, it won't convert it to a strm.

This is on a pre-eden build (dec 10? build), fyi. I've already cleaned the library, deleted sources, all that stuff, but it still won't covert it. The only thing I see in the log that gives a clue is this:
Code:
12/28/2011 09:43:50 PM ERROR   Search:Hulu      Failed to add archived file "\\CASE-LAPTOP\Dropbox1\Movies\Good Will Hunting.strm" to SQLite Database: java.sql.SQLException: column dropbox_location is not unique
                                                    java.sql.SQLException: column dropbox_location is not unique
                                                        at org.sqlite.DB.execute(DB.java:275)
                                                        at org.sqlite.DB.executeUpdate(DB.java:281)
                                                        at org.sqlite.PrepStmt.executeUpdate(PrepStmt.java:77)
                                                        at utilities.tools.trackArchivedFile(tools.java:850)
                                                        at utilities.Archiver.trackArchivedFiles(Archiver.java:567)
                                                        at utilities.Archiver.archiveFileInDropbox(Archiver.java:550)
                                                        at utilities.Archiver.archiveVideo(Archiver.java:263)
                                                        at utilities.Archiver.run(Archiver.java:115)
                                                        at java.lang.Thread.run(Unknown Source)

The only line in the ArchivedFiles table points to:
\\CASE-LAPTOP\Dropbox1\Movies\Good Will Hunting.strm

Here's the verbose log:
http://pastebin.com/WCe45YYP
And my very simple config:
http://pastebin.com/E1jGEB7k

I'm sorry I'm such a pain. I feel like an idiot. Not sure why I can't get it to work when everyone else can.


- TheCasa - 2012-01-05

Ok, let's forget that previous post. Can you help us understand how to be sure that xbmc is adding the mpgs to the library and that the program recognizes this, changes them to strm files and updates the xbmc database?

I've got the program finding my shows and movies, creating the mgs, but it never changes them to strm files even though the xbmc library has been updated.


- bradvido88 - 2012-01-05

TheCasa Wrote:Ok, let's forget that previous post. Can you help us understand how to be sure that xbmc is adding the mpgs to the library and that the program recognizes this, changes them to strm files and updates the xbmc database?

I've got the program finding my shows and movies, creating the mgs, but it never changes them to strm files even though the xbmc library has been updated.

Are you using Dharma or Eden?
If Dharma, you need to use MySQL in order to guarantee it works.
If Eden, you should be good to go with the Dec 10 build.


- TheCasa - 2012-01-05

I'm using Dharma since the beta 1 isn't working. I'll change to the dec 10 build and try it out. So far I've just been doing some testing and playing around with xbmc, so I haven't gone the MySQL route. This weekend, I'm building my real xbmc box that will run MySQL, connect to an unRaid box, all that good stuff.

Either way, I love this program and I'm getting the hang of it. Thanks for all the work on it and for keeping it up as XBMC develops. I know I'm not the only one that appreciates it.


- hac11 - 2012-01-05

Hey guys,

thanks for the effort of developing this. I have a question, how do I get this to work on apple tv 2? And if it can't, do you know of any way I can save streamed content to my library on apple tv 2?


- TheCasa - 2012-01-06

Ok, I may be the dumbest guy on the planet because I still can't get this to work, but have a totally different problem now.

I installed the Dec 10 build and 1.2.1 of your program. Now I have your program downloading the mpgs, adding them to xbmc, renaming the files in the xbmc database to .strm, but then deleting the mpgs, not renaming them.

Here is the log file: http://pastebin.com/fBGsV3jM

Here's the snipit from my sources.xml:
Code:
<video>
        <default pathversion="1"></default>
        <source>
            <name>TV Shows</name>
            <path pathversion="1">smb://CASE-LAPTOP/Dropbox/TV Shows/</path>
        </source>
    </video>
It looks like the sources are setup properly to me. This is a test system, so this is all that is running on it. All I did was install the nightly, install the bluecop repo and run the program.

Thoughts?


- bradvido88 - 2012-01-06

TheCasa:

I haven't been able to dig in much to your log...

I'm shifting my focus to updating the program so it works in a much smoother fashion.. With Eden Beta 2, .strms should be able to be added to the library without any .mpg workarounds. I'm going to adjust my program to use this more simple method.

I may also eliminate support for the SQLite databases, only supporting MySQL (as this will eliminate a lot of headaches).... So you know, you may want to get your MySQL setup.

-BradVido


- bradvido88 - 2012-01-06

hac11 Wrote:Hey guys,

thanks for the effort of developing this. I have a question, how do I get this to work on apple tv 2? And if it can't, do you know of any way I can save streamed content to my library on apple tv 2?

THis program does not need to run on the same device that XBMC runs on. So you could run it on a different computer that is connected to your ATV via network