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-13

TheCasa Wrote:I think this is the problem! They were setup as sources when the dropbox was empty! I'll try it when I get home and see if that resolves it.

I think I'm ok here, but I'll check that as well

You're right, no errors. I'll post the log when I get home if resetting the sources doesn't solve it.
[/LIST]

I'm running windows, so that's cool.
Ok, let me know what you find.
The problem is that if you add a source to XBMC's library that doesn't have any vidoes inside of it, XBMC basically doesn't save that source and you have to re-add it once vidoes are inside it.


Also, if you can change your logging level to DEBUG for my program, that will show us the exact queries that are being used against the SQL database.


One last thing to make certain of for Eden & MySQL Users:
The video library name changes as you upgrade XBMC. It will have the database version number tacked on the end. So anytime you upgrade XBMC, you need to change the video database name in the Config.xml to match the new version number. The latest version is xbmc_video58


- TheCasa - 2011-12-13

Ok, can I just add the folders as sources now that the mpgs are in there and rerun the program and have it pick them up and rename them? Or do I need to add them as sources, then delete the mpgs and rerun it?

I'm excited to get this working and turn my cable off. Also, is there a wiki that defines searchfilters for various sources? Just curious.. if not, it would be great to start one. It would help noobs like myself get the most use out of your program.

Thanks, this is great!


- bradvido88 - 2011-12-13

TheCasa Wrote:Ok, can I just add the folders as sources now that the mpgs are in there and rerun the program and have it pick them up and rename them? Or do I need to add them as sources, then delete the mpgs and rerun it?

I'm excited to get this working and turn my cable off. Also, is there a wiki that defines searchfilters for various sources? Just curious.. if not, it would be great to start one. It would help noobs like myself get the most use out of your program.

Thanks, this is great!
Once there are mpg's in there, you can add the source to XBMC. No need to rename/delete anything.

No wiki yet, but I can help with searchfilters. They're really not that complicated once you get the hang of it.


- Ryoga79 - 2011-12-13

A couple samples would be great - Specifically, i'd love to use FreeCable and Amazon Prime Video with the plugin!

Also, and i'm not sure how i would exactly go about it, but i'd love to somehow use this in conjunction with sportsdevil and pseudotv to create "sports channels" and streaming news channels with my regular pseudotv lineup...i think that will take some more hackery above the scope of the plugin, but a guy can dream...

Thanks for all your help!


- TheCasa - 2011-12-14

Still no dice. I left the mpg files in the libary, removed the sources, re-added the source and re-ran the program. The shows import into the library, but the mpgs are still not renamed. Here's the verbose log. I'm at a loss now...
http://pastebin.com/13JBN2DR

I even tried to change it to a smb source instead of straight folder.


- bradvido88 - 2011-12-14

TheCasa Wrote:Still no dice. I left the mpg files in the libary, removed the sources, re-added the source and re-ran the program. The shows import into the library, but the mpgs are still not renamed. Here's the verbose log. I'm at a loss now...
http://pastebin.com/13JBN2DR

I even tried to change it to a smb source instead of straight folder.

To debug this, make sure you are using smb:// path in XBMC and a UNC share in the Config.xml (\\server\share\path\to\folder).
smb:// paths in XBMC are recommended for this program.

Run the program. Then set the content type of XBMC's folder to Movies (or TV Shows, whatever your trying).

Then run the program again.

In XBMC's log, check for any lines that say ERROR.

Specificially, I bet you might have a line that looks like:
SQL: Undefined MySQL error: Code (1062)

This means that when XBMC is trying to update your source to be set to "movies" content type, it fails because of a unique index violation.

To fix this. Delete the source completely, then rename your dropbox folder. Update your config.xml to reflect the new dropbox location, and re-add it and set the content type in XBMC when you add it.

THis is a know problem with XBMC updating sources content types when the path already exists in the database.


- TheCasa - 2011-12-15

Changed to smb source and unc path as instructed above and it's still not working. Here are all the relevant files:
MyLibrary log
XBMC Log
XBMC Sources

If we can't get this going on the next go-round, wouldn't it be a good idea to just uninstall xbmc to reset all the sources, delete all the logs for MyLibrary, etc and start fresh?


- bradvido88 - 2011-12-15

TheCasa Wrote:Changed to smb source and unc path as instructed above and it's still not working. Here are all the relevant files:
MyLibrary log
XBMC Log
XBMC Sources
If we can't get this going on the next go-round, wouldn't it be a good idea to just uninstall xbmc to reset all the sources, delete all the logs for MyLibrary, etc and start fresh?
OK, i see that it is adding the .mpgs to the library. The problem here is that it's never finding the videos in XBMC's database. This happens when the path my program is querying is not the same as the path that XBMC has stored.
If you could send me your MyVideo[N].db file, I can tell you exactly what is wrong with the path and how to fix it.
It is located at:
C:\Users\Jessie\AppData\Roaming\XBMC\userdata\Database\MyVideos[N].db
where [N] is some number. If there are multiple files, send me the one with the highest number.

