File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -151,12 +151,16 @@ def do_GET(self):
151
151
152
152
# Locate thumbnail
153
153
thumb_path = os .path .join (info .THUMBNAIL_PATH , file_id , "%s.png" % file_frame )
154
- if not os .path .exists (thumb_path ) and file_frame == 1 :
155
- # Try ID with no frame # (for backwards compatibility)
156
- thumb_path = os .path .join (info .THUMBNAIL_PATH , "%s.png" % file_id )
157
- if not os .path .exists (thumb_path ) and file_frame != 1 :
158
- # Try with ID and frame # in filename (for backwards compatibility)
159
- thumb_path = os .path .join (info .THUMBNAIL_PATH , "%s-%s.png" % (file_id , file_frame ))
154
+ if not os .path .exists (thumb_path ):
155
+ if file_frame == 1 :
156
+ # Try ID with no frame # (for backwards compatibility)
157
+ alt_path = os .path .join (info .THUMBNAIL_PATH , "%s.png" % file_id )
158
+ else :
159
+ # Try with ID and frame # in filename (for backwards compatibility)
160
+ alt_path = os .path .join (info .THUMBNAIL_PATH , "%s-%s.png" % (file_id , file_frame ))
161
+
162
+ if os .path .exists (alt_path ):
163
+ thumb_path = alt_path
160
164
161
165
if not os .path .exists (thumb_path ):
162
166
# Generate thumbnail (since we can't find it)
You can’t perform that action at this time.
0 commit comments