-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: reintroduce and refactor filesize validation with media type enums
- Added `ShowMediaType`, `MovieMediaType`, and `MediaType` enums to categorize media types. - Refactored `filesize_is_acceptable` function to use media type enums for validation. - Updated `Downloader` class to utilize the new media type enums for file validation. - Consolidated movie and show filesize validation into a single function. - Enhanced code readability and maintainability by using enums and reducing redundancy.
- Loading branch information
1 parent
d30bece
commit ad40587
Showing
4 changed files
with
56 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from .item import Episode, MediaItem, Movie, Season, Show # noqa | ||
from .item import Episode, MediaItem, Movie, Season, Show, ShowMediaType, MovieMediaType, MediaType # noqa | ||
from .state import States # noqa |
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