• 1
  • 41
  • 42
  • 43(current)
  • 44
  • 45
MovieLib - Your movie database on web
I have one problem left, The youtube trailers dont play, all I see is an empty box. Is it because its http instead of https?

if so maybe there is a way I can do a search and replace of the youtube trailer links from http to https?
Reply
If you use chrome it is because it blocks "unsafe" script content (shield in adress bar).
No that search and replace does not work. I tried it like you can see some posts before.
Reply
I think the scraper get trailers with http. Guys can you check in kodi database how the links looks like?
Reply
I found my kodi sqlite db file, it was stored here:

/home/mediapc/.kodi/userdata/Database/MyVideos107.db

I opened it using sqlite browser: http://sqlitebrowser.org/

the link is formatted in the kodi database like this:

Code:
plugin://plugin.video.youtube/?action=play_video&videoid=xPTVv60hLjc

it looks like the website only uses the last 11 digits xPTVv60hLjc

when I view the source of the movielib website:
Code:
<iframe id="player" type="text/html" src="http://www.youtube.com/embed/xPTVv60hLjc" width="560" frameborder="0" height="260"></iframe>

here is what I found in the movie table:
Image

so maybe some people need the link to be http, and other people need https? if so maybe there could be a toggle switch for setting one way or the other, however I do not see why anyone would not simply use https
Reply
I have done a quick and dirty hack to get https working.

open "index.php" and insert this after line 679:
Code:
$list['trailer'] = substr_replace($list['trailer'], 's', 4, 0);

