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
fe272390
Commit
fe272390
authored
Feb 22, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
c0db30af
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
media.class.php
media.class.php
+4
-4
No files found.
media.class.php
View file @
fe272390
...
@@ -178,7 +178,7 @@ class Media {
...
@@ -178,7 +178,7 @@ class Media {
}
}
}
else
if
(
$action
==
"check"
){
}
else
if
(
$action
==
"check"
){
if
(
$this
->
updateMovie
(
$array
,
(
strlen
(
$value
[
0
])
>
0
?
$value
[
0
]
.
'/'
:
''
)
.
$value
[
1
]
,
true
,
true
)){
if
(
$this
->
updateMovie
(
$array
,
$Pfad
.
$FilenameOrg
,
true
,
true
)){
echo
"Film wurde geprüft"
.
PHP_EOL
;
echo
"Film wurde geprüft"
.
PHP_EOL
;
}
}
...
@@ -637,13 +637,13 @@ class Media {
...
@@ -637,13 +637,13 @@ class Media {
if
(
$mysqli
->
error
!=
""
){
echo
"Mysql-Fehler: "
.
$mysqli
->
error
.
PHP_EOL
;
return
false
;}
if
(
$mysqli
->
error
!=
""
){
echo
"Mysql-Fehler: "
.
$mysqli
->
error
.
PHP_EOL
;
return
false
;}
if
(
$result
->
num_rows
>
0
){
if
(
$result
->
num_rows
>
0
){
echo
"Film bereits in DB!"
.
PHP_EOL
;
echo
"
Film bereits in DB!"
.
PHP_EOL
;
file_put_contents
(
"./phpTestout/"
.
$DataArr
[
'imdbID'
]
.
".txt"
,
"Film bereits in DB!"
.
PHP_EOL
,
FILE_APPEND
);
file_put_contents
(
"./phpTestout/"
.
$DataArr
[
'imdbID'
]
.
".txt"
,
"Film bereits in DB!"
.
PHP_EOL
,
FILE_APPEND
);
return
false
;
return
false
;
}
}
// Jetzt noch MD5 berechnen
// Jetzt noch MD5 berechnen
if
(
$md5
){
if
(
$md5
){
echo
"Berechne MD5... "
;
echo
"
Berechne MD5... "
;
$DataArr
[
"md5"
]
=
substr
(
shell_exec
(
'md5sum -b "'
.
$File
.
'"'
),
0
,
32
);
$DataArr
[
"md5"
]
=
substr
(
shell_exec
(
'md5sum -b "'
.
$File
.
'"'
),
0
,
32
);
file_put_contents
(
"./phpTestout/"
.
$DataArr
[
'imdbID'
]
.
".txt"
,
"md5 = "
.
$DataArr
[
"md5"
]
.
PHP_EOL
,
FILE_APPEND
);
file_put_contents
(
"./phpTestout/"
.
$DataArr
[
'imdbID'
]
.
".txt"
,
"md5 = "
.
$DataArr
[
"md5"
]
.
PHP_EOL
,
FILE_APPEND
);
echo
" done!"
.
PHP_EOL
;
echo
" done!"
.
PHP_EOL
;
...
@@ -786,7 +786,7 @@ class Media {
...
@@ -786,7 +786,7 @@ class Media {
/**
/**
* Cover download
* Cover download
*/
*/
public
function
cover
(){
public
function
cover
(
$type
=
"all"
){
echo
$this
->
Console
->
getColoredString
(
"Coverdownload > Filme"
,
"black"
,
"light_gray"
)
.
PHP_EOL
;
echo
$this
->
Console
->
getColoredString
(
"Coverdownload > Filme"
,
"black"
,
"light_gray"
)
.
PHP_EOL
;
$start
=
time
();
$start
=
time
();
$mysqli
=
new
mysqli
(
$this
->
config
[
"DB_Server"
],
$this
->
config
[
"DB_Username"
],
$this
->
config
[
"DB_Passwort"
],
$this
->
config
[
"DB_Database"
]);
$mysqli
=
new
mysqli
(
$this
->
config
[
"DB_Server"
],
$this
->
config
[
"DB_Username"
],
$this
->
config
[
"DB_Passwort"
],
$this
->
config
[
"DB_Database"
]);
...
...
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