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

[v3.0.1] Settings > Offline mode: 'Download Videos' in alphabetical order, but 'All' option isn't listed first #48

Open
ptooey opened this issue Mar 16, 2021 · 3 comments · Fixed by #51

Comments

@ptooey
Copy link

ptooey commented Mar 16, 2021

Just a little nitpick with this section-- 'Africa Night' and 'Africa and the Middle East' options appear before 'All' in the listing.

Expecting to see 'All' listed as first option.

@kubedzero
Copy link
Contributor

At least in the latest version, the list of options is sorted alphabetically. "All" is one of those, and "Africa" gets sorted before "All" https://github.com/enen92/screensaver.atv4/blob/master/resources/lib/offline.py#L19

@kubedzero
Copy link
Contributor

https://stackoverflow.com/questions/8537916/whats-the-idiomatic-syntax-for-prepending-to-a-short-python-list

The below modification could possibly work, maybe even as one line.

locations = ["All"] + sorted(["Italy to Asia", "Iran and Afghanistan", "Dubai", "Africa and the Middle East",
                    "California to Vegas", "Southern California to Baja", "China", "Antarctica", "Liwa",
                    "Sahara and Italy",
                    "Los Angeles", "San Francisco", "London", "Ireland to Asia", "New York", "West Africa to the Alps",
                    "New Zealand", "Caribbean Day", "Hawaii", "Caribbean", "Africa Night", "North America Aurora",
                    "New York Night", "Greenland", "Hong Kong", "Korean and Japan Night"])
- or -
locations.insert(0, "All")
- or -
locations =  ["All"] + locations

@kubedzero
Copy link
Contributor

This should be able to be closed, as it is fixed by #51

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

Successfully merging a pull request may close this issue.

2 participants