misc tweaks
This commit is contained in:
parent
ef63c30f8b
commit
0663283893
|
@ -29,6 +29,7 @@ def batch_ingest(library, files):
|
|||
# group by extension
|
||||
byext = {k: [] for k in known_extensions}
|
||||
|
||||
print("processing {} items".format(len(files)))
|
||||
print("Pre-sorting files")
|
||||
for item in files:
|
||||
if not os.path.isfile(item):
|
||||
|
|
|
@ -94,7 +94,6 @@ class PhotoLibrary(object):
|
|||
thumb_width = min(thumb_width, i_width if i_width > 0 else 999999999) # TODO do we even have photo.width if PIL can't read the image?
|
||||
thumb_height = min(thumb_height, i_height if i_height > 0 else 999999999) # TODO this seems bad
|
||||
|
||||
print("thumb final wxh is {}x{}".format(thumb_width, thumb_height))
|
||||
p = Process(target=self.gen_thumb, args=(os.path.join(self.path, photo.path), dest, thumb_width, thumb_height, photo.orientation))
|
||||
p.start()
|
||||
p.join()
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
backports.functools-lru-cache==1.5
|
||||
cheroot==6.5.2
|
||||
CherryPy==18.0.0
|
||||
contextlib2==0.5.5
|
||||
jaraco.functools==1.20
|
||||
Jinja2==2.10
|
||||
MarkupSafe==1.0
|
||||
more-itertools==4.3.0
|
||||
Pillow==5.2.0
|
||||
portend==2.3
|
||||
python-magic==0.4.15
|
||||
pytz==2018.5
|
||||
six==1.11.0
|
||||
SQLAlchemy==1.2.11
|
||||
tempora==1.13
|
||||
zc.lockfile==1.3.0
|
||||
|
|
|
@ -7,11 +7,12 @@
|
|||
|
||||
|
||||
<div class="photo-feed">
|
||||
{% set locals.im_year = 0 %}
|
||||
{% set locals.im_date = "" %}
|
||||
{% for item in images %}
|
||||
{% if item.date.year != locals.im_year %}
|
||||
{% set locals.im_year = item.date.year %}
|
||||
<div class="feed-divider year"><h4>{{ locals.im_year }}</h4></div>
|
||||
{% set newdate = item.date.strftime("%b %d, %Y") %}
|
||||
{% if newdate != locals.im_date %}
|
||||
{% set locals.im_date = newdate %}
|
||||
<div class="feed-divider year"><h4>{{ locals.im_date }}</h4></div>
|
||||
{% endif %}
|
||||
<div class="photo">
|
||||
<a href="/photo/{{ item.uuid }}">
|
||||
|
@ -20,7 +21,7 @@
|
|||
</div>
|
||||
{% endfor %}
|
||||
<br style="clear:both" />
|
||||
<a href="feed?page={{ page + 1 }}">Next</a>
|
||||
{% if page > 0 %}<a href="feed?page={{ page - 1 }}">Previous</a> {% endif %}<a href="feed?page={{ page + 1 }}">Next</a>
|
||||
</div>
|
||||
|
||||
{% include "page-bottom.html" %}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
{{ img.path | basename }}
|
||||
</div>
|
||||
<div>
|
||||
{{ img.size | filesizeformat }} - {{ img.width }} x {{ img.height }}
|
||||
{{ img.size | filesizeformat }}{% if img.width %} - {{ img.width }} x {{ img.height }}{% endif %}
|
||||
</div>
|
||||
{% if img.orientation > 0 %}
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue