Jump to content

Data Build Tool for External Database.


Recommended Posts

Posted

managed to get it working. i had to create a local database and image files first then upload them to my site. took a while to upload. hopefully when add media from now on it wont take so long.

 

here's my collection http://mb3flix.awelswynol.co.uk/ 

  • 4 weeks later...
Posted

what do i need to add in settings.php?  :huh:

 

$serverIP = " "; your MB server ip, mostly it's localhost

$serverPort = "8096"; MB server port, most of the times it's 8096

$userHash = ""; if you got to your profile in MB, the hash is in the url (something like: 5h79fc1c4bvfg393a69a0561b565454c)

 

// Database Information Here you fill in the informations for the mysql db

$hostname = ""; mysql host, probably it's localhost

$username = ""; the mysql user, sometimes it's root

$password = ""; your mysql user password

$dbname = ""; the db name from your mysql db

$options = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8');

  • Like 1
Posted

$serverIP = " "; your MB server ip, mostly it's localhost

$serverPort = "8096"; MB server port, most of the times it's 8096

$userHash = ""; if you got to your profile in MB, the hash is in the url (something like: 5h79fc1c4bvfg393a69a0561b565454c)

 

// Database Information Here you fill in the informations for the mysql db

$hostname = ""; mysql host, probably it's localhost

$username = ""; the mysql user, sometimes it's root

$password = ""; your mysql user password

$dbname = ""; the db name from your mysql db

$options = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8');

 

Thanks you!! its work now after some time :)

Posted

glad you go it work. such a handy tool. 

 

if anyone is interested here is my collection

 

http://mb3flix.awelswynol.co.uk/

 

 

i managed to upload mine to an external hosting site - was a bit of a faff. had to setup xampp locally with mysql, run all the .php files then upload the whole thing to my hosting site including the millions of actor images. then import the mysql databse to my hosters database. but at least i dont have to run apache etc locally on my server.

Posted

Yeah that's how I did it too.

It's like I said not really handy atm. I try to get a few new features working, but I'm very busy, so it may take a while.

Posted

Good day,

 

Well done to you both (Wayne and Chenglee) nice script.

 

For whom with very large titles, edit the php.ini file for the "memory_limit=" form 128mb as example to 256, 512. or 1024.

 

Also as well and again, only if you running the script locally (at your pc) and have very large collection of People edit the "cachepeople.php" first line to be like this:

ini_set('memory_limit', '-1');

Again, only if you running the script locally and the edit of php.ini did not help.

 

My best

Posted

Yeah, I encountered memory problems and timeouts too. I did write a new cachescript which helped a bit against this issue. The old script always updated all the movies and people, but with the new one you can select that only new movies and people get updated. Also, it uses a different statement to cache the data, which helped in my case. I can upload this later if you guys are interested. 

  • Like 1
Posted

Yeah, I encountered memory problems and timeouts too. I did write a new cachescript which helped a bit against this issue. The old script always updated all the movies and people, but with the new one you can select that only new movies and people get updated. Also, it uses a different statement to cache the data, which helped in my case. I can upload this later if you guys are interested. 

 

I am interested in this, thanks in advanced and well done.

Posted

Good day,

 

It will be great to this scripts if for browsing a titles, you have view option like "list" beside the default view for poster..

 

My best

Posted

 

I uploaded the new files to github. I included an early and ugly list view (I hope it works, haven't really checked it).

Additionally I added a few new things to the script folder. Theres a batch file, which will make it much easier to update your collection. 

 

Just edit cache.bat once. Set the path to the php.exe and the path to the mb3flix/script folder. Then run the .bat and choose your desired option.





@echo off
::Path to php.exe
set php=C:\\xampp\php\php.exe
::Path to MB3flix scripts folder
set path=C:\\xampp\htdocs\mb\scripts\

542ea67ff0169_cache.png

 

I haven't really checked if everythings working, I didn't have the time to do it.

 

If you want to speed up the process a bit more, you could lower the limit of similar movies to retrieve, because this really slows down the caching.  The variable is located at cachemovies.php and updatemovies.php.

 

  • Like 1
  • 3 weeks later...
Posted (edited)

 

The following no longer works with server Version 3.0.5404.29588 (returns error code AuthenticationException). Is Authentication needed for every connection now??



http://localhost:8096/mediabrowser/Users/e8837bc1ad67520e8cd2f629e3155721/Items?recursive=true&IncludeItemTypes=Movie

Edited by candyman
  • 4 weeks later...
Posted

I am working on updating this code to work with the latest version of MBS


 


I thought I would share what I have so far in case anyone else was interested in doing the same. You can view it here: 


http://mediaserver250.duckdns.org/index.php


 


Nothing really fancy.


 


Any feed back would be appreciated.


 


Rgd's


Andrew


Posted

have you managed to get the authentication part working? havent run the script in a while might give it a go this week

Posted

yes authentication is working, only thing I can't get working is getting people information

  • 2 weeks later...
Posted

Im getting the following error. i'm sure last time i ran the cache scripts i had the same thing but i cant for the life of me remember what i did to get it working last time.

 

WayneFlix Database Update. Retrieving list of genres from server... Found genres. Updating Database... 
Warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\MB3flix\scripts\cachemovies.php on line 233
Retrieving list of movies from server... Found movies. 
Warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\MB3flix\scripts\cachemovies.php on line 248
Total Movies Processed: 0 Time taken: 1.0780620574951

Posted

I just updated the caching scripts on github with the new authentication.

Can you try it again with this new files?

 

  • Like 1
Posted

perfect, just running it now and it looks like it has started to cache my movies.

 

thanks again :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...