str.find() return -1 when fail
This commit is contained in:
3
core.py
3
core.py
@@ -652,8 +652,7 @@ def core_main_no_net_op(movie_path, number):
|
|||||||
full_nfo = Path(path) / f"{prestr}{part}.nfo"
|
full_nfo = Path(path) / f"{prestr}{part}.nfo"
|
||||||
|
|
||||||
if full_nfo.is_file():
|
if full_nfo.is_file():
|
||||||
nfo = full_nfo.read_text(encoding='utf-8')
|
if full_nfo.read_text(encoding='utf-8').find(r'<tag>无码</tag>') >= 0:
|
||||||
if nfo.find(r'<tag>无码</tag>'):
|
|
||||||
uncensored = 1
|
uncensored = 1
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user