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
5ea5f571
Commit
5ea5f571
authored
Mar 13, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kleine Anpassungen:
z.b. Collection Name und doppelte Mysql Real Escape für Schauspieler entfernt!
parent
451b5f7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
media.class.php
media.class.php
+15
-3
No files found.
media.class.php
View file @
5ea5f571
...
@@ -156,6 +156,7 @@ class Media {
...
@@ -156,6 +156,7 @@ class Media {
else
{
else
{
if
(
isset
(
$array
[
"collection"
])){
if
(
isset
(
$array
[
"collection"
])){
echo
"Collection Ausgabe in eigenen Collection Ordner: "
.
$array
[
"collection"
]
.
PHP_EOL
;
echo
"Collection Ausgabe in eigenen Collection Ordner: "
.
$array
[
"collection"
]
.
PHP_EOL
;
/*
$array["collection"] = str_replace("Filmreihe", "", $array["collection"]);
$array["collection"] = str_replace("Filmreihe", "", $array["collection"]);
$array["collection"] = str_replace(":", "", $array["collection"]);
$array["collection"] = str_replace(":", "", $array["collection"]);
$array["collection"] = str_replace("Reihe", "", $array["collection"]);
$array["collection"] = str_replace("Reihe", "", $array["collection"]);
...
@@ -165,7 +166,7 @@ class Media {
...
@@ -165,7 +166,7 @@ class Media {
$array["collection"] = str_replace("()", "o", $array["collection"]);
$array["collection"] = str_replace("()", "o", $array["collection"]);
$array["collection"] = str_replace("(Animiert)", "", $array["collection"]);
$array["collection"] = str_replace("(Animiert)", "", $array["collection"]);
$array["collection"] = str_replace("Collection", "", $array["collection"]);
$array["collection"] = str_replace("Collection", "", $array["collection"]);
*/
$Pfadnew
=
trim
(
$array
[
"collection"
])
.
'/'
;
$Pfadnew
=
trim
(
$array
[
"collection"
])
.
'/'
;
}
}
...
@@ -285,7 +286,18 @@ class Media {
...
@@ -285,7 +286,18 @@ class Media {
if
(
isset
(
$tmdbData1
[
"title"
])){
$DataArray
[
"titelDeutsch"
]
=
$tmdbData1
[
"title"
];
}
if
(
isset
(
$tmdbData1
[
"title"
])){
$DataArray
[
"titelDeutsch"
]
=
$tmdbData1
[
"title"
];
}
if
(
isset
(
$tmdbData1
[
"original_title"
])){
$DataArray
[
"titelOriginal"
]
=
$tmdbData1
[
"original_title"
];}
if
(
isset
(
$tmdbData1
[
"original_title"
])){
$DataArray
[
"titelOriginal"
]
=
$tmdbData1
[
"original_title"
];}
if
(
isset
(
$tmdbData1
[
"tagline"
])){
$DataArray
[
"tagline"
]
=
$tmdbData1
[
"tagline"
];}
if
(
isset
(
$tmdbData1
[
"tagline"
])){
$DataArray
[
"tagline"
]
=
$tmdbData1
[
"tagline"
];}
if
(
isset
(
$tmdbData1
[
"belongs_to_collection"
][
"name"
])){
$DataArray
[
"collection"
]
=
$tmdbData1
[
"belongs_to_collection"
][
"name"
];}
if
(
isset
(
$tmdbData1
[
"belongs_to_collection"
][
"name"
])){
$DataArray
[
"collection"
]
=
$tmdbData1
[
"belongs_to_collection"
][
"name"
];
$DataArray
[
"collection"
]
=
str_replace
(
"Filmreihe"
,
""
,
$DataArray
[
"collection"
]);
$DataArray
[
"collection"
]
=
str_replace
(
":"
,
""
,
$DataArray
[
"collection"
]);
$DataArray
[
"collection"
]
=
str_replace
(
"Reihe"
,
""
,
$DataArray
[
"collection"
]);
$DataArray
[
"collection"
]
=
str_replace
(
"/"
,
""
,
$DataArray
[
"collection"
]);
$DataArray
[
"collection"
]
=
str_replace
(
"Immer Ärger mit 40"
,
""
,
$DataArray
[
"collection"
]);
$DataArray
[
"collection"
]
=
str_replace
(
"Immer Ärger mit 40"
,
""
,
$DataArray
[
"collection"
]);
$DataArray
[
"collection"
]
=
str_replace
(
"()"
,
"o"
,
$DataArray
[
"collection"
]);
$DataArray
[
"collection"
]
=
str_replace
(
"(Animiert)"
,
""
,
$DataArray
[
"collection"
]);
$DataArray
[
"collection"
]
=
str_replace
(
"Collection"
,
""
,
$DataArray
[
"collection"
]);
}
if
(
isset
(
$tmdbData1
[
"trailers"
][
"youtube"
][
0
][
"source"
])){
if
(
isset
(
$tmdbData1
[
"trailers"
][
"youtube"
][
0
][
"source"
])){
//TODO youtube Key auf 11 Zeichen prüfen!!
//TODO youtube Key auf 11 Zeichen prüfen!!
$youtubeDE
=
str_replace
(
"&hd=1"
,
""
,
$tmdbData1
[
"trailers"
][
"youtube"
][
0
][
"source"
]);
$youtubeDE
=
str_replace
(
"&hd=1"
,
""
,
$tmdbData1
[
"trailers"
][
"youtube"
][
0
][
"source"
]);
...
@@ -847,7 +859,7 @@ class Media {
...
@@ -847,7 +859,7 @@ class Media {
}
}
}
}
private
function
getSchauspielerID
(
$mysqli
,
$SchauspielerName
,
$SchauspielerID
){
private
function
getSchauspielerID
(
$mysqli
,
$SchauspielerName
,
$SchauspielerID
){
$SchauspielerName
=
$mysqli
->
real_escape_string
(
$SchauspielerName
);
//
$SchauspielerName = $mysqli->real_escape_string($SchauspielerName);
//$result = $mysqli->query("SELECT schauspielerID FROM Schauspieler WHERE name = '".mysql_escape_string(utf8_encode($SchauspielerName))."'");
//$result = $mysqli->query("SELECT schauspielerID FROM Schauspieler WHERE name = '".mysql_escape_string(utf8_encode($SchauspielerName))."'");
$result
=
$mysqli
->
query
(
"SELECT schauspielerID FROM Schauspieler WHERE schauspielerID = '"
.
$SchauspielerID
.
"'"
);
$result
=
$mysqli
->
query
(
"SELECT schauspielerID FROM Schauspieler WHERE schauspielerID = '"
.
$SchauspielerID
.
"'"
);
//echo "SELECT schauspielerID FROM Schauspieler WHERE name = '".$SchauspielerName."'".PHP_EOL;
//echo "SELECT schauspielerID FROM Schauspieler WHERE name = '".$SchauspielerName."'".PHP_EOL;
...
...
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