minor visual fixes
This commit is contained in:
parent
9ba1a88174
commit
75ee476abf
4 changed files with 8 additions and 5 deletions
|
@ -421,7 +421,6 @@ class PDBPhotoMixin:
|
|||
Returns the Photo object.
|
||||
'''
|
||||
filename = os.path.abspath(filename)
|
||||
self.log.debug('New Photo: %s' % filename)
|
||||
if not os.path.isfile(filename):
|
||||
raise FileNotFoundError(filename)
|
||||
|
||||
|
@ -435,6 +434,7 @@ class PDBPhotoMixin:
|
|||
exc.photo = existing
|
||||
raise exc
|
||||
|
||||
self.log.debug('New Photo: %s' % filename)
|
||||
author_id = self.get_user_id_or_none(author)
|
||||
|
||||
extension = os.path.splitext(filename)[1]
|
||||
|
@ -1204,6 +1204,7 @@ class PhotoDB(PDBAlbumMixin, PDBBookmarkMixin, PDBPhotoMixin, PDBTagMixin, PDBUs
|
|||
albums = {directory.absolute_path: album}
|
||||
|
||||
for (current_location, directories, files) in generator:
|
||||
# Create the photo object
|
||||
new_photos = []
|
||||
for filepath in files:
|
||||
try:
|
||||
|
@ -1215,6 +1216,7 @@ class PhotoDB(PDBAlbumMixin, PDBBookmarkMixin, PDBPhotoMixin, PDBTagMixin, PDBUs
|
|||
if not make_albums:
|
||||
continue
|
||||
|
||||
# Ensure that the current directory is an album.
|
||||
current_album = albums.get(current_location.absolute_path, None)
|
||||
if current_album is None:
|
||||
try:
|
||||
|
@ -1228,6 +1230,8 @@ class PhotoDB(PDBAlbumMixin, PDBBookmarkMixin, PDBPhotoMixin, PDBTagMixin, PDBUs
|
|||
self.log.debug('Created %s' % current_album.title)
|
||||
albums[current_location.absolute_path] = current_album
|
||||
|
||||
# Add the current directory album to the parent directory album.
|
||||
# Add the photos to the current album.
|
||||
parent = albums.get(current_location.parent.absolute_path, None)
|
||||
if parent is not None:
|
||||
try:
|
||||
|
|
|
@ -103,7 +103,7 @@ def P_tag(tagname):
|
|||
try:
|
||||
return P.get_tag(tagname)
|
||||
except exceptions.NoSuchTag as e:
|
||||
return 'That tag doesnt exist: %s' % e
|
||||
return 'That tag doesnt exist: %s' % tagname
|
||||
|
||||
@P_wrapper
|
||||
def P_user(username):
|
||||
|
@ -122,7 +122,6 @@ def send_file(filepath, override_mimetype=None):
|
|||
flask.abort(404)
|
||||
|
||||
outgoing_headers = {}
|
||||
print(override_mimetype)
|
||||
if override_mimetype is not None:
|
||||
mimetype = override_mimetype
|
||||
else:
|
||||
|
|
|
@ -171,7 +171,7 @@ li
|
|||
.photo_card_grid_file_metadata
|
||||
{
|
||||
font-family: monospace;
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
z-index: 0;
|
||||
|
|
|
@ -226,7 +226,7 @@ function receive_callback(response)
|
|||
if ("error" in response)
|
||||
{
|
||||
message_positivity = "message_negative";
|
||||
message_text = '"' + tagname + '" ' + response["error"];
|
||||
message_text = response["error"];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue