File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -155,8 +155,6 @@ def __init__(self, spice_type):
155155
156156 self .index_file = os .path .join (self .cache_folder , "index.json" )
157157
158- os .makedirs (self .cache_folder , mode = 0o755 , exist_ok = True )
159-
160158 if self .themes :
161159 self .install_folder = os .path .join (home , ".themes" )
162160 self .spices_directories = (self .install_folder , )
@@ -174,10 +172,14 @@ def __init__(self, spice_type):
174172 except Exception as e :
175173 print (e )
176174
177- def refresh (self ):
175+ def refresh (self , full ):
178176 debug ("Cache stamp: %d" % get_current_timestamp ())
177+
178+ os .makedirs (self .cache_folder , mode = 0o755 , exist_ok = True )
179179 self ._update_local_json ()
180- self ._update_local_thumbs ()
180+
181+ if full :
182+ self ._update_local_thumbs ()
181183
182184 self ._load_metadata ()
183185 self ._clean_old_thumbs ()
Original file line number Diff line number Diff line change @@ -27,13 +27,13 @@ def get_updates(self):
2727 updates += self .get_updates_of_type (spice_type )
2828 return updates
2929
30- def refresh_all_caches (self ):
30+ def refresh_all_caches (self , full = False ):
3131 for spice_type in SPICE_TYPES :
32- self .refresh_cache_for_type (spice_type )
32+ self .refresh_cache_for_type (spice_type , full )
3333
34- def refresh_cache_for_type (self , spice_type ):
34+ def refresh_cache_for_type (self , spice_type , full = False ):
3535 harvester = self .harvesters [spice_type ]
36- return harvester .refresh ()
36+ return harvester .refresh (full )
3737
3838 def get_updates_of_type (self , spice_type ):
3939 harvester = self .harvesters [spice_type ]
You can’t perform that action at this time.
0 commit comments