Kodi Community Forum

Full Version: MovieLib - Your movie database on web
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
MovieLib is a PHP script allows you to present your video library on your own website. The main advantage is the ability to automatically synchronize the contents of the XBMC database.

Requirements:
- Apache server with PHP 5 and MySQL 5 for script
- XBMC with videos library

Installation

Step 1. Installing php script on server.
Download Movielib script: Movielib
Fetch and unpack it on the server. The script have installer, so start and proceed as directed.
This is tutorial How to install WAMP server locally.

The default password:
Access to the site: user
Access to the admin: admin

Administration panel:
go to admin.php ( 127.0.0.1/movielib/admin.php )

XBMC for communication with the Movielib website will need the token. It should be generated in the admin panel in token section.

Step 2. Installation XBMC add-on.

Install Movielib addon using my repository: Movielib Addon
Go to addon settings and enter website address and token. URL address must start with http:// and have host name and the name of the directory where the script is located directly, like:
Code:
http://127.0.0.1/movielib/
http://www.sitename.com/movielib/



Studio art
If you want a image of studio displaying on right upper corner, you must have image file with studio logo named exactly same as studio name and .png extension. Put this file to folder: templates/[theme]/img/studios/
Much of studios art found it here: https://github.com/XBMC-Addons/media.icons.collection

Extrathumbs
To synchronize the extrathumbs must be named accordance with the rule:
/[movie]/extrathumbs/thumb1.jpg
/[movie]/extrathumbs/thumb2.jpg
...

The script has a full translation in:
- English
- German
- Polish
- French
- Bulgarian
- Danish
- Dutch
- Italian
- Spanish

Thanks for translators.

If you want to help translate:
Transifex: https://www.transifex.com/projects/p/movielib-for-xbmc/

Image

watch gallery


Changelog:

v. 2.8.0
- fixed filter delete button
- fixed database tables
- added indexes to database
- added cleaning function
- added function to separate image sync
- rewrited sync function
- fixed filter links
- added delete button for each poster, fanart image in admin panel
- added playcount digit in default view
- added function to autosync webserver settings for control remote (default disabled, to enable it go to settings in admin panel)

v. 2.7.3
- add uhd flag
- add htaccess and mod rewrite
- option to set default sorting
- option to set default watched status
- option to hide the select media header bar
- add imdb link

v. 2.7.2
- added sync episode thumbnail and stream details
- added new episodes view

v. 2.7.1
- added navigate buttons to remote
- added star rating
- added video new flag
- fixed audio and subs flag
- fixed deleting episodes when delete tvshow
- fixed banner
- fixed sync episodes
- added next, prev buttons for extrathumb view
- added cached actors in admin panel
- fixed facebook tags
- added facebook buttons

v. 2.7.0
- added extra thumbs
- added support for multi audio track
- added audio and subtitles language
- now movies info update when XBMC do some changes
- added actors to live search
- rewrite sync functions

v. 2.6.1
- added studio panel
- added studio flags
- added language: Spanish, Italian

v. 2.6.0
- added remote control XBMC
- added support for download video file
- added support for playing video directly
- added filter watched/unwatched

v. 2.5.4
- fixed install process
- added Danish language

v. 2.5.3
- added banner with last played movie or tvshow

v. 2.5.2
- added ability to hide movie or tvshow

v. 2.5.1
- fixed switching between views
- added banner support

v. 2.5.0
- added views

v. 2.4.0
- fixed sync images
- added TVshows
- added filter info

v. 2.3.3
- fixed default poster image in live search
- added checking files integrity
- added checking tables integrity (auto update to new versions)
- added checking if allow_url_fopen is enabled
- added support for movie sets

v. 2.3.2
- fixed graphics for HD movies
- fixed create tables in install process

v. 2.3.1
- fixed sorting

v. 2.3.0
- added cast field
- added actors thumbnail
- added live search

v. 2.2.0
- added trailer support
- added support for sync images stored localy
- added most watched sort option

v. 2.1.0
- synchronization "on-the-fly" (movies, watched status, lastplayed status)
- more filter options

v. 0.9.1
- Better and faster sync with XBMC database
- Fixed some bugs

v. 0.9.0
- Automatically create cache for posters while browsing the site
- View fanarts
- Secure password content
- Synchronization with XBMC
- Easy to change the appearance using skins
- Information movie parameters
- Status of the watched films
Very nice....trying to get this running, but after the inital setup completes successfully and the install.php is deleted, it then goes to a page that states "No Database selected"

EDIT - nm got it working. However the cache doesn't seem to be building with movie posters.
If you're open to it, I've got a couple requests after going through it -
Option to disable the background changing colors
Option to choose what genres are shown
Runtime seems to be showing wrong info - the min count is in thousands

Thanks!
Cache is built from url to posters stored in XBMC database. You must have enabled GD library on a server.

Thanks for requests.
Option to disable changing fanarts is in admin panel.
I fixed problem with runtime, You must overwrite a function.php file from https://github.com/Regss/movielib. Delete all cache and empty movies table in script database, and synchronize again.
(2013-06-27, 21:45)Regss Wrote: [ -> ]Cache is built from url to posters stored in XBMC database. You must have enabled GD library on a server.
Yes I've got gd installed. Any other ideas what to check for?

Code:
xbmc@HTPC:~$ php5 -m | grep -i gd
gd
Would be awesome to have an Option to Download the movie or the TV show.
After installing i tried to go into the admin panel but at the logon screen i get 'Notice: Undefined variable: login_info in C:\xampp\htdocs\xbmc\login.php on line 77'

any hints?

part of the page source:

