Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
Fix background images bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
lots0logs committed Jan 8, 2018
1 parent 68ce114 commit ed96578
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions themes/default/js/greeter.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,14 @@ class ThemeConfig {

this.logo = greeter_config.branding.logo || 'img/antergos.png';
this.user_image = greeter_config.branding.user_image || 'img/antergos-logo-user.png';
this.background_images_dir = greeter_config.branding.background_images || '/usr/share/backgrounds';
this.background_images_dir = greeter_config.branding.background_images_dir || '/usr/share/backgrounds';
this.debug = greeter_config.greeter.debug_mode || false;
this.background_images = this._get( 'background_manager', 'background_images' );
this.images_cache_expires = moment.unix( parseInt( this._get( 'background_manager', 'cache_expires' ) ) );

let expired = ( null === this.background_images || ! this.images_cache_expires.isValid() || moment().isAfter( this.images_cache_expires ) );

if ( ! expired || ! this.background_images_dir ) {
if ( this.background_images && this.background_images.length > 0 && ! expired ) {
this.background_images = JSON.parse( this.background_images );
return callback();
}
Expand Down
2 changes: 1 addition & 1 deletion web-greeter/bridge/ThemeUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def dirlist(self, dir_path, only_images=True):
return []

if only_images:
file_types = ('jpg', 'jpeg', 'png', 'gif', 'bmp')
file_types = ('jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp')
result = [
glob('{0}/**/*.{1}'.format(dir_path, ftype), recursive=True)
for ftype in file_types
Expand Down

0 comments on commit ed96578

Please sign in to comment.