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
aca89b5e
Commit
aca89b5e
authored
Jan 20, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
md5 in
parent
bab2faec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Media2.py
Media2.py
+3
-3
No files found.
Media2.py
View file @
aca89b5e
...
@@ -20,7 +20,7 @@ class Database(object):
...
@@ -20,7 +20,7 @@ class Database(object):
try
:
try
:
self
.
connection
=
MySQLdb
.
connect
(
host
=
"192.168.0.32"
,
port
=
3306
,
db
=
"MediaDB_Nico"
,
user
=
"MediaDB"
,
passwd
=
"MediaDB"
)
self
.
connection
=
MySQLdb
.
connect
(
host
=
"192.168.0.32"
,
port
=
3306
,
db
=
"MediaDB_Nico"
,
user
=
"MediaDB"
,
passwd
=
"MediaDB"
)
except
:
except
:
self
.
connection
=
MySQLdb
.
connect
(
host
=
"
pimaster.ddns.net"
,
port
=
3306
,
db
=
"MediaDB"
,
user
=
"markus"
,
passwd
=
"
"
)
self
.
connection
=
MySQLdb
.
connect
(
host
=
"
192.168.0.32"
,
port
=
3306
,
db
=
"MediaDB_Nico"
,
user
=
"MediaDB"
,
passwd
=
"MediaDB
"
)
self
.
instance
=
self
.
connection
.
cursor
()
self
.
instance
=
self
.
connection
.
cursor
()
def
deleteDuplicates
(
self
):
def
deleteDuplicates
(
self
):
...
@@ -1024,8 +1024,8 @@ class FilmParser(object):
...
@@ -1024,8 +1024,8 @@ class FilmParser(object):
number
=
1
number
=
1
for
movie
in
self
.
movies
:
for
movie
in
self
.
movies
:
print
(
'Berechne md5
%
s von
%
s'
%
(
number
,
len
(
self
.
movies
)))
print
(
'Berechne md5
%
s von
%
s'
%
(
number
,
len
(
self
.
movies
)))
#
movie['md5'] = subprocess.Popen(['md5sum', movie['path']], shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0].split()[0]
movie
[
'md5'
]
=
subprocess
.
Popen
([
'md5sum'
,
movie
[
'path'
]],
shell
=
False
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
.
communicate
()[
0
]
.
split
()[
0
]
movie
[
'md5'
]
=
'c763d1aa80620530e494b1331151FAKE'
#
movie['md5'] = 'c763d1aa80620530e494b1331151FAKE'
number
+=
1
number
+=
1
def
printOverview
(
self
):
def
printOverview
(
self
):
...
...
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