MovieLib - Your movie database on web

  Thread Rating:
  • 8 Vote(s) - 4.63 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
heml Offline
Junior Member
Posts: 7
Joined: Mar 2017
Reputation: 0
Post: #631
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?
find quote
darkside40 Offline
Junior Member
Posts: 28
Joined: Feb 2015
Reputation: 1
Post: #632
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.
find quote
Regss Offline
Fan
Posts: 422
Joined: Aug 2010
Reputation: 22
Location: Poland
Post: #633
I think the scraper get trailers with http. Guys can you check in kodi database how the links looks like?
find quote
xekon Offline
Junior Member
Posts: 17
Joined: Sep 2009
Reputation: 0
Post: #634
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: sqlite.jpg]

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
(This post was last modified: 2017-03-28 10:49 by xekon.)
find quote
xekon Offline
Junior Member
Posts: 17
Joined: Sep 2009
Reputation: 0
Post: #635
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'].= '
find quote
xekon Offline
Junior Member
Posts: 17
Joined: Sep 2009
Reputation: 0
Post: #636
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.
(This post was last modified: 2017-03-28 19:11 by xekon.)
find quote
xekon Offline
Junior Member
Posts: 17
Joined: Sep 2009
Reputation: 0
Post: #637
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 post was last modified: 2017-03-28 19:24 by xekon.)
find quote
Post Reply