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
abdbb6e9
Commit
abdbb6e9
authored
Jan 29, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
1ca87fa2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
media.class.php
media.class.php
+8
-9
No files found.
media.class.php
View file @
abdbb6e9
...
...
@@ -78,7 +78,7 @@ class Media {
}
}
public
function
filme
(){
$start
=
microtime
(
true
);
$start
=
time
(
);
//var_dump($this->config);
echo
$this
->
Console
->
getColoredString
(
"Filme"
,
"black"
,
"light_gray"
)
.
PHP_EOL
;
...
...
@@ -120,10 +120,14 @@ class Media {
$fehlerArr
[]
=
$fehler
;
echo
$this
->
Console
->
getColoredString
(
" "
,
"black"
,
"red"
)
.
PHP_EOL
;
}
$end
=
microtime
(
true
);
$end
=
time
(
);
$laufzeit
=
$end
-
$start
;
$H
=
floor
(
$laufzeit
/
3600
);
$i
=
(
$laufzeit
/
60
)
%
60
;
$s
=
$laufzeit
%
60
;
//echo ;
$Counter
++
;
echo
"Laufzeit: "
.
(
$laufzeit
<
60
?
round
(
$laufzeit
,
4
)
.
" Sekunden"
:
round
(
$laufzeit
/
60
,
2
)
.
" Minuten"
)
.
"! "
.
$Counter
.
' von '
.
count
(
$FilmeArr
)
.
PHP_EOL
.
PHP_EOL
;
echo
"Laufzeit: "
.
sprintf
(
"%02d:%02d:%02d"
,
$H
,
$i
,
$s
)
.
"! "
.
$Counter
.
' von '
.
count
(
$FilmeArr
)
.
PHP_EOL
.
PHP_EOL
;
}
echo
$this
->
Console
->
getColoredString
(
"Alle Filme Verarbeitet!"
,
"green"
,
"light_gray"
)
.
PHP_EOL
;
echo
"Folgende Filme konten nicht verarbeitet werden: "
.
PHP_EOL
;
...
...
@@ -280,14 +284,9 @@ class Media {
if
(
$mysqli
->
connect_error
!=
""
){
echo
"Mysql-Fehler: "
.
$mysqli
->
connect_error
.
PHP_EOL
;
return
false
;}
$Query
=
"SELECT imdbID FROM Filme WHERE imdbID = '"
.
$DataArr
[
'imdbID'
]
.
"' AND "
.
'3d '
.
(
$DataArr
[
'3d'
]
?
"!="
:
"="
)
.
'""'
;
echo
$Query
.
PHP_EOL
;
//
echo $Query.PHP_EOL;
$result
=
$mysqli
->
query
(
$Query
);
//TODO 3D überprüfung!!!
if
(
$mysqli
->
error
!=
""
){
echo
"Mysql-Fehler: "
.
$mysqli
->
error
.
PHP_EOL
;
return
false
;}
if
(
$result
->
num_rows
>
0
){
file_put_contents
(
"./phpTestout/"
.
$DataArr
[
'imdbID'
]
.
".txt"
,
"Film bereits in DB!"
.
PHP_EOL
,
FILE_APPEND
);
...
...
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