Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed some minor bugs #486

Merged
merged 4 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ scanner:
# 格式要求:https://docs.pydantic.dev/2.0/usage/types/bytesize/
minimum_size: 232MiB
skip_nfo_dir: yes
manual: yes
################################
network:
# 设置代理服务器地址,支持 http, socks5/socks5h 代理,比如'http://127.0.0.1:1080'
Expand Down
6 changes: 4 additions & 2 deletions javsp/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ def reviewMovieID(all_movies, root):
def process_poster(movie: Movie):
def should_use_ai_crop_match(label):
for r in Cfg().summarizer.cover.crop.on_id_pattern:
re.match(r, label)
return True
if re.match(r, label):
return True
return False
crop_engine = None
if (movie.info.uncensored or
Expand Down Expand Up @@ -615,6 +615,8 @@ def entry():
recognize_fail = []
error_exit(movie_count, '未找到影片文件')
logger.info(f'扫描影片文件:共找到 {movie_count} 部影片')
if Cfg().scanner.manual:
reviewMovieID(recognized, root)
RunNormalMode(recognized + recognize_fail)

sys.exit(0)
Expand Down
1 change: 1 addition & 0 deletions javsp/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Scanner(BaseConfig):
ignored_folder_name_pattern: List[str]
minimum_size: ByteSize
skip_nfo_dir: bool
manual: bool

class CrawlerID(str, Enum):
airav = 'airav'
Expand Down
2 changes: 1 addition & 1 deletion javsp/web/prestige.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def parse_data(movie: MovieInfo):
genre_tags = container.xpath("//p[text()='ジャンル:']/following-sibling::div/a")
genre = [tag.text.strip() for tag in genre_tags]
serial = container.xpath("//p[text()='レーベル:']/following-sibling::div/a/text()")[0].strip()
plot = container.xpath("//h2[text()='商品紹介']/following-sibling::p")[0].text.strip()
plot = container.xpath("//h2[text()='商品紹介']/following-sibling::div/p")[0].text.strip()
preview_pics = container.xpath("//h2[text()='サンプル画像']/following-sibling::div/div/picture/source/img/@src")
preview_pics = [i.split('?')[0] for i in preview_pics]

Expand Down
Loading