easyrip 4.8.1__tar.gz → 4.8.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. {easyrip-4.8.1 → easyrip-4.8.2}/PKG-INFO +1 -1
  2. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/easyrip_mlang/lang_zh_Hans_CN.py +1 -0
  3. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/global_val.py +1 -1
  4. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/ripper/sub_and_font/subset.py +16 -7
  5. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip.egg-info/PKG-INFO +1 -1
  6. {easyrip-4.8.1 → easyrip-4.8.2}/LICENSE +0 -0
  7. {easyrip-4.8.1 → easyrip-4.8.2}/README.md +0 -0
  8. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/__init__.py +0 -0
  9. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/__main__.py +0 -0
  10. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/easyrip_command.py +0 -0
  11. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/easyrip_config/config.py +0 -0
  12. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/easyrip_config/config_key.py +0 -0
  13. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/easyrip_log.py +0 -0
  14. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/easyrip_main.py +0 -0
  15. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/easyrip_mlang/__init__.py +0 -0
  16. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/easyrip_mlang/global_lang_val.py +0 -0
  17. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/easyrip_mlang/lang_en.py +0 -0
  18. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/easyrip_mlang/translator.py +0 -0
  19. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/easyrip_prompt.py +0 -0
  20. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/easyrip_web/__init__.py +0 -0
  21. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/easyrip_web/http_server.py +0 -0
  22. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/easyrip_web/third_party_api.py +0 -0
  23. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/ripper/media_info.py +0 -0
  24. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/ripper/param.py +0 -0
  25. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/ripper/ripper.py +0 -0
  26. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/ripper/sub_and_font/__init__.py +0 -0
  27. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/ripper/sub_and_font/ass.py +0 -0
  28. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/ripper/sub_and_font/font.py +0 -0
  29. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip/utils.py +0 -0
  30. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip.egg-info/SOURCES.txt +0 -0
  31. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip.egg-info/dependency_links.txt +0 -0
  32. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip.egg-info/entry_points.txt +0 -0
  33. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip.egg-info/requires.txt +0 -0
  34. {easyrip-4.8.1 → easyrip-4.8.2}/easyrip.egg-info/top_level.txt +0 -0
  35. {easyrip-4.8.1 → easyrip-4.8.2}/pyproject.toml +0 -0
  36. {easyrip-4.8.1 → easyrip-4.8.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: easyrip
3
- Version: 4.8.1
3
+ Version: 4.8.2
4
4
  Author: op200
5
5
  License-Expression: AGPL-3.0-or-later
6
6
  Project-URL: Homepage, https://github.com/op200/EasyRip
@@ -329,6 +329,7 @@ LANG_MAP: dict[str, str] = {
329
329
  "Subset faild, cancel mux": "子集化失败, 取消混流",
330
330
  "FFmpeg report: {}": "FFmpeg 报告: {}",
331
331
  "{} not found. Skip it": "没找到 {}。默认跳过",
332
+ "{} not found. Skip it. Perhaps you want the {}": "没找到 {}。默认跳过。或许你想要的是 {}",
332
333
  'The font "{}" does not contain these characters: {}': '字体 "{}" 不包含字符: {}',
333
334
  "The style '{}' not in Styles. Defaulting to the style '{}'": "样式 '{}' 不在 Styles 中。默认使用样式 '{}'",
334
335
  "The style '{}' and the style 'Default' not in Styles. Defaulting to no font": "样式 '{}' 和样式 'Default' 都不在 Styles 中。默认不使用字体",
@@ -3,7 +3,7 @@ import sys
3
3
  from pathlib import Path
4
4
 
5
5
  PROJECT_NAME = "Easy Rip"
6
- PROJECT_VERSION = "4.8.1"
6
+ PROJECT_VERSION = "4.8.2"
7
7
  PROJECT_TITLE = f"{PROJECT_NAME} v{PROJECT_VERSION}"
8
8
  PROJECT_URL = "https://github.com/op200/EasyRip"
9
9
  PROJECT_RELEASE_API = "https://api.github.com/repos/op200/EasyRip/releases/latest"
@@ -287,10 +287,11 @@ def subset(
287
287
  fonts.extend(load_windows_fonts(strict=strict))
288
288
 
289
289
  font_sign__font: dict[tuple[str, Font_type], Font] = {}
290
+ family_lower__family = {} # 存储小写 family 用于判断 ASS 的大小写不敏感语法
290
291
  for _font in fonts:
291
292
  for family in _font.familys:
292
- if family not in font_sign__font:
293
- font_sign__font[(family, _font.font_type)] = _font
293
+ family_lower__family[family.lower()] = family
294
+ font_sign__font[(family, _font.font_type)] = _font
294
295
 
295
296
  # 子集化映射
296
297
  font__subset_str: dict[Font, dict[str, str]] = {}
@@ -335,11 +336,19 @@ def subset(
335
336
 
336
337
  # 模糊字重也找不到字体
337
338
  if _font is None:
338
- log.error(
339
- "{} not found. Skip it",
340
- f"( {key[0]} / {key[1].name} )",
341
- deep=strict,
342
- )
339
+ if (_f_low := key[0].lower()) in family_lower__family:
340
+ log.error(
341
+ "{} not found. Skip it. Perhaps you want the {}",
342
+ f"( {key[0]} / {key[1].name} )",
343
+ f"'{family_lower__family[_f_low]}'",
344
+ deep=strict,
345
+ )
346
+ else:
347
+ log.error(
348
+ "{} not found. Skip it",
349
+ f"( {key[0]} / {key[1].name} )",
350
+ deep=strict,
351
+ )
343
352
  return_res = False
344
353
  continue
345
354
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: easyrip
3
- Version: 4.8.1
3
+ Version: 4.8.2
4
4
  Author: op200
5
5
  License-Expression: AGPL-3.0-or-later
6
6
  Project-URL: Homepage, https://github.com/op200/EasyRip
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes