forked from rDrama/rDrama
fix
parent
c2f397df40
commit
a6ce6135d8
|
@ -24,11 +24,11 @@ def marseys(v):
|
|||
if SITE == 'rdrama.net':
|
||||
marseys = g.db.query(Marsey, User).join(User, Marsey.author_id == User.id).filter(Marsey.submitter_id==None)
|
||||
sort = request.values.get("sort", "usage")
|
||||
if sort == "usage": marseys = marseys.order_by(Marsey.count.desc(), User.username)
|
||||
else: marseys = marseys.order_by(User.username, Marsey.count.desc())
|
||||
if sort == "usage": marseys = marseys.order_by(Marsey.count.desc(), User.username).all()
|
||||
else: marseys = marseys.order_by(User.username, Marsey.count.desc()).all()
|
||||
|
||||
original = listdir("/asset_submissions/marseys/original")
|
||||
for m in marseys:
|
||||
for marsey in marseys:
|
||||
if f'{marsey.name}.png' in original:
|
||||
marsey.og = f'{marsey.name}.png'
|
||||
elif f'{marsey.name}.webp' in original:
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Marsey</th>
|
||||
<th onclick="sort_table(3)">Usage</th>
|
||||
<th>Usage</th>
|
||||
{% if SITE == 'rdrama.net' %}
|
||||
<th><a href="?sort=author">Author</a></th>
|
||||
<th>Original File</th>
|
||||
|
@ -47,6 +47,4 @@
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
<script defer src="{{asset('js/sort_table.js')}}"></script>
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue