Log more info about files existing.
This commit is contained in:
parent
2ce75a4cd4
commit
0f1aee809e
1 changed files with 9 additions and 1 deletions
10
player.py
10
player.py
|
@ -300,7 +300,15 @@ class Player():
|
|||
self.logger.log.error("Failed to find weight: {}".format(weight))
|
||||
return False
|
||||
|
||||
if loaded_item.filename == "" or loaded_item.filename == None or not os.path.isfile(loaded_item.filename):
|
||||
reload = False
|
||||
if loaded_item.filename == "" or loaded_item.filename == None:
|
||||
self.logger.log.info("Filename is not specified, loading from API.")
|
||||
reload = True
|
||||
elif not os.path.exists(loaded_item.filename):
|
||||
self.logger.log.warn("Filename given doesn't exist. Re-loading from API.")
|
||||
reload = True
|
||||
|
||||
if reload:
|
||||
loaded_item.filename = self.api.get_filename(item = loaded_item)
|
||||
|
||||
if not loaded_item.filename:
|
||||
|
|
Loading…
Reference in a new issue