banner name

main
Bob Mottram 2022-08-20 14:37:45 +01:00
parent 0abfb4fafc
commit aaf19268ea
1 changed files with 5 additions and 2 deletions

View File

@ -547,11 +547,14 @@ def _get_image_file(base_dir: str, name: str, directory: str,
banner_extensions = get_image_extensions()
banner_file = ''
banner_filename = ''
im_name = name
if name == 'banner':
im_name = 'image'
for ext in banner_extensions:
banner_file_test = name + '.' + ext
banner_file_test = im_name + '.' + ext
banner_filename_test = directory + '/' + banner_file_test
if os.path.isfile(banner_filename_test):
banner_file = name + '_' + theme + '.' + ext
banner_file = banner_file_test
banner_filename = banner_filename_test
return banner_file, banner_filename
# if not found then use the default image