File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -700,9 +700,8 @@ def clean_cache(self):
700700 )
701701 oldest_files_to_delete = sorted (
702702 cached_partial_movies ,
703- key = os . path . getatime ,
703+ key = lambda path : path . stat (). st_atime ,
704704 )[:number_files_to_delete ]
705- # oldest_file_path = min(cached_partial_movies, key=os.path.getatime)
706705 for file_to_delete in oldest_files_to_delete :
707706 file_to_delete .unlink ()
708707 logger .info (
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ def modify_atime(file_path: str) -> None:
183183 file_path
184184 The path of the file.
185185 """
186- os .utime (file_path , times = (time .time (), os . path . getmtime (file_path )))
186+ os .utime (file_path , times = (time .time (), Path (file_path ). stat (). st_mtime ))
187187
188188
189189def open_file (file_path , in_browser = False ):
You can’t perform that action at this time.
0 commit comments