Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MediaDBPythonScripte
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
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
MediaDBPythonScripte
Commits
d4bd44d1
Commit
d4bd44d1
authored
Jan 26, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
f1ba8b43
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
media.class.php
media.class.php
+10
-3
No files found.
media.class.php
View file @
d4bd44d1
...
@@ -169,9 +169,10 @@ class Media {
...
@@ -169,9 +169,10 @@ class Media {
$array
[
"md5"
]
=
md5_file
(
"/tmp/"
.
$array
[
"imdbID"
]
.
".xml"
);
$array
[
"md5"
]
=
md5_file
(
"/tmp/"
.
$array
[
"imdbID"
]
.
".xml"
);
$array
[
"rating"
]
=
$imdb
->
getRating
();
$array
[
"rating"
]
=
$imdb
->
getRating
();
$array
[
"Genre"
]
=
$imdb
->
getGenre
();
$array
[
"Genre"
]
=
$imdb
->
getGenre
();
$array
[
"Schauspieler"
]
=
$imdb
->
getCastAsOwn
();
$array
[
"Schauspieler"
]
=
$imdb
->
getCastAsOwn
(
0
,
false
);
}
else
{
}
else
{
echo
"nichts gefunden!"
.
PHP_EOL
;
echo
"nichts gefunden!"
.
PHP_EOL
;
return
false
;
}
}
// werte von MediaInfo holen...
// werte von MediaInfo holen...
$befehl
=
'mediainfo --Output=XML "'
.
$Pfad
.
$FilenameOrg
.
'" > /tmp/'
.
$array
[
"imdbID"
]
.
'.xml'
;
$befehl
=
'mediainfo --Output=XML "'
.
$Pfad
.
$FilenameOrg
.
'" > /tmp/'
.
$array
[
"imdbID"
]
.
'.xml'
;
...
@@ -224,7 +225,7 @@ class Media {
...
@@ -224,7 +225,7 @@ class Media {
echo " ".$key." => '".$value."'".PHP_EOL;
echo " ".$key." => '".$value."'".PHP_EOL;
}*/
}*/
}
else
{
}
else
{
return
"Keine Datei!"
.
PHP_EOL
;
return
false
;
}
}
}
}
private
function
addMovie
(
$DataArr
){
private
function
addMovie
(
$DataArr
){
...
@@ -232,7 +233,7 @@ class Media {
...
@@ -232,7 +233,7 @@ class Media {
if
(
$mysqli
->
error
!=
""
){
return
"Mysql-Fehler: "
.
$mysqli
->
error
.
PHP_EOL
;}
if
(
$mysqli
->
error
!=
""
){
return
"Mysql-Fehler: "
.
$mysqli
->
error
.
PHP_EOL
;}
//$ret->num_rows
//$ret->num_rows
foreach
(
$DataArr
as
$key
=>
$value
)
{
foreach
(
$DataArr
as
$key
=>
$value
)
{
if
(
in_array
(
$key
,
array
(
"Genre"
,
"Schauspieler"
))
){
if
(
in_array
(
$key
,
array
(
"Genre"
,
"Schauspieler"
))
){
//TODO hier weiter!!
//echo " ".$key." => '".implode("|", )."'".PHP_EOL;
//echo " ".$key." => '".implode("|", )."'".PHP_EOL;
var_dump
(
$value
);
var_dump
(
$value
);
}
else
{
}
else
{
...
@@ -241,6 +242,12 @@ class Media {
...
@@ -241,6 +242,12 @@ class Media {
}
}
$mysqli
->
close
();
$mysqli
->
close
();
}
private
function
getGenreID
(
$mysqli
,
$GenreName
){
//TODO hier weiter!!
}
private
function
getSchauspielerID
(
$mysqli
,
$SchauspielerName
){
//TODO hier weiter!!
}
}
private
function
getRunTime
(
$laufzeit
){
private
function
getRunTime
(
$laufzeit
){
$string
=
explode
(
" "
,
$laufzeit
);
$string
=
explode
(
" "
,
$laufzeit
);
...
...
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