Skip to content

Commit

Permalink
sort
Browse files Browse the repository at this point in the history
  • Loading branch information
primaeval committed Nov 13, 2016
1 parent 4e9b377 commit d8fcebe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,11 @@ def index_of(path=None):
'thumbnail':thumbnail,
'context_menu': context_items,
})
items = items + sorted(favourites(path), key=lambda x: x["label"].lower())

if plugin.get_setting('sort') == 'true':
items = items + sorted(favourites(path), key=lambda x: x["label"].lower())
else:
items = items + favourites(path)

items.append(
{
Expand Down
3 changes: 3 additions & 0 deletions resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
<setting type="lsep" label="Please remove it."/>
<setting label="Import Previous Favourites" type="action" action="XBMC.RunPlugin(plugin://plugin.program.simple.favourites/upgrade)"/>
</category>
<category label="Appearance">
<setting id="sort" label="Sort" type="bool" default="true" />
</category>
</settings>

0 comments on commit d8fcebe

Please sign in to comment.