Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Commit

Permalink
fixed some problems with sets
Browse files Browse the repository at this point in the history
  • Loading branch information
adbenitez committed Jul 31, 2018
1 parent 15242fc commit 298908d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion smd/__init__.py
Expand Up @@ -15,7 +15,7 @@
import smd.utils as utils

__author__ = 'adbenitez'
__version__ = '1.6.0'
__version__ = '1.6.1'

conf_dir = utils.create_config_folder()
config = utils.Config(os.path.join(conf_dir, 'smd.cfg'))
Expand Down
6 changes: 3 additions & 3 deletions smd/utils.py
Expand Up @@ -404,8 +404,8 @@ def select_chapters(chapters, selectors):
:param chapters: a list of chapters (:class:`~smd.util.Chapter`).
:param str selectors: a string of comma-separated selectors.
:return: a set of selected chapters.
:rtype: set
:return: a list of selected chapters.
:rtype: list
"""
if not selectors:
return chapters
Expand Down Expand Up @@ -449,7 +449,7 @@ def select_chapters(chapters, selectors):
.format(selector))
if not chaps:
chaps = set(chapters)
return chaps - ignored_chaps
return sorted(chaps - ignored_chaps, key=lambda c: chapters.index(c))


def select_downloader(downloaders):
Expand Down

0 comments on commit 298908d

Please sign in to comment.