mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-16 02:02:53 -07:00
Fix mutable default argument
This commit is contained in:
parent
ad3fb4519d
commit
80b5a8c253
1 changed files with 8 additions and 2 deletions
|
@ -1032,7 +1032,10 @@ def is_archive_file(filename):
|
|||
return False
|
||||
|
||||
|
||||
def is_media_file(mediafile, media=True, audio=True, meta=True, archives=True, other=False, otherext=[]):
|
||||
def is_media_file(mediafile, media=True, audio=True, meta=True, archives=True, other=False, otherext=None):
|
||||
if otherext is None:
|
||||
otherext = []
|
||||
|
||||
file_name, file_ext = os.path.splitext(mediafile)
|
||||
|
||||
try:
|
||||
|
@ -1051,7 +1054,10 @@ def is_media_file(mediafile, media=True, audio=True, meta=True, archives=True, o
|
|||
return False
|
||||
|
||||
|
||||
def list_media_files(path, min_size=0, delete_ignored=0, media=True, audio=True, meta=True, archives=True, other=False, otherext=[]):
|
||||
def list_media_files(path, min_size=0, delete_ignored=0, media=True, audio=True, meta=True, archives=True, other=False, otherext=None):
|
||||
if otherext is None:
|
||||
otherext = []
|
||||
|
||||
files = []
|
||||
if not os.path.isdir(path):
|
||||
if os.path.isfile(path): # Single file downloads.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue