Commit db9c2958 authored by Nico Schallehn's avatar Nico Schallehn

Merge branch 'master' of git@git.ivaya.de:BA_SI-Projekt/MediaDBViewerAPI.git

parents 22c47b64 eeed94f7
......@@ -28,7 +28,7 @@ class MediaDBAPI{
private $Statistik = array("QueryCounter" => 0);
private $Querys;
private $Tabellen = array("Filme","Serien", "Staffeln", "Episoden"); //TODO Einbauen!!
private $SpaltenFilme = array("name", "imdbID", "3d", "year", "fsk", "rating", "youtube", "resolution", "duration", "size", "hdd", "added", "lastView",
private $SpaltenFilme = array("name", "imdbID", "3d", "year", "fsk", "rating", "youtube", "resolution", "duration", "size", "hdd", "added", "lastView", "lastUpdate",
"Genre", "Schauspieler", "views", "checked", "width", "height", "totalbitrate", "vcodec","acodecger", "abitrateger", "channelsger", "acodeceng", "abitrateeng", "channelseng", "comment",
"md5" , "summary");
private $SpaltenEpisoden = array("episodenumber", "season_nr", "series_nr", "name", "source", "duration", "size", "hdd", "lastView", "added", "views", "checked",
......@@ -38,7 +38,7 @@ class MediaDBAPI{
private $FilterKomplex = array("Jahr" => "year", "Groesse" => "size", "Laufzeit" => "duration", "Hinzugefuegt" => "added", "Gesehen" => "lastView",
"Gesehenzaehler" => "views", "FSK"=>"fsk");
private $FilterAndere = array("Suche", "3d", "Deutsch", "Englisch", "checked", "Youtube");
private $StatistikViews =array();
//private $StatistikViews =array();
/* Speicher für Rechte Arrays*/
private $SpaltenFil = array();
private $SpaltenEpi = array();
......@@ -95,8 +95,8 @@ class MediaDBAPI{
//array_push($this->StatiViews, "");
}
if($this->API_Rechte >= 3){ // Einfacher Zugang mit allen Technischen Infos
array_push($this->SpaltenFil, "md5", "hdd","acodecger", "acodeceng","vcodec","abitrateger","abitrateeng","channelsger","channelseng","width", "height", "totalbitrate");
array_push($this->SpaltenEpi,"md5", "hdd","acodecger", "acodeceng","vcodec","abitrateger","abitrateeng","channelsger","channelseng","width", "height", "totalbitrate");
array_push($this->SpaltenFil,"md5", "hdd");
array_push($this->SpaltenEpi,"md5", "hdd");
/*$this->FilterEinf = array_merge($this->FilterEinf, array( "acodecger" => "acodecger", "acodeceng" => "acodeceng", "vcodec" => "vcodec",
"channelsger" => "channelsger", "channelseng" => "channelseng"));*/
//$this->FilterKomp = array_merge($this->FilterKomp, array());
......@@ -104,24 +104,34 @@ class MediaDBAPI{
//array_push($this->StatiViews, "");
}
if($this->API_Rechte >= 4){ // Einfacher Zugang mit allen Infos Also wann man Welchen FIlm gesehen hat usw.
array_push($this->SpaltenFil, "checked", "views", "comment", "added", "lastView");
array_push($this->SpaltenFil, "checked", "views", "comment", "added", "lastView", "lastUpdate");
array_push($this->SpaltenEpi, "checked", "views", "comment", "added", "lastView" );
/*$this->FilterEinf = array_merge($this->FilterEinf, array( "acodecger" => "acodecger", "acodeceng" => "acodeceng", "vcodec" => "vcodec",
"channelsger" => "channelsger", "channelseng" => "channelseng"));*/
//$this->FilterKomp = array_merge($this->FilterKomp, array("Hinzugefuegt" => "added", "Gesehen" => "lastView", "Gesehenzaehler" => "views"));
//array_push($this->StatiViews, "");
}
if($this->API_Rechte >= 7){
if($this->API_Rechte == 6){
array_push($this->StatiViews, "watchStatistic", "belegterSpeicher", "freierSpeicher", "laufzeitGesehen", "prozentualGesehen", "prozentualDefekt",
"defekteFilme", "defekteEpisoden", "DBstatistik", "GenreFilmanzahl");
}
if($this->API_Rechte == 7){
$this->SpaltenFil = $this->SpaltenFilme;
$this->SpaltenEpi = $this->SpaltenEpisoden;
array_push($this->StatiViews, "watchStatistic", "belegterSpeicher", "freierSpeicher", "laufzeitGesehen", "prozentualGesehen", "prozentualDefekt", "defekteFilme", "defekteEpisoden", "DBstatistik");
array_push($this->StatiViews, "belegterSpeicher", "freierSpeicher", "prozentualDefekt",
"defekteFilme", "defekteEpisoden", "DBstatistik", "GenreFilmanzahl");
}
/*
* Platz für irgendwelche sondersachen....*/
if($this->API_Rechte >= 10){ // Update rechte
$this->Update = true;
$this->DebugOutput = true;
$this->SpaltenFil = $this->SpaltenFilme; // Alle Spalten
$this->SpaltenEpi = $this->SpaltenEpisoden;
array_push($this->StatiViews, "watchStatistic", "belegterSpeicher", "freierSpeicher", "laufzeitGesehen", "prozentualGesehen", "prozentualDefekt",
"defekteFilme", "defekteEpisoden", "DBstatistik", "GenreFilmanzahl");
}
......
......@@ -129,13 +129,13 @@ if($_GET["action"] == "filme"){
$countermd5 = 0;
$countereql = 0;
foreach ($MovieArray["Antwort"]["Data"] as $key => $value) {
$MovieArray = $API->API_GetDataList(array("Tabelle"=>"Filme", "Spalten"=>"imdbID,name,md5,size,resolution","imdbID"=>$value["imdbID"]));
$MovieArray = $API->API_GetDataList(array("Tabelle"=>"Filme", "Spalten"=>"imdbID,name,3d,md5,size,resolution","imdbID"=>$value["imdbID"]));
//$fanart = jsonCacheDecoder("http://webservice.fanart.tv/v3/movies/tt".$value["imdbID"]."?api_key=".Fanart_Key);
// if(isset($fanart["movieposter"][0]["url"])) {
if(!isset($MovieArray["Data"][0]["imdbID"])){
$movies .= '<tr><td><img src="http://mediadb.ddns.net/cover/Filme/low/'.$value["imdbID"].'.jpg"><br>'.$value["imdbID"].", ".substr($value["name"],0,50)." ".$value["3d"]."</td><td>film nicht vorhanden</td><td>".$value["added"]."<br>".$value["rating"]."*</td></tr>";
$counterNeu++;
}else if(!($MovieArray["Data"][0]["md5"] == $value["md5"])){
}else if(!($MovieArray["Data"][0]["md5"] == $value["md5"]) AND ($MovieArray["Data"][0]["3d"] == $value["3d"])){
$movies .= "<tr><td>".$value["imdbID"].", ".substr($value["name"],0,50)." ".$value["3d"]."</td><td>MD5 unterschiedlich!!</td><td>".$MovieArray["Data"][0]["resolution"]."<>".$value["resolution"]."<br>".round($MovieArray["Data"][0]["size"]/pow(1024,3) , 3)."<>".round($value["size"]/pow(1024,3) , 3)."</td></tr>";
$countermd5++;
}else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment