home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
IMDb+
Original title
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Lightning303" data-source="post: 991700" data-attributes="member: 97876"><p>After your post, i felt challenged to try my own luck, if i could get it to work.</p><p> </p><p>As i see it, atleast on IMDB Germany, it shows me always the german title. If there is no special german title it shows me the original title. Which as i understand, is the title the film makers gave the movie. Whenever it shows me not the original title, but the german one, the original title is on the releaseinfo page in the section for akas the first one.</p><p>As i said i wanted to try my own luck, so i made a little php script to get the original title. From my tests, it looks like it is always working. Of course i dont know if it will work for somebody in the us (maybe you can test?) or in other countries.</p><p> </p><p>Here my php script</p><p>[PHP]<?php</p><p> /*</p><p> Proof of concept to get original title based on imdb id.</p><p> Just tested from Germany. Possible that this does not work in other countries.</p><p> </p><p> Lightning303, 06 May 2013</p><p> */</p><p></p><p> $MovingPicturesDB = "H:/movingpictures.db3";</p><p> $MovingPicturesDB = "sqlite:".$MovingPicturesDB;</p><p> try {</p><p> $dbh = new PDO($MovingPicturesDB);</p><p> }</p><p> catch(PDOException $e){</p><p> echo $e->getMessage();</p><p> }</p><p> $Start = 0;</p><p> $Limit = 25;</p><p> $MovPicDB = $dbh->query("SELECT id, imdb_id, title FROM movie_info ORDER BY id LIMIT ".$Start.", ".$Limit."");</p><p> $x = 0;</p><p> while($MovPicDBData = $MovPicDB->fetch(PDO::FETCH_ASSOC)) {</p><p> // Title in MP DB and IMDB ID</p><p> echo $MovPicDBData["title"]." -> ".$MovPicDBData["imdb_id"]." -> ";</p><p> // Getting information from imdb page</p><p> $IMDBData = file_get_contents("http://www.imdb.com/title/".$MovPicDBData["imdb_id"]);</p><p> // Searching for position of the title</p><p> $TitlePos = strpos($IMDBData, "<span class=\"itemprop\" itemprop=\"name\">");</p><p> // Cutting off everything before the first title</p><p> $TitleTemp = substr($IMDBData,($TitlePos + 39),500);</p><p> // Getting position of the end of the title</p><p> $TitleTempPos = strpos($TitleTemp, "</span>");</p><p> // Seperating the title</p><p> $TitleToUse = substr($TitleTemp,0,$TitleTempPos);</p><p> // Searching for original title and its position</p><p> $OriginalTitlePos = strpos($TitleTemp, "<span class=\"title-extra\" itemprop=\"name\">");</p><p> if ($OriginalTitlePos) {</p><p> // Cutting off everything before the first original title</p><p> $OriginalTitleTemp = substr($TitleTemp,($OriginalTitlePos + 56),250);</p><p> // Getting position of the end of the original title</p><p> $OriginalTitleTempPos = strpos($OriginalTitleTemp, "<i>(original title)</i>");</p><p> // Seperating the original title</p><p> $TitleToUse = substr($OriginalTitleTemp,0,($OriginalTitleTempPos-14));</p><p> }</p><p> echo $TitleToUse."<br>\n";</p><p> $x = $x + 1;</p><p> if ($x == $Limit) { break; }</p><p> }</p><p>?>[/PHP]</p><p> </p><p>To test it, you just would have to change the destination of the movingpietures db.</p><p> </p><p>Example of the results</p><p>[code]This Is It -> tt1477715 -> This Is It</p><p>The Hurt Locker -> tt0887912 -> The Hurt Locker</p><p>The Girl I: with the Dragon Tattoo -> tt1132620 -> Män som hatar kvinnor</p><p>Minority Report -> tt0181689 -> Minority Report</p><p>Avatar -> tt0499549 -> Avatar</p><p>Up in the Air -> tt1193138 -> Up in the Air</p><p>Surrogates -> tt0986263 -> Surrogates</p><p>The Stepfather -> tt0814335 -> The Stepfather</p><p>The Game -> tt0119174 -> The Game</p><p>Nine Miles Down -> tt0812352 -> Nine Miles Down</p><p>Nine -> tt0875034 -> Nine</p><p>Gamer -> tt1034032 -> Gamer</p><p>The Boondock Saints II: All Saints Day -> tt1300851 -> The Boondock Saints II: All Saints Day</p><p>Armageddon -> tt0120591 -> Armageddon</p><p>Goodfellas -> tt0099685 -> Goodfellas</p><p>Ice Age III: Dawn of the Dinosaurs -> tt1080016 -> Ice Age: Dawn of the Dinosaurs</p><p>Schindler's List -> tt0108052 -> Schindler's List</p><p>The Code -> tt1112782 -> Thick as Thieves[/CODE]</p><p> </p><p>Note, that the titles in front are from my db, scraped with force english and rename db. Also, "Män som hatar kvinnor" included ;p</p><p> </p><p>Hope that helps <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p></blockquote><p></p>
[QUOTE="Lightning303, post: 991700, member: 97876"] After your post, i felt challenged to try my own luck, if i could get it to work. As i see it, atleast on IMDB Germany, it shows me always the german title. If there is no special german title it shows me the original title. Which as i understand, is the title the film makers gave the movie. Whenever it shows me not the original title, but the german one, the original title is on the releaseinfo page in the section for akas the first one. As i said i wanted to try my own luck, so i made a little php script to get the original title. From my tests, it looks like it is always working. Of course i dont know if it will work for somebody in the us (maybe you can test?) or in other countries. Here my php script [PHP]<?php /* Proof of concept to get original title based on imdb id. Just tested from Germany. Possible that this does not work in other countries. Lightning303, 06 May 2013 */ $MovingPicturesDB = "H:/movingpictures.db3"; $MovingPicturesDB = "sqlite:".$MovingPicturesDB; try { $dbh = new PDO($MovingPicturesDB); } catch(PDOException $e){ echo $e->getMessage(); } $Start = 0; $Limit = 25; $MovPicDB = $dbh->query("SELECT id, imdb_id, title FROM movie_info ORDER BY id LIMIT ".$Start.", ".$Limit.""); $x = 0; while($MovPicDBData = $MovPicDB->fetch(PDO::FETCH_ASSOC)) { // Title in MP DB and IMDB ID echo $MovPicDBData["title"]." -> ".$MovPicDBData["imdb_id"]." -> "; // Getting information from imdb page $IMDBData = file_get_contents("http://www.imdb.com/title/".$MovPicDBData["imdb_id"]); // Searching for position of the title $TitlePos = strpos($IMDBData, "<span class=\"itemprop\" itemprop=\"name\">"); // Cutting off everything before the first title $TitleTemp = substr($IMDBData,($TitlePos + 39),500); // Getting position of the end of the title $TitleTempPos = strpos($TitleTemp, "</span>"); // Seperating the title $TitleToUse = substr($TitleTemp,0,$TitleTempPos); // Searching for original title and its position $OriginalTitlePos = strpos($TitleTemp, "<span class=\"title-extra\" itemprop=\"name\">"); if ($OriginalTitlePos) { // Cutting off everything before the first original title $OriginalTitleTemp = substr($TitleTemp,($OriginalTitlePos + 56),250); // Getting position of the end of the original title $OriginalTitleTempPos = strpos($OriginalTitleTemp, "<i>(original title)</i>"); // Seperating the original title $TitleToUse = substr($OriginalTitleTemp,0,($OriginalTitleTempPos-14)); } echo $TitleToUse."<br>\n"; $x = $x + 1; if ($x == $Limit) { break; } } ?>[/PHP] To test it, you just would have to change the destination of the movingpietures db. Example of the results [code]This Is It -> tt1477715 -> This Is It The Hurt Locker -> tt0887912 -> The Hurt Locker The Girl I: with the Dragon Tattoo -> tt1132620 -> Män som hatar kvinnor Minority Report -> tt0181689 -> Minority Report Avatar -> tt0499549 -> Avatar Up in the Air -> tt1193138 -> Up in the Air Surrogates -> tt0986263 -> Surrogates The Stepfather -> tt0814335 -> The Stepfather The Game -> tt0119174 -> The Game Nine Miles Down -> tt0812352 -> Nine Miles Down Nine -> tt0875034 -> Nine Gamer -> tt1034032 -> Gamer The Boondock Saints II: All Saints Day -> tt1300851 -> The Boondock Saints II: All Saints Day Armageddon -> tt0120591 -> Armageddon Goodfellas -> tt0099685 -> Goodfellas Ice Age III: Dawn of the Dinosaurs -> tt1080016 -> Ice Age: Dawn of the Dinosaurs Schindler's List -> tt0108052 -> Schindler's List The Code -> tt1112782 -> Thick as Thieves[/CODE] Note, that the titles in front are from my db, scraped with force english and rename db. Also, "Män som hatar kvinnor" included ;p Hope that helps :) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
IMDb+
Original title
Contact us
RSS
Top
Bottom