解决一个视频文件名不带,而.nfo文件名带'-流出'的死循环bug

This commit is contained in:
lededev
2021-09-26 00:35:00 +08:00
parent aae5b0a8d3
commit 16078b95b1
2 changed files with 14 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
from os import replace
import requests
import hashlib
import pathlib
from pathlib import Path
import random
import os.path
import uuid
@@ -551,7 +551,7 @@ def load_cookies(filename):
# 文件修改时间距此时的天数
def file_modification_days(filename) -> int:
mfile = pathlib.Path(filename)
mfile = Path(filename)
if not mfile.exists():
return 9999
mtime = int(mfile.stat().st_mtime)