Hi, i don't know what AMC is but i have the same NFO file as yours. I read it with php and then i write it to a database ( Mysql Synologie NAS)
FIRST I JUST RENAME THE NFO file to a XML file. Just rename the extension.
some calls are made to function to update the database with actors, directors ,genres and so on.
Code: Select all
$xml = simplexml_load_file($nieuwe_verwerking);
$title = $xml->movie[$t]->title;
$title = del_eaq($title);
$zoeknaam = zoeknaam($title);
$zoeknaam = del_eaq($zoeknaam);
$jaar = $xml->movie[$t]->year;
$actors = $xml->movie[$t]->actor;
$genre = $xml->movie[$t]->genre;
$genres = genre2string($genre);
$originaltitle = $xml->movie[$t]->originaltitle;
$originaltitle = del_eaq($originaltitle);
$rating = $xml->movie[$t]->rating;
$epbookmark = $xml->movie[$t]->epbookmark;
$top250 = $xml->movie[$t]->top250;
$votes = $xml->movie[$t]->votes;
$outline = $xml->movie[$t]->outline;
$outline = del_eaq($outline);
$plot = $xml->movie[$t]->plot;
$plot = del_eaq($plot);
$tagline = $xml->movie[$t]->tagline;
$tagline = del_eaq($tagline);
$runtime = $xml->movie[$t]->runtime;
$mpaa = $xml->movie[$t]->mpaa;
$playcount = $xml->movie[$t]->playcount;
$lastplayed = $xml->movie[$t]->lastplayed;
$path = $xml->movie[$t]->path;
$filenameandpath = $xml->movie[$t]->filenameandpath;
$filenameandpath = del_eaq($filenameandpath);
$film_adres = del_adres($filenameandpath);
$basepath = $xml->movie[$t]->basepath;
$basepath = del_eaq($basepath);
$id = $xml->movie[$t]->id;
$imdb = "$imdb_prefix$id/";
$afbeelding_prefix = afbeelding_prefix($title,$jaar);
$trailer = youtube($xml->movie[$t]->trailer);
$fileinfo = $xml->movie[$t]->fileinfo;
$streamdetails = $fileinfo->streamdetails;
$video = $streamdetails->video;
$video_aspect = $video->aspect;
$video_codec = $video->codec;
$video_width = $video->width;
$video_height = $video->height;
$audio = $streamdetails->audio;
$audio_lang = videotaal($audio->language);
$audio_codec = $audio->codec;
$subtitle = $streamdetails->subtitle;
$subtitles = subt2string($subtitle);
$studio = $xml->movie[$t]->studio;
$studio = del_eaq($studio);
$id_studio = vindOfmaakStudio($studio);
$director = $xml->movie[$t]->director;
$director = del_eaq($director);
$id_director = vindOfmaakDirector($director);
$premiered = $xml->movie[$t]->premiered;
$aired = $xml->movie[$t]->aired;
$country = $xml->movie[$t]->country;
$country = del_eaq($country);
$id_country = vindOfmaakCountry($country);
$sql = " INSERT INTO xbmc_film (title, rating, year, votes, adres, plot, trailer, runtime, imdb, director, genres, country, fanart, poster, http_poster, http_fanart, video_aspect, video_width, video_height, audio_lang, subtitles, id_imdb, originaltitle, epbookmark, top250, actors, outline, tagline, mpaa, playcount, lastplayed, premiered, aired, studio, audio_codec, video_codec, nieuw, zoek,id_director,id_country,id_studio,http_ipadfanart)
VALUES
( '$title', '$rating', '$jaar', '$votes', '$film_adres', '$plot', '$trailer', '$runtime', '$imdb', '$director', '$genres', '$country', '$titel_fanart', '$titel_poster', '$httpPoster', '$httpFanart', '$video_aspect', '$video_width', '$video_height', '$audio_lang', '$subtitles', '$id', '$originaltitle', '$epbookmark', '$top250', '$actors_nr', '$outline', '$tagline', '$mpaa', '$playcount', '$lastplayed', '$premiered', '$aired', '$studio', '$audio_codec', '$video_codec', '$nieuw', '$zoeknaam','$id_director','$id_country','$id_studio','$fan_saveto')";
if (mysql_query($sql,$con)) { }