Re: Re:IMDb parser - 2008/01/13 13:27>>>Maybe it would be useful to have the IMDb reference editable in the database!!
Yes sir. It would be nice if there were a place just to enter it rather than having to change the names back and forth.
Thinking along those same lines, it would also be nice for those using the dvdloc8 if they could enter and look up by the UPC. Flip over the dvd, enter th code, and you get an exact match every time.Showcenters 1000g/200/250HD Popcorn Hour A-100 Netgear HDX101 Powerline Adapters Windows XP Simese 2.07 running latest SVN NAS Server IBM NetVista 900Mhz/256RAM
| | The administrator has disabled public write access.
jomuir
User
Posts: 26
Re: IMDb parser - 2008/01/19 10:37I am recieving no data, so just tried to update it again for 1 film and recieved the following error (I am usinf version 1.7 that is in this forum)........any ideas?:-
Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: gethostbyname failed in C:\ProgramData\Simese\Data\ext\parsers\movie\www.imdb.com.php on line 46
Warning: file_get_contents(http://www.imdb.com/find?s=tt;q=Syriana) [function.file-get-contents]: failed to open stream: No error in C:\ProgramData\Simese\Data\ext\parsers\movie\www.imdb.com.php on line 46
[Edit} - just tried it for another film and I did not get the error, but I am not getting any data for any film!!!
I just tried for Click, and tried it as 2 different file names:-Click.avi and also as Click [tt0389860].avi
Am I doing something wrong?Lite-on 2010 Vista Home Prof.
| | The administrator has disabled public write access.
triantos
User
Posts: 36
Re: IMDb parser - 2008/01/19 11:01I have been seeing the same problem with the new (excellent) TV parser. I've been looking around on the net and this appears to be a known problem in PHP with no known legitimate fix, but now that I know someone else is seeing it, I suspect this may actually be a new bug introduced somehow in 1.19. I had never seen this in the logs before I installed 1.19.
Rob, any ideas?
I'll keep looking around, too...
| | The administrator has disabled public write access.
sdeitsch
User
Posts: 40
Re: IMDb parser - 2008/01/30 22:48jomuir the parser does a check at the start of each run to see if there was an error created on a previous run and if so it will not run. I had to comment out those error checking lines because I set up multiple imdb parsers so I could read down the returned array until I got the movie I wanted and every blank line produced an error. If you don't want to comment out those lines in the parser, and you want to workaround this behaviour then you will need to restart swisscenter on every error generated from the parser.
| | The administrator has disabled public write access.
Zz9pzza
User
Posts: 154
Re: IMDb parser - 2008/02/01 18:38This is a small patch which checks to see if there is an nfo file and if there is searches for a line with imdb followed by a number. It then uses that number in the rest of of the parsing.
Hope its usefull.
Code:
diff -Naur www.imdb.com.php www.imdb.com.php-nfo
--- www.imdb.com.php 2008-01-13 17:08:44.000000000 +0000
+++ www.imdb.com.php-nfo 2008-02-01 23:35:51.603583612 +0000
@@ -41,21 +41,41 @@
function extra_get_movie_details($id, $filename, $title)
{
// First check to see if we've encountered an error downloading the details before in this session.
- if ( isset($_SESSION['Movie_info_download']) )
- return;
+ //if ( isset($_SESSION['Movie_info_download']) )
+ // return;
// Perform search for matching titles
$site_url = 'http://www.imdb.com/';
$search_url = $site_url.'find?s=tt;q=';
$details = db_toarray("select dirname,filename,title from movies where file_id = $id");
$film_title = ucwords(strip_title( $title ));
-
+ $nfott = "";
+
+ $filenamenfo = substr($filename,0,strrpos($filename,'.')).".nfo";
+ if ( is_readable($filenamenfo) ) {
+ send_to_log(4,'scaning nfo '.$filenamenfo);
+ $handle = @fopen($filenamenfo, "r");
+ if ($handle) {
+ while (!feof($handle)) {
+ $buffer = fgets($handle, 4096);
+ if ( preg_match("/imdb[^\d]*(\d+)/",$buffer,$matches)!=0) {
+ send_to_log(4,"found ".$matches[1] );
+ $nfott="tt".$matches[1];
+ }
+ }
+ fclose($handle);
+ }
+ }
send_to_log(4,'Checking movie file : '.$details[0]["FILENAME"]);
- if (preg_match("/\[(tt\d+)\]/",$details[0]["FILENAME"],$imdbtt) != 0)
+ if (preg_match("/\[(tt\d+)\]/",$details[0]["FILENAME"],$imdbtt) != 0)
+ {
+ $nfott=$imdbtt[1];
+ }
+ if ( $nfott != "" )
{
// Filename includes an explicit IMDb title such as '[tt0076759]', use that to find the movie
- $html = file_get_contents($search_url.$imdbtt[1]);
+ $html = file_get_contents($search_url.$nfott);
}
elseif (preg_match("/\[(tt\d+)\]/",$details[0]["TITLE"],$imdbtt) != 0)
{
-- Server: Debian 4.0, Ram: 3 gig , Disc : 5 TB Client: Buffalo LinkTheatre, dLAN 200 AV MySQL 5.0.32-Debian_7etch1-log
| | The administrator has disabled public write access.
Pernod
Admin
Posts: 1507
Re: IMDb parser - 2008/02/01 19:26Nice idea... if you have an nfo file I think most people here rip their own DVD's so won't have an nfo.
Personally I'd like to add an imdb_tt field to the movies table to be able to store a unique identifier for each movie and use that for the movie lookup. Since IMDb is not 'officially' supported then I'm not sure if this would be acceptable. Rob??Player : Netgear EVA700 & Popcorn A-100 (081224) Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN) Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
| | The administrator has disabled public write access.
Zz9pzza
User
Posts: 154
Re: IMDb parser - 2008/02/01 19:48My stuff is mostly rips, however I was thinking about providing hints to the parser and an external file seemed easier than renaming the video.
It only needs to be one line eg
imdb: 379786
And thats it, I thought about using .nfo as there will be some people who will get that information by default.
I understand about the extra metadata but how do you give the parser the hint in the first place.-- Server: Debian 4.0, Ram: 3 gig , Disc : 5 TB Client: Buffalo LinkTheatre, dLAN 200 AV MySQL 5.0.32-Debian_7etch1-log
| | The administrator has disabled public write access.
Pernod
Admin
Posts: 1507
Re: IMDb parser - 2008/02/01 20:21I'm currently improving the search accuracy of my epguides and non-english parsers. When I'm done I'll take a look at the IMDb parser, I'm sure the accuracy can be improved. A search for 'Flood' returns details for 'Hard Rain', definitely room for improvement.Player : Netgear EVA700 & Popcorn A-100 (081224) Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN) Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
| | The administrator has disabled public write access.
sdeitsch
User
Posts: 40
Re: IMDb parser - 2008/02/02 01:41I'm going to preface this by saying that I don't know what the hell I'm talking about....but I personally like the idea of an external file, it should be auto generated by the parser, editable by the user (preferably in an interface) and then it should be able to reverse update the movie info. logically the parser would look for the existence of this info file and check the current name against it, if it found a match it would use the imdb link from the file to fetch the data, if it doesn't find a match it looks up the movie and appends the info file with the movie id number and filename. If you don't like what it found, edit the info file with the proper tt and you should then be given an opportunity (say by manually looking up the movie) of correcting to the proper information. This way even if you have to rebuild your db, just keeping the current info file intact will trigger the proper movie lookup.
thanx for all of your hard work
| | The administrator has disabled public write access.
Zz9pzza
User
Posts: 154
Re: IMDb parser - 2008/02/03 16:48As an a-side I was having trouble finding out why certificates didn't work for imdb, I suspected it was a php5 issue so I used aptitude to get php4 as my parser and certificates work fine so there is a compatibility issue in there.-- Server: Debian 4.0, Ram: 3 gig , Disc : 5 TB Client: Buffalo LinkTheatre, dLAN 200 AV MySQL 5.0.32-Debian_7etch1-log
| | The administrator has disabled public write access.
Zz9pzza
User
Posts: 154
Re: IMDb parser - 2008/02/12 04:40I have been using the imdb parser and I am not sure but I didn't get it to set the name of the film correctly.
This is comparing to my patch version which takes a minimal nfo as a hint
Code:
115a141,142
> preg_match("'<title>(.*)</title>'",$html,$real_title);
> send_to_log(4,"real title is ".$real_title[1] );
151a180
> , "TITLE" => $real_title[1]
I may of course be missing something obvious-- Server: Debian 4.0, Ram: 3 gig , Disc : 5 TB Client: Buffalo LinkTheatre, dLAN 200 AV MySQL 5.0.32-Debian_7etch1-log
| | The administrator has disabled public write access.
Y2JAPA
User
Posts: 12
Re: IMDb parser - 2008/03/26 21:32Hi, when I try to use the IMDB parser I get this:
Fatal error: main() [function.require]: Failed opening required '' (include_path='.;c:\php4\pear') in C:\Documents and Settings\All Users\Application Data\Simese\Data\ext\parsers\movie\www.imdb.com.php on line 38
When I try to use the DVDloc8 parser it says Unable to locate movie details and when I try to use the OFDB it works sort of, but is in German.
Any suggestions?
THANKS!
| | The administrator has disabled public write access.
Pernod
Admin
Posts: 1507
Re: IMDb parser - 2008/03/26 22:28Which version of SwissCenter are you running?
If you are running anything later than 1.19 then you need the IMDb parser posted in this thread on 13-1-2008.
The DVDloc8 parser is very good if the film you are searching for is available on DVD. And yes the OFDb parser is for our German users. There's also a FilmUp parser for the Italians.Player : Netgear EVA700 & Popcorn A-100 (081224) Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN) Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
| | The administrator has disabled public write access.
Y2JAPA
User
Posts: 12
Re: IMDb parser - 2008/03/26 22:43I am using the latest release. I just installed it yesterday (March 25 2008) and am using a ShowCenter 250. Could there be something I am forgetting to set? Even if the German version is working? The folders are the names of the movies and the files are just VTS_0_1 etc.
THANKS!
| | The administrator has disabled public write access.
Y2JAPA
User
Posts: 12
Re: IMDb parser - 2008/03/26 23:08Got it working, thanks for the help!!
| | The administrator has disabled public write access.
pstather
User
Posts: 5
Re: IMDb parser - 2008/04/23 08:39I was wondering if you know why this script isn't picking up the certificates for me.
Thanks Array ( [YEAR] => 1989 [CERTIFICATE] => [MATCH_PC] => 100 [DETAILS_AVAILABLE] => Y [SYNOPSIS] => A detective must adopt the dog of a dead man to help him find the murderer. )- ShowCenter 200 - Ubuntu/LAMPP - 2,1 GHz/1GB/2TB
| | The administrator has disabled public write access.
Pernod
Admin
Posts: 1507
Re: IMDb parser - 2008/04/23 09:17I presume the movie is 'Turner & Hooch'?
If it is then it worked fine for me, picking up the certificate as PG for the BBFC scheme.
Do you have a scheme selected (BBFC or MPAA)?
Edit: It's been noted earlier that there may be an issue with the certificate for PHP5 users. Are you using 4 or 5?Player : Netgear EVA700 & Popcorn A-100 (081224) Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN) Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
| | The administrator has disabled public write access.
pstather
User
Posts: 5
Re: IMDb parser - 2008/04/24 10:18I am using the BBFC certification
I am using PHP5
Is there a way around it?- ShowCenter 200 - Ubuntu/LAMPP - 2,1 GHz/1GB/2TB
| | The administrator has disabled public write access.
Pernod
Admin
Posts: 1507
Re: IMDb parser - 2008/04/24 10:23I am now seeing other movies failing to get synopsis and certificate so I'll be looking into this, hopefully in the next few days.Player : Netgear EVA700 & Popcorn A-100 (081224) Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN) Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
| | The administrator has disabled public write access.
| | The administrator has disabled public write access.
Pernod
Admin
Posts: 1507
Re: IMDb parser - 2008/04/29 19:57The attached will fix the synopsis but the certificates are still broken (and I'm not finding it easy to fix).
Edit: File removed due to synopsis being broken (again).Player : Netgear EVA700 & Popcorn A-100 (081224) Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN) Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
| | The administrator has disabled public write access.
Stu2j
User
Posts: 1397
Re: IMDb parser - 2008/04/29 22:48Just downloaded this new version and the first movie I tried it on: "No Country for Old Men" it failed to get a synopsis. Showcenters 1000g/200/250HD Popcorn Hour A-100 Netgear HDX101 Powerline Adapters Windows XP Simese 2.07 running latest SVN NAS Server IBM NetVista 900Mhz/256RAM
| | The administrator has disabled public write access.
Pernod
Admin
Posts: 1507
Re: IMDb parser - 2008/04/30 19:50<file removed>Player : Netgear EVA700 & Popcorn A-100 (081224) Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN) Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
| | The administrator has disabled public write access.
jonD
User
Posts: 19
Re: IMDb parser - 2008/05/12 17:31I've fixed the certificates problem. Jon
| | The administrator has disabled public write access.
Stu2j
User
Posts: 1397
Re: IMDb parser - 2008/05/12 17:58What can I say? You are my hero!! Showcenters 1000g/200/250HD Popcorn Hour A-100 Netgear HDX101 Powerline Adapters Windows XP Simese 2.07 running latest SVN NAS Server IBM NetVista 900Mhz/256RAM
| | The administrator has disabled public write access.
jonD
User
Posts: 19
Re: IMDb parser - 2008/05/12 18:12Oops, I used some text as a placeholder that doesn't appear on all movies. This should fix it.
<file removed>
| | The administrator has disabled public write access.
Mart1001
User
Posts: 8
Re: IMDb parser - 2008/05/15 06:57Hi all,
First post, new user Swisscenter and I like it!
Thanks for all this nice work around this parser. Everything is working but it's not retrieving pictures from imdb for me in my folders. With dvdloc8 it does.
Could it be my set-up or something with the parser?
I use a popcorn latest beta. simese v1.42 php4.4.4 swisscentrev1.20 xp When I put manually pictures in my movie folders swisscentre is loading them
Retrieving information for tv series is also working and I get also pictures in my folders, but the strange thing is that swisscentre isn't loading them in it's system. I tried both precatching pictures on and off. Edit: the 2 parsers for tv series are working now.
Thanks in advance for any help.
| | The administrator has disabled public write access.
Pernod
Admin
Posts: 1507
Re: IMDb parser - 2008/05/15 08:33The IMDb parser first checks whether you already have an image available, whereas the other parsers just download and overwrite any existing images.
Do you have a folder.jpg in your movie folders or even in their parent folders?Player : Netgear EVA700 & Popcorn A-100 (081224) Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN) Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
| | The administrator has disabled public write access.
Mart1001
User
Posts: 8
Re: IMDb parser - 2008/05/15 09:23Thanks!
I started clean with only the imdb parser, so no pictures where there. I tried some new folders with again no pictures but no go.
Edit: huh, I don't have a clue, didn't changed anything exept adding a new folder and now it's retrieving pictures with this parser. Maybe something with imdb went wrong.
Thanks!
| | The administrator has disabled public write access.
Stu2j
User
Posts: 1397
Re: IMDb parser - 2008/05/15 09:59I use a popcorn latest beta. simese v1.42 Just a note that you need to use Simese 2.02 with Popcorn. Check in the Simese forums for the latest update.
As to the problem with imdb.. in the config under support, set the log level to 9, try and update with imdb and post the log. It might telling them what is going on.Showcenters 1000g/200/250HD Popcorn Hour A-100 Netgear HDX101 Powerline Adapters Windows XP Simese 2.07 running latest SVN NAS Server IBM NetVista 900Mhz/256RAM
| | The administrator has disabled public write access.
admin
Admin
Posts: 1568
Re: IMDb parser - 2008/05/15 13:36Log level 8 should be sufficient - 9 outputs every little bit of database access that happens (which is a little OTT). Player : Pinnacle Showcenter 200 (wired ethernet) Server : HP MediaSmart EX470 NAS (Windows Home Server / Sempron CPU / 2Gb RAM / 2.0 Tb Storage).
| | The administrator has disabled public write access.
Mart1001
User
Posts: 8
Re: IMDb parser - 2008/05/15 17:10Thanks for the extra tips. It's still working. The errors in the log are normal I think because those episodes are split in 4 parts H.264 streams with the commercials cut out.
Kind regards.
<file removed>
| | The administrator has disabled public write access.
deejay
Visitor
Re: IMDb parser - 2008/05/21 03:15Having been pointed here from a discussion about the dvdloc8 parser I am pleased to see that the imdb parser version 1.19 was able to find movies that dvdloc8 couldn't, however, with little surprise after reading further, I found that the synopsis and certificate was/were missing (BBFC selected).
I moved on to imdb 1.21a and using the same file ('title cd1.avi' with or without prior artwork) discovered that the title could not be located.
I stepped back to v1.20a and there was no improvement.
Stepping back to 1.19 again I recovered the details without cert and synopsis.
Having read about the title 'trick', I went back to 1.21a (with prior artwork) and renamed the title (not the file) from 'title cd1' to 'title' - success, ALL details were returned.
Since I have a number of multiple file films which obviously need unique filenames, it would appear that I am going to have to populate the db with these titles in two passes - 1 to amend the title, -2 to Lookup. This will also be the case for films with multiple productions under the same title.
This is much better than the manual cut and paste slog I had resigned myself to having to do. Thanks to all involved.
Dave
============ Windows XP Pro SP2 Simese 1.42 PHP 4.4.4 MySQL 4.0.21-debug SwissCenter 1.20.1 Firefox 2.0.0.14 Pinnacle ShowCenter 200 in transit !
| | The administrator has disabled public write access.
Dutchsea
User
Posts: 70
Re: Re:IMDb parser - 2008/05/27 17:32I have a lot of movies which are split in 2 or more avi files. (so each part fits on a CD). For example:
Troy - CD1.avi Troy - CD2.avi Troy - CD3.avi
So these 3 files together make up the movie Troy
All these files are not correctly recognized by the parser. I am fairly sure that the CD# text messes up the matching process.
From what I read in older posts, more people use this type of naming convention for lots of avi files and would be helped if this can be fixed.
Can the parser be programmed so that the CD# text is not used in the movie look-up function?
This would also solve the issue that files with this naming convention are shown as separate movies in the movie list and avoids the need to edit the titles manually in the config for each file. (See tread)
My assumption is that the CD1, CD2 etc text in the files name is not used by other users for other reasons than described above so changing the parser to disregard this specific text would not effect others users negatively...SwissCenter 1.21.1 Synology CS407 firmware DSM 2.0-0598 Pinnacle SC200 - firmware 21-63 Windows XP SP2 Linux on Synology PHP 5.2.0 MySQL 5.0.51 Apache 2.2.3 (Unix)
| | The administrator has disabled public write access.
Pernod
Admin
Posts: 1507
Re: Re:IMDb parser - 2008/05/27 17:53The CD# is already removed before the title is passed to the parser. Your problem is due to having a '-' in there, so 'Troy -' would be used to find a match. When the parser compares 'Troy - ' with 'Troy' it would only match by ~67%, it has to match by 75% to be accepted.
Try renaming them to 'Troy CD1.avi' or 'Troy [CD1].avi'.Player : Netgear EVA700 & Popcorn A-100 (081224) Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN) Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
| | The administrator has disabled public write access.
Dutchsea
User
Posts: 70
Re: Re:IMDb parser - 2008/05/28 13:58OK, thanks. I will try this.
One follow up question: Most of the file names i have also include the year between brackets (). Like:
Troy (2004) - CD1.avi
For the best match, can I leave these brackets or should I remove or replace them?SwissCenter 1.21.1 Synology CS407 firmware DSM 2.0-0598 Pinnacle SC200 - firmware 21-63 Windows XP SP2 Linux on Synology PHP 5.2.0 MySQL 5.0.51 Apache 2.2.3 (Unix)
| | The administrator has disabled public write access.
Pernod
Admin
Posts: 1507
Re: Re:IMDb parser - 2008/05/28 14:15You should be okay if you just removed the dash. ie. 'Troy (2004) CD1.avi'Player : Netgear EVA700 & Popcorn A-100 (081224) Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN) Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
| | The administrator has disabled public write access.
Dutchsea
User
Posts: 70
Re: Re:IMDb parser - 2008/05/29 16:43Hi, I removed the '-' from 25% of the files, installed the latest version of the IMDB parser and did a media search via: http://swisscenter_ip:8080/media_search
So I my video file names are like
Troy (2004) CD1.avi Troy (2004) CD2.avi
and like (still including the '-' )
Kill Bill (2003) - CD1.avi Kill Bill (2003) - CD2.avi
After the new search 99% of my video files had a match. Also the ones that still had a '-' as part of the file name. So it looks like the latest version of the IMDB parser discards the '-'
The video art is captured very well.
But now I have the problem that all files are shown in the menus separately as well. For example the Troy files show as:
Troy CD1.avi Troy CD2.avi
I know I can manually change the names in the config (tread) part of SC so they match. But than I need to change +/- 1000 files and changing the names is not a fast process. Changing the database manually does not work (yet) as I cant get MySQL Query Browser to work. Suggestions are apreciated.SwissCenter 1.21.1 Synology CS407 firmware DSM 2.0-0598 Pinnacle SC200 - firmware 21-63 Windows XP SP2 Linux on Synology PHP 5.2.0 MySQL 5.0.51 Apache 2.2.3 (Unix)
| | The administrator has disabled public write access.
jonD
User
Posts: 19
Re: Re:IMDb parser - 2008/05/31 04:16Use square brackets in your filename for parts that are not part of the movie title. Anything in square brackets appears to be discarded by swisscenter when the database is populated, whereas normal brackets are preserved (presumably because film titles can legitimately contain normal style brackets).
So instead of "Troy (2004) CD1.avi' you could rename it to 'Troy (2004) [CD1].avi"
So it looks like the latest version of the IMDB parser discards the '-' It just appears to be working because any title which matches more than 75% of the title on IMDB will be used. But titles with less than 7 characters there will not match with >75% and will fail.
| | The administrator has disabled public write access.
Dutchsea
User
Posts: 70
Re: Re:IMDb parser - 2008/05/31 04:29Super, thanks for this guidance. I will start changing the the files names and may thereafter renew the entire database.SwissCenter 1.21.1 Synology CS407 firmware DSM 2.0-0598 Pinnacle SC200 - firmware 21-63 Windows XP SP2 Linux on Synology PHP 5.2.0 MySQL 5.0.51 Apache 2.2.3 (Unix)
| | The administrator has disabled public write access.