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
9d5b7949
Commit
9d5b7949
authored
Feb 24, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
41300646
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
media.class.php
media.class.php
+7
-10
No files found.
media.class.php
View file @
9d5b7949
...
...
@@ -416,7 +416,7 @@ class Media {
if
(
!
(
strripos
(
$Filename
,
"("
)
==
false
)){
$array
[
"imdbID"
]
=
substr
(
$Filename
,
strripos
(
$Filename
,
"("
)
+
1
,
7
);
}
//
echo strlen($array["imdbID"])." ".$array["imdbID"].PHP_EOL;
//
if
(
!
isset
(
$array
[
"imdbID"
])){
//strlen($array["imdbID"])<=2
file_put_contents
(
"./phpTestout/default.txt"
,
"Keine imdbID in Dateinamen: "
.
$Pfad
.
$Filename
.
" gefunden!"
.
PHP_EOL
,
FILE_APPEND
);
return
false
;
...
...
@@ -546,7 +546,9 @@ class Media {
}
}
private
function
GenerateNFO
(
$DataArr
,
$File
){
echo
$File
.
""
.
PHP_EOL
;
$nfoFile
=
substr
(
$File
,
0
,
strripos
(
$File
,
"."
));
echo
$nfoFile
.
""
.
PHP_EOL
;
}
private
function
updateMovie
(
$DataArr
,
$File
,
$md5
=
true
,
$CheckOnly
=
true
){
...
...
@@ -804,6 +806,7 @@ class Media {
if
(
strpos
(
$url
,
"imdb-share"
)
>
3
){
//TODO 3. Quelle für cover einbauen
echo
" fail (Kein Cover gefunden)!"
.
PHP_EOL
;
file_put_contents
(
"./phpTestout/cover.txt"
,
"Kein Cover für "
.
$Film
[
"imdbID"
]
.
PHP_EOL
,
FILE_APPEND
);
$counterNotFound
++
;
}
else
{
shell_exec
(
"wget "
.
$url
.
" -O "
.
$this
->
config
[
"CoverDir"
]
.
"Filme/full/"
.
$Film
[
"imdbID"
]
.
".jpg"
.
" > /dev/null 2>&1"
);
...
...
@@ -835,6 +838,7 @@ class Media {
echo
"done!"
.
PHP_EOL
;
}
else
{
echo
"fail (Kein Hintergrundbild gefunden)!"
.
PHP_EOL
;
file_put_contents
(
"./phpTestout/cover.txt"
,
"Kein Hintergrundbild für "
.
$Film
[
"imdbID"
]
.
PHP_EOL
,
FILE_APPEND
);
$counterNotFound
++
;
}
}
else
{
...
...
@@ -893,13 +897,8 @@ class Media {
echo
"fail"
.
PHP_EOL
;
$counterNotFound
++
;
}
}
else
{
echo
" Cover für season_nr: "
.
$Film2
[
"season_nr"
]
.
" existiert bereits!"
.
PHP_EOL
;}
}
}
echo
$this
->
Console
->
getColoredString
(
"Coverdownload > Upload auf FTP Server"
,
"black"
,
"light_gray"
)
.
PHP_EOL
;
$SFTP_SERVER
=
"192.168.0.32"
;
...
...
@@ -907,8 +906,7 @@ class Media {
$SFTP_PWD
=
"1nico2%"
;
shell_exec
(
"lftp sftp://
$SFTP_USER
:
$SFTP_PWD
@
$SFTP_SERVER
-e 'mirror --reverse ~/MediaDBPythonScripte/cover /var/www/mediadb.ivaya.de/MediaDBViewerAPI/cover; bye'"
);
echo
"Done!"
.
PHP_EOL
;
$end
=
time
();
$laufzeit
=
$end
-
$start
;
$H
=
floor
(
$laufzeit
/
3600
);
...
...
@@ -919,6 +917,5 @@ class Media {
" Nicht gefunden: "
.
$counterNotFound
.
PHP_EOL
;
echo
$status
;
file_put_contents
(
"./phpTestout/cover.txt"
,
$status
.
PHP_EOL
,
FILE_APPEND
);
}
}
\ No newline at end of file
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