Various fix

This commit is contained in:
Cédric Leporcq 2021-06-27 07:28:51 +02:00
parent e9a79d39c5
commit de1dacc837
3 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@ -10,3 +10,4 @@ build/**
**/*.nef **/*.nef
**/*.rw2 **/*.rw2
env/** env/**
/tags

View File

@ -312,7 +312,6 @@ def _update(album, location, time, title, paths, debug):
media.set_album(album, current_file) media.set_album(album, current_file)
updated = True updated = True
import ipdb; ipdb.set_trace()
# Updating a title can be problematic when doing it 2+ times on a file. # Updating a title can be problematic when doing it 2+ times on a file.
# You would end up with img_001.jpg -> img_001-first-title.jpg -> # You would end up with img_001.jpg -> img_001-first-title.jpg ->
# img_001-first-title-second-title.jpg. # img_001-first-title-second-title.jpg.
@ -363,7 +362,7 @@ def _update(album, location, time, title, paths, debug):
result.append((current_file, False)) result.append((current_file, False))
result.write() result.write()
if has_errors: if has_errors:
sys.exit(1) sys.exit(1)

View File

@ -651,6 +651,7 @@ class FileSystem(object):
# If source and destination are identical then # If source and destination are identical then
# we should not write the file. gh-210 # we should not write the file. gh-210
# TODO Allow this for update?
if(_file == dest_path): if(_file == dest_path):
print('Final source and destination path should not be identical') print('Final source and destination path should not be identical')
return return