d4rktg 1.1.9__py3-none-any.whl → 1.2.1__py3-none-any.whl
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.
d4rk/Utils/_movie_parser.py
CHANGED
@@ -2,12 +2,13 @@ import re
|
|
2
2
|
import PTN
|
3
3
|
import unicodedata
|
4
4
|
|
5
|
-
from typing import List, Optional
|
5
|
+
from typing import List, Optional , Union
|
6
6
|
from dataclasses import dataclass, field
|
7
7
|
|
8
8
|
@dataclass
|
9
9
|
class Movie:
|
10
10
|
title: str
|
11
|
+
context_type: str
|
11
12
|
normalized_title: str
|
12
13
|
year: Optional[int]
|
13
14
|
resolution: Optional[str]
|
@@ -20,6 +21,7 @@ class Movie:
|
|
20
21
|
@dataclass
|
21
22
|
class TV:
|
22
23
|
title: str
|
24
|
+
context_type: str
|
23
25
|
normalized_title: str
|
24
26
|
season: Optional[int]
|
25
27
|
episode: Optional[int]
|
@@ -189,6 +191,7 @@ class MovieParser:
|
|
189
191
|
if self.movie:
|
190
192
|
return Movie(
|
191
193
|
title=self._fix_roman_numerals(title.title()),
|
194
|
+
context_type="movie",
|
192
195
|
normalized_title=re.sub(r'[^a-z0-9&\+]+', ' ', title.lower()).strip(),
|
193
196
|
year=year,
|
194
197
|
resolution=resolution,
|
@@ -201,6 +204,7 @@ class MovieParser:
|
|
201
204
|
else:
|
202
205
|
return TV(
|
203
206
|
title=self._fix_roman_numerals(title.title()),
|
207
|
+
context_type="tv",
|
204
208
|
normalized_title=re.sub(r'[^a-z0-9&\+]+', ' ', title.lower()).strip(),
|
205
209
|
season=self.data.get('season'),
|
206
210
|
episode=self.data.get('episode'),
|
@@ -13,11 +13,11 @@ d4rk/Utils/_decorators.py,sha256=8XC-oJN0flsLakNMUjRDTeUNBg3Kvan0GpCgyCre_NI,461
|
|
13
13
|
d4rk/Utils/_filters.py,sha256=r_Dait6tcAg4drqDgBsIYKg7BA4Pd8S1yEbdGHj3A0g,2781
|
14
14
|
d4rk/Utils/_fonts.py,sha256=4zpjAmhAhRGzkSaD1b80p_bpwF72mOe7ykcpJFc688w,3690
|
15
15
|
d4rk/Utils/_ip.py,sha256=KJJW2QSngshIVWCO5YPXF1wj4IPQzVN5oFofpfzlU5w,559
|
16
|
-
d4rk/Utils/_movie_parser.py,sha256=
|
16
|
+
d4rk/Utils/_movie_parser.py,sha256=1bIx8Q1PX7yixj1zT1TeBrYdbUnQap3ptbdIuQtmQh0,7379
|
17
17
|
d4rk/Utils/_ractions.py,sha256=wOVPyoFnbDuMgoP6NF_gLO1DYcfhERC0trdAK1jWSE8,2170
|
18
18
|
d4rk/Utils/_terminal.py,sha256=Anu4OcffY3v6LMOrCskP1cHrJIliomo1Hjownbhh2sQ,125
|
19
19
|
d4rk/Utils/_utils.py,sha256=z1fhMFMDKEBRYr6l6TbdqK3pEuPEuQ-CtKUiO7R-R_A,332
|
20
|
-
d4rktg-1.1.
|
21
|
-
d4rktg-1.1.
|
22
|
-
d4rktg-1.1.
|
23
|
-
d4rktg-1.1.
|
20
|
+
d4rktg-1.2.1.dist-info/METADATA,sha256=QSLdYcIZuc4BedVIIOF2ZIRdU7QimfiTv0VqOS1Y0Lw,652
|
21
|
+
d4rktg-1.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
22
|
+
d4rktg-1.2.1.dist-info/top_level.txt,sha256=qs1qTnKWImmGi7E0FoJS0OAEOHoVZA9vHRS3Pm6ncAo,5
|
23
|
+
d4rktg-1.2.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|