diff options
author | Matt <32886639+mattlyon93@users.noreply.github.com> | 2020-08-29 22:00:56 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-29 22:00:56 +1000 |
commit | 85f34f8a5b15bfbe6510358d76b903baa33f4fc2 (patch) | |
tree | 6dc3e4ad3bd76f3678a5d6b3bedb48e9ae215aab /tpblite/models/constants.py | |
parent | cab856e292d96f8ae3686b0d25a778d1682691ae (diff) | |
parent | 47bcaca5004b08667368cd3d9d4e01f1ef998343 (diff) | |
download | tpb-lite-85f34f8a5b15bfbe6510358d76b903baa33f4fc2.tar.gz tpb-lite-85f34f8a5b15bfbe6510358d76b903baa33f4fc2.tar.bz2 tpb-lite-85f34f8a5b15bfbe6510358d76b903baa33f4fc2.zip |
Merge pull request #4 from loiccoyle/url
Adds a url attribute to the Torrent class
Diffstat (limited to 'tpblite/models/constants.py')
-rw-r--r-- | tpblite/models/constants.py | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/tpblite/models/constants.py b/tpblite/models/constants.py index 214b379..be65286 100644 --- a/tpblite/models/constants.py +++ b/tpblite/models/constants.py @@ -1,16 +1,23 @@ - class OPTION: @classmethod def printOptions(cls): - for opt in [x for x in cls.__dict__.keys() if not (x.startswith('__') or x.startswith('printOptions'))]: - if hasattr(getattr(cls,opt),'__dict__'): - for sub_opt in [y for y in getattr(cls,opt).__dict__.keys() if not (y.startswith('__') or y.startswith('printOptions'))]: - print('{}.{}'.format(opt,sub_opt)) + for opt in [ + x + for x in cls.__dict__.keys() + if not (x.startswith("__") or x.startswith("printOptions")) + ]: + if hasattr(getattr(cls, opt), "__dict__"): + for sub_opt in [ + y + for y in getattr(cls, opt).__dict__.keys() + if not (y.startswith("__") or y.startswith("printOptions")) + ]: + print("{}.{}".format(opt, sub_opt)) else: print(opt) -class ORDERS(OPTION): +class ORDERS(OPTION): class NAME(OPTION): DES = 1 ASC = 2 @@ -42,7 +49,7 @@ class ORDERS(OPTION): class CATEGORIES(OPTION): ALL = 0 - + class AUDIO(OPTION): ALL = 100 MUSIC = 101 @@ -102,4 +109,4 @@ class CATEGORIES(OPTION): PICTURES = 603 COVERS = 604 PHYSIBLES = 605 - OTHER = 699
\ No newline at end of file + OTHER = 699 |