you should have this:
Code:
if (substr($list['trailer'], 0, 18) == 'http://www.youtube') {
    $list['trailer'] = substr_replace($list['trailer'], 's', 4, 0);
    $output_desc['trailer'].= '
Reply
also since redoing my database with all the fanart settings set to off in settings, the movielib addon throws an error:
interestingly, it seems like maybe it did not affect the movies, only the tv shows, I know on the tv shows I had some local files covers/fanart/nfo files, whereas the movies are all scraped info.

nano ~/.kodi/temp/kodi.log
Code:
16:57:31.527 T:140071097333504   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.KeyError'>
                                            Error Contents: ('fanart',)
                                            Traceback (most recent call last):
                                              File "/home/goliath/.kodi/addons/script.movielib/default.py", line 30, in <module>
                                                Movielib()
                                              File "/home/goliath/.kodi/addons/script.movielib/default.py", line 22, in __init__
                                                sync.start(self)
                                              File "/home/goliath/.kodi/addons/script.movielib/resources/lib/sync.py", line 82, in start
                                                check(self)
                                              File "/home/goliath/.kodi/addons/script.movielib/resources/lib/sync.py", line 224, in check
                                                syncImage.sync(self, dataXBMC['images'], dataSORT)
                                              File "/home/goliath/.kodi/addons/script.movielib/resources/lib/syncImage.py", line 43, in sync
                                                addImg(self, ImagesXBMC, ImagesToAdd, ImagesSORT)
                                              File "/home/goliath/.kodi/addons/script.movielib/resources/lib/syncImage.py", line 66, in addImg
                                                if len(ImagesToAdd[type][img_type]) > 0:
                                            KeyError: ('fanart',)
                                            -->End of Python script error report<--

I may need to delete the database and turn the fanart setting back on, except for the one that says change background.

EDIT: dropped the movielib db from mysql, and rescanned with the setting "Sync fanarts:" to on, now I only turned off "Show fanart in background:" and now I no longer got an error.

EDIT2: After a little more testing I will write a guide for setting this up on Ubuntu.
Reply
Notice something new while exploring features, I was clicking through the Genres one at a time on the left menu, when I click into Crime or Family it takes me to those results but I get the following message at the top of the page:

Code:
Notice: Undefined variable: img_flag_atype in /var/www/movielib/index.php on line 644

upon examining the code, atype is referring to the audio codec... I will see if i can figure out the file that is doing this

This appears to be the culprit: dtshd_ma

maybe a good solution would be some error checking:

if ($img_flag_atype == NULL) {
$img_flag_atype = uknown
}

then could simply display unknown for unknown types, instead of it generating errors on the page

for now, I made the following change:

edit index.php, make the following change at line 625 change this:
Code:
foreach ($atype_assoc as $key => $val) {
    if(in_array($s['a_codec'], $atype_assoc[$key])) {
to this:
Code:
foreach ($atype_assoc as $key => $val) {
    if($s['a_codec'] == "dtshd_ma") {
            $s['a_codec'] = "truehd";
    }
    if(in_array($s['a_codec'], $atype_assoc[$key])) {
Reply
Hello
MovieLib is it compatible with Kodi V17?
Reply
yes it is, I am using MovieLib with Kodi V17
Reply
(2017-03-28, 11:49)xekon Wrote: I have done a quick and dirty hack to get https working.

open "index.php" and insert this after line 679:
Code:
$list['trailer'] = substr_replace($list['trailer'], 's', 4, 0);

you should have this:
Code:
if (substr($list['trailer'], 0, 18) == 'http://www.youtube') {
    $list['trailer'] = substr_replace($list['trailer'], 's', 4, 0);
    $output_desc['trailer'].= '

Thank you! Works OK!
Reply
Exclamation 
I've a strange problem with a lot of films... this is and image of the problem:

Image

so, i've this strange image with a pink van on a lot of movies...
On my FTP server all the images movies_*_t1m.jpg are the same.
I've tried to delete all the *_tm1.jpg images, but as soon Kodi sync it's library, it reupload all of them.

you can check at this address:
https://movielib.altervista.org

What can be the problem?? Confused
Reply
I dont have the pink van showing up on mine, but upon viewing the source of your page, I believe that image is there because of ex_thumbs, which stands for extra thumbs.

if you goto the admin section of your site, you can try to disable "Sync extra thumbs" and that *MIGHT* solve your problem, I know I dont have any extra thumbs which is why I probably dont see this phenomenon on my server.

side note, because movielib has already scanned in your films, you may have to set KODI, to drop your libraries and rescrape.

OR! a quicker way so that you dont have to rescrape(can take ages on a large library), is to find the Movielib db in Mysql and delete it! Then after deleting it remove the db.php file and reinstall.

it may even be possible to drop a single table from the Movielib DB that stores the results, I have not really poked around in the movielib mysql db yet.

let me know if you need any more help, I can try and poke around and see what i come up with.

<div class="ex_thumbs"><img src="cache/movies_1808_t1m.jpg"></div>

EDIT: OR YOU CAN EDIT THE Template file or Index file that handles displaying those extra thumbs, and remove the bit about extra thumbs, then it wont display them, this way you wont need to rescrape or mess with the database, I can find this edit for you later tonight.

I forked this project on github, I made a couple custom templates that make use of a wide pc screen thats 1080p, using more of the available space. and a few other changes. Once I get some free time and do a bit of testing I will push the changes to github and submit a pull request to see if Regss is interested in including any of the changes.
Reply
(2017-04-06, 03:15)xekon Wrote: I dont have the pink van showing up on mine, but upon viewing the source of your page, I believe that image is there because of ex_thumbs, which stands for extra thumbs.

if you goto the admin section of your site, you can try to disable "Sync extra thumbs" and that *MIGHT* solve your problem, I know I dont have any extra thumbs which is why I probably dont see this phenomenon on my server.

side note, because movielib has already scanned in your films, you may have to set KODI, to drop your libraries and rescrape.

OR! a quicker way so that you dont have to rescrape(can take ages on a large library), is to find the Movielib db in Mysql and delete it! Then after deleting it remove the db.php file and reinstall.

it may even be possible to drop a single table from the Movielib DB that stores the results, I have not really poked around in the movielib mysql db yet.

let me know if you need any more help, I can try and poke around and see what i come up with.

<div class="ex_thumbs"><img src="cache/movies_1808_t1m.jpg"></div>

EDIT: OR YOU CAN EDIT THE Template file or Index file that handles displaying those extra thumbs, and remove the bit about extra thumbs, then it wont display them, this way you wont need to rescrape or mess with the database, I can find this edit for you later tonight.

I forked this project on github, I made a couple custom templates that make use of a wide pc screen thats 1080p, using more of the available space. and a few other changes. Once I get some free time and do a bit of testing I will push the changes to github and submit a pull request to see if Regss is interested in including any of the changes.

Thank you for your hints!
I've resolved commenting index.php lines from 664 to 674.
Next time i'll rescrape my library, i'll also fix also the movielib db...for now is enough a dirty fix.

I'm courious to try your new templates!
Reply
(2017-03-28, 17:38)xekon Wrote: Notice something new while exploring features, I was clicking through the Genres one at a time on the left menu, when I click into Crime or Family it takes me to those results but I get the following message at the top of the page:

Code:
Notice: Undefined variable: img_flag_atype in /var/www/movielib/index.php on line 644

upon examining the code, atype is referring to the audio codec... I will see if i can figure out the file that is doing this

This appears to be the culprit: dtshd_ma

maybe a good solution would be some error checking:

if ($img_flag_atype == NULL) {
$img_flag_atype = uknown
}

then could simply display unknown for unknown types, instead of it generating errors on the page

for now, I made the following change:

edit index.php, make the following change at line 625 change this:
Code:
foreach ($atype_assoc as $key => $val) {
    if(in_array($s['a_codec'], $atype_assoc[$key])) {
to this:
Code:
foreach ($atype_assoc as $key => $val) {
    if($s['a_codec'] == "dtshd_ma") {
            $s['a_codec'] = "truehd";
    }
    if(in_array($s['a_codec'], $atype_assoc[$key])) {

This modification only brought the error to line 647 on my page. I ended up just changing line 5 to...
Code:
ini_set('display_errors',0);
If there is a better way to handle it, i'm open to suggestion, but the site was being filled with line 644 notices that pushed the rest of the page down when using any sorting options.
That said, I'd like to thank Regss for putting this together. Very happy with the results.
Reply
After updating Kodi to version 17.4 the scripts shows a permanently error.
Reply
  • 1
  • 41
  • 42
  • 43(current)
  • 44
  • 45

Logout Mark Read Team Forum Stats Members Help
MovieLib - Your movie database on web8