<form action="<br />
<b>Notice</b>: Undefined variable: input_action in <b>C:\xampp\htdocs\xbmc\login.php</b> on line <b>78</b><br />
(2013-06-28, 03:31)Aenima99x Wrote: [ -> ]
(2013-06-27, 21:45)Regss Wrote: [ -> ]Cache is built from url to posters stored in XBMC database. You must have enabled GD library on a server.
Yes I've got gd installed. Any other ideas what to check for?

Code:
xbmc@HTPC:~$ php5 -m | grep -i gd
gd

Bump....
(2013-06-28, 14:29)_Andy_ Wrote: [ -> ]After installing i tried to go into the admin panel but at the logon screen i get 'Notice: Undefined variable: login_info in C:\xampp\htdocs\xbmc\login.php on line 77'

any hints?

part of the page source:

<form action="<br />
<b>Notice</b>: Undefined variable: input_action in <b>C:\xampp\htdocs\xbmc\login.php</b> on line <b>78</b><br />

Every time if You go to admin.php You get this error?


(2013-07-02, 16:01)Aenima99x Wrote: [ -> ]
(2013-06-28, 03:31)Aenima99x Wrote: [ -> ]
(2013-06-27, 21:45)Regss Wrote: [ -> ]Cache is built from url to posters stored in XBMC database. You must have enabled GD library on a server.
Yes I've got gd installed. Any other ideas what to check for?

Code:
xbmc@HTPC:~$ php5 -m | grep -i gd
gd

Bump....

Try to set chmod to 777 for cache folder.

Check using phpmyadmin in the XBMC database if there are proper URL's to the posters. Table "movie", row "c08" must have one or multiply URL's. Copy one to web browser to see if it works.
Hello Regss

Yes. Everytime i get this error. I tried on a second server but the error is the same.
(2013-07-03, 11:07)Regss Wrote: [ -> ]Try to set chmod to 777 for cache folder.

Check using phpmyadmin in the XBMC database if there are proper URL's to the posters. Table "movie", row "c08" must have one or multiply URL's. Copy one to web browser to see if it works.

Yes, I've already chmod'ed the cache folder to 777.
The poster paths in SQL in the movie table point to local files, not URL's. I use TinyMediaManager to manage my Movie metadata and it creates NFO's with the thumb link in it.
Here's how it looks in MySQL -
Code:
<thumb>/home/xbmc/Media/Movies/12 Monkeys (1995)/poster.jpg</thumb>
The XBMC web-app and also HTPC-Manager have no problem pulling in the images....even when viewed externally from my network in a webpage.

UPDATE - I've manually copied the poster path from one movie in the xbmc db to the same movie in the movielib db and the poster shows now. So it looks like for some reason the movielib db isn't pulling the data from the xbmc db for the posters/fanart? It'l pulling everything else though.
The poster info is stored like this in table c08 in the xbmc db
Code:
<thumb>/home/xbmc/Media/Movies/Young Frankenstein (1974)/poster.jpg</thumb>
(2013-07-03, 14:18)_Andy_ Wrote: [ -> ]Hello Regss

Yes. Everytime i get this error. I tried on a second server but the error is the same.

Try to edit login.php file by text editor. Change all occurrences of triple equals the double. You do not get any other errors?

(2013-07-03, 14:49)Aenima99x Wrote: [ -> ]
(2013-07-03, 11:07)Regss Wrote: [ -> ]Try to set chmod to 777 for cache folder.

Check using phpmyadmin in the XBMC database if there are proper URL's to the posters. Table "movie", row "c08" must have one or multiply URL's. Copy one to web browser to see if it works.

Yes, I've already chmod'ed the cache folder to 777.
The poster paths in SQL in the movie table point to local files, not URL's. I use TinyMediaManager to manage my Movie metadata and it creates NFO's with the thumb link in it.
Here's how it looks in MySQL -
Code:
<thumb>/home/xbmc/Media/Movies/12 Monkeys (1995)/poster.jpg</thumb>
The XBMC web-app and also HTPC-Manager have no problem pulling in the images....even when viewed externally from my network in a webpage.

UPDATE - I've manually copied the poster path from one movie in the xbmc db to the same movie in the movielib db and the poster shows now. So it looks like for some reason the movielib db isn't pulling the data from the xbmc db for the posters/fanart? It'l pulling everything else though.
The poster info is stored like this in table c08 in the xbmc db
Code:
<thumb>/home/xbmc/Media/Movies/Young Frankenstein (1974)/poster.jpg</thumb>

I forgot about the local files. I'll try to add support for it as soon as I get back from vacation.
Hello Regss

I changed all tripple equals with double equals. The error is the same. In login.php i added
echo $login_info;
echo $input_action;
echo $input_name;
in //user and //admin section. I refreshed the browser (i tried with Firefox and Opera). The echo shows no content.



<div id="pass">
<br />
<br />
<b>Notice</b>: Undefined variable: login_info in <b>C:\xampp\htdocs\xbmc\login.php</b> on line <b>86</b><br />
<form action="<br />
<b>Notice</b>: Undefined variable: input_action in <b>C:\xampp\htdocs\xbmc\login.php</b> on line <b>87</b><br />
" method="post">
<input type="password" name="<br />
<b>Notice</b>: Undefined variable: input_name in <b>C:\xampp\htdocs\xbmc\login.php</b> on line <b>88</b><br />
">
<input type="submit" value="OK">
</form>
</div>
</body>
</html>
In login.php before:
Code:
?>
<!DOCTYPE HTML>
<html>

paste:

Code:
echo '<pre>';
print_r(get_defined_vars());
echo '</pre>';

Refresh site and past vars here using pastebin.com
Check in phpmyadmin in movielib database in users table is there 2 rows:
id:1 - login:admin
id:2 - login:user