Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort: metadata for album only overrides 'albums_sort_attr' not 'medias_sort_attr' #453

Open
hossman opened this issue Jan 18, 2022 · 3 comments

Comments

@hossman
Copy link

hossman commented Jan 18, 2022

album_information.rst says...

- *Sort*: the sort order for this album. If prefixed with a '-' it will be in
  reversed order.

...but this only seems to apply to sorting "sub albums" because it's only used in Album.sort_subdirs()

Album.sort_medias() doesn't seem to know/care about either self.meta['sort'] so media files are only ever sorted by the (global) medias_sort_attr setting for the entire gallery.

@saimn
Copy link
Owner

saimn commented Jan 28, 2022

Indeed. Would be useful to have the feature for sort_medias, not sure if it should be the same metadata key though ?

@hossman
Copy link
Author

hossman commented Jan 28, 2022

... not sure if it should be the same metadata key though ?

Given the current design of sigal -- where an album can either have sub-albums or images, but not both -- I'm not sure why it wouldn't make sense to say "The Sort: metadata in index.md can be used to override either the albums_sort_attr or medias_sort_attr configuration setting, depending on wether the album contains sub-albums or media."

If you plan to change the design, to allow albums to contain both sub-albums and media (and i have some loose thoughts on this i could put in a in issue if you're interested ... comments from peanut gallery as a person not very familiar with the code) then it would probably make sense to have distinct keys that correspond with the distinct config settings

@saimn
Copy link
Owner

saimn commented Jan 31, 2022

If you plan to change the design, to allow albums to contain both sub-albums and media (and i have some loose thoughts on this i could put in a in issue if you're interested)

See #408 ;). (This was supported and then removed to simplify the templates maintenance... and I did not think this was a very useful and widely used feature. Support was added back in galleria in #438)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants