Name of the image without file extension
MacG-DD opened this issue · 3 comments
The name of the image also shows the file extension.
Could you please remove it or use the title from the EXIF data?
Here is my solution way. I added the following after line 101 of MMM-BackgroundSlideshow.js
// remove the file extension from image name
showNoFileExtension: false
as config variable and after line 617 the function
// Remove file extension from image name.
if (this.config.showNoFileExtension) {
imageName = imageName.split('.')[0];
}
Then you have to add follows to the config.js
showNoFileExtension: true
Edit: a small adjustment and improvement
Add the function in the current version after line 634 or better above the line with
imageProps.push(imageName);
@darickc Maybe someone can make a branch or master out of it. This is beyond my capabilities.
Thanks @MacG-DD ! This was exactly what I was looking for, especially since gpetersen/MMM-BackgroundSlideshowInfo has stopped working for me.
I created the pull request to merge this into the main code.
PS - I changed the function name from showNoFileExtension
to imageInfoNoFileExt
just to better match the related config options.