mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 23:42:37 -07:00
Update plexapi==4.17.0
This commit is contained in:
parent
3cb71f94a3
commit
f6bffe1850
32 changed files with 1224 additions and 966 deletions
|
@ -1,11 +1,12 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import annotations
|
||||
|
||||
from codecs import BOM_UTF8, BOM_UTF16_BE, BOM_UTF16_LE, BOM_UTF32_BE, BOM_UTF32_LE
|
||||
from encodings.aliases import aliases
|
||||
from re import IGNORECASE, compile as re_compile
|
||||
from typing import Dict, List, Set, Union
|
||||
from re import IGNORECASE
|
||||
from re import compile as re_compile
|
||||
|
||||
# Contain for each eligible encoding a list of/item bytes SIG/BOM
|
||||
ENCODING_MARKS: Dict[str, Union[bytes, List[bytes]]] = {
|
||||
ENCODING_MARKS: dict[str, bytes | list[bytes]] = {
|
||||
"utf_8": BOM_UTF8,
|
||||
"utf_7": [
|
||||
b"\x2b\x2f\x76\x38",
|
||||
|
@ -25,7 +26,7 @@ TOO_BIG_SEQUENCE: int = int(10e6)
|
|||
UTF8_MAXIMAL_ALLOCATION: int = 1_112_064
|
||||
|
||||
# Up-to-date Unicode ucd/15.0.0
|
||||
UNICODE_RANGES_COMBINED: Dict[str, range] = {
|
||||
UNICODE_RANGES_COMBINED: dict[str, range] = {
|
||||
"Control character": range(32),
|
||||
"Basic Latin": range(32, 128),
|
||||
"Latin-1 Supplement": range(128, 256),
|
||||
|
@ -357,7 +358,7 @@ UNICODE_RANGES_COMBINED: Dict[str, range] = {
|
|||
}
|
||||
|
||||
|
||||
UNICODE_SECONDARY_RANGE_KEYWORD: List[str] = [
|
||||
UNICODE_SECONDARY_RANGE_KEYWORD: list[str] = [
|
||||
"Supplement",
|
||||
"Extended",
|
||||
"Extensions",
|
||||
|
@ -392,7 +393,7 @@ IANA_NO_ALIASES = [
|
|||
"koi8_u",
|
||||
]
|
||||
|
||||
IANA_SUPPORTED: List[str] = sorted(
|
||||
IANA_SUPPORTED: list[str] = sorted(
|
||||
filter(
|
||||
lambda x: x.endswith("_codec") is False
|
||||
and x not in {"rot_13", "tactis", "mbcs"},
|
||||
|
@ -403,7 +404,7 @@ IANA_SUPPORTED: List[str] = sorted(
|
|||
IANA_SUPPORTED_COUNT: int = len(IANA_SUPPORTED)
|
||||
|
||||
# pre-computed code page that are similar using the function cp_similarity.
|
||||
IANA_SUPPORTED_SIMILAR: Dict[str, List[str]] = {
|
||||
IANA_SUPPORTED_SIMILAR: dict[str, list[str]] = {
|
||||
"cp037": ["cp1026", "cp1140", "cp273", "cp500"],
|
||||
"cp1026": ["cp037", "cp1140", "cp273", "cp500"],
|
||||
"cp1125": ["cp866"],
|
||||
|
@ -492,7 +493,7 @@ IANA_SUPPORTED_SIMILAR: Dict[str, List[str]] = {
|
|||
}
|
||||
|
||||
|
||||
CHARDET_CORRESPONDENCE: Dict[str, str] = {
|
||||
CHARDET_CORRESPONDENCE: dict[str, str] = {
|
||||
"iso2022_kr": "ISO-2022-KR",
|
||||
"iso2022_jp": "ISO-2022-JP",
|
||||
"euc_kr": "EUC-KR",
|
||||
|
@ -528,7 +529,7 @@ CHARDET_CORRESPONDENCE: Dict[str, str] = {
|
|||
}
|
||||
|
||||
|
||||
COMMON_SAFE_ASCII_CHARACTERS: Set[str] = {
|
||||
COMMON_SAFE_ASCII_CHARACTERS: set[str] = {
|
||||
"<",
|
||||
">",
|
||||
"=",
|
||||
|
@ -548,9 +549,26 @@ COMMON_SAFE_ASCII_CHARACTERS: Set[str] = {
|
|||
")",
|
||||
}
|
||||
|
||||
# Sample character sets — replace with full lists if needed
|
||||
COMMON_CHINESE_CHARACTERS = "的一是在不了有和人这中大为上个国我以要他时来用们生到作地于出就分对成会可主发年动同工也能下过子说产种面而方后多定行学法所民得经十三之进着等部度家电力里如水化高自二理起小物现实加量都两体制机当使点从业本去把性好应开它合还因由其些然前外天政四日那社义事平形相全表间样与关各重新线内数正心反你明看原又么利比或但质气第向道命此变条只没结解问意建月公无系军很情者最立代想已通并提直题党程展五果料象员革位入常文总次品式活设及管特件长求老头基资边流路级少图山统接知较将组见计别她手角期根论运农指几九区强放决西被干做必战先回则任取据处队南给色光门即保治北造百规热领七海口东导器压志世金增争济阶油思术极交受联什认六共权收证改清己美再采转更单风切打白教速花带安场身车例真务具万每目至达走积示议声报斗完类八离华名确才科张信马节话米整空元况今集温传土许步群广石记需段研界拉林律叫且究观越织装影算低持音众书布复容儿须际商非验连断深难近矿千周委素技备半办青省列习响约支般史感劳便团往酸历市克何除消构府太准精值号率族维划选标写存候毛亲快效斯院查江型眼王按格养易置派层片始却专状育厂京识适属圆包火住调满县局照参红细引听该铁价严龙飞"
|
||||
|
||||
KO_NAMES: Set[str] = {"johab", "cp949", "euc_kr"}
|
||||
ZH_NAMES: Set[str] = {"big5", "cp950", "big5hkscs", "hz"}
|
||||
COMMON_JAPANESE_CHARACTERS = "日一国年大十二本中長出三時行見月分後前生五間上東四今金九入学高円子外八六下来気小七山話女北午百書先名川千水半男西電校語土木聞食車何南万毎白天母火右読友左休父雨"
|
||||
|
||||
COMMON_KOREAN_CHARACTERS = "一二三四五六七八九十百千萬上下左右中人女子大小山川日月火水木金土父母天地國名年時文校學生"
|
||||
|
||||
# Combine all into a set
|
||||
COMMON_CJK_CHARACTERS = set(
|
||||
"".join(
|
||||
[
|
||||
COMMON_CHINESE_CHARACTERS,
|
||||
COMMON_JAPANESE_CHARACTERS,
|
||||
COMMON_KOREAN_CHARACTERS,
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
KO_NAMES: set[str] = {"johab", "cp949", "euc_kr"}
|
||||
ZH_NAMES: set[str] = {"big5", "cp950", "big5hkscs", "hz"}
|
||||
|
||||
# Logging LEVEL below DEBUG
|
||||
TRACE: int = 5
|
||||
|
@ -558,7 +576,7 @@ TRACE: int = 5
|
|||
|
||||
# Language label that contain the em dash "—"
|
||||
# character are to be considered alternative seq to origin
|
||||
FREQUENCIES: Dict[str, List[str]] = {
|
||||
FREQUENCIES: dict[str, list[str]] = {
|
||||
"English": [
|
||||
"e",
|
||||
"a",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue