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
acebf9e3
Commit
acebf9e3
authored
Jan 26, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
c77c7127
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
29 deletions
+21
-29
media.class.php
media.class.php
+21
-29
No files found.
media.class.php
View file @
acebf9e3
...
@@ -105,50 +105,42 @@ class Media {
...
@@ -105,50 +105,42 @@ class Media {
else
{
echo
" Verzeichnis "
.
$this
->
PfadzumAusgeben
.
$value
.
" wird für "
.
$key
.
" als Ausgabe verwendet"
.
PHP_EOL
;
}
else
{
echo
" Verzeichnis "
.
$this
->
PfadzumAusgeben
.
$value
.
" wird für "
.
$key
.
" als Ausgabe verwendet"
.
PHP_EOL
;
}
}
}
}
}
echo
PHP_EOL
;
echo
"Starte verarbeitung der Filme:"
.
PHP_EOL
.
PHP_EOL
;
echo
"Starte verarbeitung der Filme:"
.
PHP_EOL
.
PHP_EOL
;
$FilmeArr
=
$this
->
dirtoArray
(
$this
->
PfadzumEinlesen
);
$FilmeArr
=
$this
->
dirtoArray
(
$this
->
PfadzumEinlesen
);
//var_dump($FilmeArr);
//var_dump($FilmeArr);
foreach
(
$FilmeArr
as
$value
)
{
foreach
(
$FilmeArr
as
$value
)
{
echo
" "
.
$this
->
PfadzumEinlesen
.
'/'
.
(
strlen
(
$value
[
0
])
>
0
?
$value
[
0
]
.
'/'
:
''
)
.
$value
[
1
]
.
PHP_EOL
;
echo
" "
.
$this
->
PfadzumEinlesen
.
'/'
.
(
strlen
(
$value
[
0
])
>
0
?
$value
[
0
]
.
'/'
:
''
)
.
$value
[
1
]
.
PHP_EOL
;
echo
$this
->
parseMovie
(
$this
->
PfadzumEinlesen
.
'/'
.
(
strlen
(
$value
[
0
])
>
0
?
$value
[
0
]
.
'/'
:
''
),
$value
[
1
])
.
PHP_EOL
;
}
}
trim
(
fgets
(
STDIN
));
trim
(
fgets
(
STDIN
));
echo
PHP_EOL
;
echo
PHP_EOL
;
//return ;
//return ;
}
}
private
function
parseMovie
(
$Pfad
,
$Filename
){
$array
=
array
();
return
$Pfad
.
" > "
.
$Filename
;
}
private
function
dirtoArray
(
$dir
,
$root
=
''
){
private
function
dirtoArray
(
$dir
,
$root
=
''
){
$Arr
=
scandir
(
$dir
);
$Arr
=
scandir
(
$dir
);
//global $Notindexed;
foreach
(
$this
->
config
[
"FolderIgnor"
]
AS
$value
){
//$FolderIgnor = array('.@__thumb', '@Recycle', 'HD-Serien', 'Die Olsenbande', 'Serien', 'FilmeALT', 'Filme','FilmeZumEinlesen');
unset
(
$Arr
[
array_search
(
$value
,
$Arr
)]);
foreach
(
$this
->
config
[
"FolderIgnor"
]
AS
$value
){
unset
(
$Arr
[
array_search
(
$value
,
$Arr
)]);
}
/*
unset($Arr[array_search('.', $Arr)]);
unset($Arr[array_search('..', $Arr)]);
unset($Arr[array_search('.@__thumb', $Arr)]);
unset($Arr[array_search('/HD-Serien', $Arr)]);
unset($Arr[array_search('/Serien', $Arr)]);
unset($Arr[array_search('/FilmeALT', $Arr)]);
unset($Arr[array_search('/FilmeALT', $Arr)]);
unset($Arr[array_search('/Filme', $Arr)]);
unset($Arr[array_search('/FilmeZumEinlesen', $Arr)]);
*/
foreach
(
$Arr
AS
$Key
=>
$Value
){
if
(
is_dir
(
$dir
.
'/'
.
$Value
)
AND
!
in_array
(
$Value
,
$FolderIgnor
)){
$SubDir
=
dirtoArray
(
$dir
.
'/'
.
$Value
,
$root
.
'/'
.
$Value
);
//print_r($SubDir);
//$OutArray[] = $dir.'/'.$Value;
//$OutArray = array_merge($OutArray, $SubDir);
}
}
else
{
foreach
(
$Arr
AS
$Key
=>
$Value
){
$this
->
FolderArray
[]
=
array
(
$root
,
$Value
);
if
(
is_dir
(
$dir
.
'/'
.
$Value
)
AND
!
in_array
(
$Value
,
$FolderIgnor
)){
//echo $root.'/'.$Value.PHP_EOL;
$SubDir
=
dirtoArray
(
$dir
.
'/'
.
$Value
,
$root
.
'/'
.
$Value
);
}
else
{
$this
->
FolderArray
[]
=
array
(
$root
,
$Value
);
}
}
}
return
$this
->
FolderArray
;
}
}
return
$this
->
FolderArray
;
}
}
}
\ 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