enen92 / screensaver.atv4

Apple aerial screensavers (apple tv 4) for Kodi
GNU General Public License v2.0
52 stars 10 forks source link

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

Open ptooey opened 3 years ago

ptooey commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 1 year ago

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