Fix dem bugs.
This commit is contained in:
parent
47a1e12c2c
commit
e87fe0a96c
@ -140,7 +140,7 @@ class Photo(object):
|
|||||||
decoded = TAGS.get(tag, tag)
|
decoded = TAGS.get(tag, tag)
|
||||||
if isinstance(value, str):
|
if isinstance(value, str):
|
||||||
value = value.strip()
|
value = value.strip()
|
||||||
if decoded.startswith("DateTime"):
|
if isinstance(decoded, str) and decoded.startswith("DateTime"):
|
||||||
try:
|
try:
|
||||||
value = datetime.strptime(value, '%Y:%m:%d %H:%M:%S')
|
value = datetime.strptime(value, '%Y:%m:%d %H:%M:%S')
|
||||||
except:
|
except:
|
||||||
@ -279,7 +279,7 @@ class Photo(object):
|
|||||||
path = os.path.join(basepath, dictionary["name"])
|
path = os.path.join(basepath, dictionary["name"])
|
||||||
del dictionary["name"]
|
del dictionary["name"]
|
||||||
for key, value in dictionary.items():
|
for key, value in dictionary.items():
|
||||||
if key.startswith("DateTime"):
|
if key.startswith("dateTime"):
|
||||||
try:
|
try:
|
||||||
dictionary[key] = datetime.strptime(dictionary[key], "%a %b %d %H:%M:%S %Y")
|
dictionary[key] = datetime.strptime(dictionary[key], "%a %b %d %H:%M:%S %Y")
|
||||||
except:
|
except:
|
||||||
|
@ -105,7 +105,7 @@ a:hover {
|
|||||||
}
|
}
|
||||||
#metadata {
|
#metadata {
|
||||||
background-color: #000000;
|
background-color: #000000;
|
||||||
width: 220px;
|
width: 240px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 12px;
|
line-height: 12px;
|
||||||
padding-top: 3px;
|
padding-top: 3px;
|
||||||
|
Loading…
Reference in New Issue
Block a user