-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exposing existing filters in nut_gui (#281)
* refactoring: extracted Download from Config * added tests for nut.Config.Download * switched to external library for slider * added qt mirror * read file size filters from config * updated gitignore * refactored filters * fixed linting * save min/max size filters to config
- Loading branch information
Showing
12 changed files
with
193 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,6 @@ keys.txt | |
_NSPOUT | ||
|
||
nut.lock | ||
|
||
# config file to switch between conda environments | ||
environment.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
class Download: # pylint: disable=too-many-instance-attributes | ||
"""Download-releate settings | ||
""" | ||
|
||
def __init__(self): | ||
self.base = True | ||
self.demo = False | ||
self.DLC = True | ||
self.update = False | ||
self.sansTitleKey = False | ||
self.deltas = False | ||
self.regions = [] | ||
self.rankMin = None | ||
self.rankMax = None | ||
self.fileSizeMax = None | ||
self.fileSizeMin = None | ||
self.ratingMin = None | ||
self.ratingMax = None | ||
self.releaseDateMin = None | ||
self.releaseDateMax = None | ||
|
||
def addRegion(self, region_): | ||
region_ = region_.upper() | ||
if region_ not in self.regions: | ||
self.regions.append(region_) | ||
|
||
def removeRegion(self, region_): | ||
region_ = region_.upper() | ||
if region_ not in self.regions: | ||
return | ||
|
||
self.regions.remove(region_) | ||
|
||
def hasRegion(self, regions, default=True): | ||
if not self.regions or len(self.regions) == 0 or regions is None: | ||
return default | ||
|
||
for a in self.regions: | ||
for b in regions: | ||
if a == b: | ||
return True | ||
|
||
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ asn1~=2.4.1 | |
filelock~=3.0.12 | ||
Unidecode~=1.1.1 | ||
pycurl~=7.43.0 | ||
qt-range-slider~=0.2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ pylint~=2.6.0 | |
invoke~=1.4.0 | ||
coverage~=5.3 | ||
coveralls~=2.2.0 | ||
rope~=0.18.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.