Everything else appears to be working normal, we just need to get the paths to match and then the videos will get changed to .strm's and they will be playable from your XBMC library Smile


- TheCasa - 2011-12-15

I'll send it when I get home this evening. Thanks for all your help. I feel like i'm being a pain here.


- TheCasa - 2011-12-16

send my db in a pm.

I went into the db and changed the path, as a test, to a strm extension, changed the file extension in the dropbox to strm and those files ran. What is keeping the program from seeing that the files are in the library?


- bradvido88 - 2011-12-16

TheCasa Wrote:send my db in a pm.

I went into the db and changed the path, as a test, to a strm extension, changed the file extension in the dropbox to strm and those files ran. What is keeping the program from seeing that the files are in the library?
OK, the problem here is that you are using XBMC Dharma release & the default XBMC SQLite database.
SQLite is case-sensitive when comparing with the = sign.

The path in XBMC's database is:
Code:
smb://JESSIE-LAPTOP/Dropbox/TV Shows/Glee/Season.3/
The path XBMC.MyLibrary is looking for is:
Code:
smb://Jessie-laptop/dropbox/TV Shows/Glee/Season.3/
So, if you change your Config.xml to have all CAPITALS for your server name in the <dropbox> config, and change the dropbox to have a capital 'D', then everything should work.

Like so:
Code:
<streaming>\\JESSIE-LAPTOP\Dropbox</streaming>

In order to reset XBMC.MyLibrary and do a "fresh start", delete all files in the dropbox, and delete all *.db files in the /res folder of where you installed XBMC.MyLibrary.

This case-sensitive issue is already fixed in the Eden release of this program, but I have stopped development on the Dharma branch because I don't have time to maintain two (and I personally use Eden Smile)


Quick question..... - tmm0f5 - 2011-12-16

I'm just trying to set this up and I came across this while setting up the config.xml....

<!--For this to work, you must have a source named "Neflix" added to XBMC, which maps to Playon's Netflix subdirectory -->

where is this netflix subdirectory? I just can't seem to find it to add a netflix source in XBMC.

Thanks,
Tim


- tmm0f5 - 2011-12-16

tmm0f5 Wrote:I'm just trying to set this up and I came across this while setting up the config.xml....

<!--For this to work, you must have a source named "Neflix" added to XBMC, which maps to Playon's Netflix subdirectory -->

where is this netflix subdirectory? I just can't seem to find it to add a netflix source in XBMC.

Thanks,
Tim

I think I figured this out, I just created a source called Netflix that looked at the UPNP folder for Netflix under PlayOn.

I think I got it all to work.... Thanks for a sweet program!


- tmm0f5 - 2011-12-16

tmm0f5 Wrote:I think I got it all to work.... Thanks for a sweet program!

I think I spoke too soon. It scanned in all the videos and I can see them in library view. The problem is I can't play any of the videos.

If I look in the dropbox folder they are all .mpgs, I thought they were supposed to be .strm files.

Any thoughts?

Thanks,
Tim


- TheCasa - 2011-12-16

bradvido88 Wrote:OK, the problem here is that you are using XBMC Dharma release & the default XBMC SQLite database.
SQLite is case-sensitive when comparing with the = sign.

The path in XBMC's database is:
Code:
smb://JESSIE-LAPTOP/Dropbox/TV Shows/Glee/Season.3/
The path XBMC.MyLibrary is looking for is:
Code:
smb://Jessie-laptop/dropbox/TV Shows/Glee/Season.3/
So, if you change your Config.xml to have all CAPITALS for your server name in the <dropbox> config, and change the dropbox to have a capital 'D', then everything should work.

Like so:
Code:
<streaming>\\JESSIE-LAPTOP\Dropbox</streaming>

In order to reset XBMC.MyLibrary and do a "fresh start", delete all files in the dropbox, and delete all *.db files in the /res folder of where you installed XBMC.MyLibrary.

This case-sensitive issue is already fixed in the Eden release of this program, but I have stopped development on the Dharma branch because I don't have time to maintain two (and I personally use Eden Smile)

Wow, that's so simple! I'm a sql database guy, but I've never known one to be case sensitive. I'll make that fix this evening and I'm sure it will all be happy. Then I'll think about upgrading to eden ahead of the actual release and break everything else... but MyLibrary will work!