Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MediaDBViewerAPI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BA_SI-Projekt
MediaDBViewerAPI
Commits
db9c2958
Commit
db9c2958
authored
Feb 29, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git@git.ivaya.de:BA_SI-Projekt/MediaDBViewerAPI.git
parents
22c47b64
eeed94f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
9 deletions
+19
-9
api.class.php
api.class.php
+17
-7
index.php
webapp/index.php
+2
-2
No files found.
api.class.php
View file @
db9c2958
...
...
@@ -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"
);
}
...
...
webapp/index.php
View file @
db9c2958
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment