fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
dab276b
)
skip *_o.jpg when updating covers
author
Jan Szejko
<janek37@gmail.com>
Tue, 23 May 2017 10:19:33 +0000
(12:19 +0200)
committer
Jan Szejko
<janek37@gmail.com>
Tue, 23 May 2017 10:19:33 +0000
(12:19 +0200)
apps/cover/management/commands/refresh_covers.py
patch
|
blob
|
history
diff --git
a/apps/cover/management/commands/refresh_covers.py
b/apps/cover/management/commands/refresh_covers.py
index
2c78db9
..
1097a75
100644
(file)
--- a/
apps/cover/management/commands/refresh_covers.py
+++ b/
apps/cover/management/commands/refresh_covers.py
@@
-21,8
+21,8
@@
class Command(BaseCommand):
def handle(self, *args, **options):
from_id = options.get('from_id', 1)
for image in Image.objects.filter(id__gte=from_id).exclude(book=None).order_by('id'):
def handle(self, *args, **options):
from_id = options.get('from_id', 1)
for image in Image.objects.filter(id__gte=from_id).exclude(book=None).order_by('id'):
- print image.id
- if image.source_url and 'flickr.com' in image.source_url:
+ if image.source_url and 'flickr.com' in image.source_url and not image.download_url.endswith('_o.jpg'):
+ print image.id
try:
flickr_data = get_flickr_data(image.source_url)
print flickr_data
try:
flickr_data = get_flickr_data(image.source_url)
print flickr_data