Sort reddit gallery
e41a8f2822/app/src/main/java/me/ccrama/redditslide/Adapters/GalleryView.java (L278)
This commit is contained in:
parent
e1fe1bba28
commit
3371eba487
|
@ -282,7 +282,11 @@ async def main():
|
||||||
elif getattr(random_post, 'is_gallery', None):
|
elif getattr(random_post, 'is_gallery', None):
|
||||||
files = []
|
files = []
|
||||||
captions = []
|
captions = []
|
||||||
for a, i in enumerate(random_post.media_metadata):
|
if getattr(random_post, 'gallery_data', None):
|
||||||
|
gallery_keys = map(lambda i: i[1], sorted(map(lambda i: (i['id'], i['media_id']), random_post.gallery_data['items']), key=lambda i: i[0]))
|
||||||
|
else:
|
||||||
|
gallery_keys = random_post.media_metadata.keys()
|
||||||
|
for a, i in enumerate(gallery_keys):
|
||||||
i = random_post.media_metadata[i]
|
i = random_post.media_metadata[i]
|
||||||
if i['status'] == 'valid':
|
if i['status'] == 'valid':
|
||||||
filename = os.path.join(tempdir, str(time.time()))
|
filename = os.path.join(tempdir, str(time.time()))
|
||||||
|
|
Loading…
Reference in New Issue