anipy-cli 3.3.5__py3-none-any.whl → 3.4.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.

Potentially problematic release.


This version of anipy-cli might be problematic. Click here for more details.

anipy_cli/__init__.py CHANGED
@@ -1,2 +1,2 @@
1
1
  __appname__ = "anipy-cli"
2
- __version__ = "3.3.5"
2
+ __version__ = "3.4.1"
anipy_cli/config.py CHANGED
@@ -72,7 +72,7 @@ class Config:
72
72
 
73
73
  For an updated list of providers look here: https://sdaqo.github.io/anipy-cli/availabilty
74
74
 
75
- Supported providers (as of $version): gogoanime, anivibe
75
+ Supported providers (as of $version): animekai
76
76
 
77
77
  Examples:
78
78
  providers:
@@ -83,11 +83,11 @@ class Config:
83
83
  mal: ["provider2", "provider3"]
84
84
  """
85
85
  defaults = {
86
- "default": ["anivibe"],
87
- "download": ["anivibe"],
88
- "seasonal": ["anivibe"],
89
- "binge": ["anivibe"],
90
- "mal": ["anivibe"],
86
+ "default": ["animekai"],
87
+ "download": ["animekai"],
88
+ "seasonal": ["animekai"],
89
+ "binge": ["animekai"],
90
+ "mal": ["animekai"],
91
91
  }
92
92
 
93
93
  value = self._get_value("providers", defaults, dict)
anipy_cli/util.py CHANGED
@@ -233,71 +233,17 @@ def convert_letter_to_season(letter: str) -> Optional[str]:
233
233
 
234
234
 
235
235
  def migrate_locallist(file: Path) -> LocalListData:
236
- import json
237
- import re
238
-
239
236
  error(
240
- f"{file} is in an unsuported format, trying to migrate the old gogoanime entries..."
237
+ f"{file} is in an unsuported format..."
241
238
  )
242
239
 
243
- old_data = json.load(file.open("r"))
244
240
  new_list = LocalListData({})
245
- gogo = get_provider(
246
- "gogoanime", base_url_override=Config().provider_urls.get("gogoanime", None)
247
- )
248
- assert gogo is not None
249
-
250
- try:
251
- for k, v in old_data.items():
252
- name = k
253
- name = re.sub(r"\s?\((dub|japanese\sdub)\)", "", name, flags=re.IGNORECASE)
254
- identifier = Path(v.get("category_url", v["category-link"])).name
255
- is_dub = identifier.endswith("-dub") or identifier.endswith("-japanese-dub")
256
- identifier = identifier.removesuffix("-dub").removesuffix("-japanese-dub")
257
- episode = v["ep"]
258
- unique_id = f"gogoanime:{identifier}"
259
-
260
- langs = set()
261
-
262
- try:
263
- gogo.get_episodes(identifier, lang=LanguageTypeEnum.DUB)
264
- langs.add(LanguageTypeEnum.DUB)
265
- gogo.get_episodes(identifier, lang=LanguageTypeEnum.SUB)
266
- langs.add(LanguageTypeEnum.SUB)
267
- except LangTypeNotAvailableError:
268
- pass
269
-
270
- if not langs:
271
- error(f"> failed to migrate {name}, as it was not found in gogoanime")
272
-
273
- if is_dub and LanguageTypeEnum.DUB not in langs:
274
- error(
275
- f"> failed to migrate {name}, as it was configured as dub but"
276
- f"{gogo.BASE_URL}/category/{identifier}-dub or {gogo.BASE_URL}/category/{identifier}-japanese-dub was not found!"
277
- )
278
- continue
279
-
280
- new_entry = LocalListEntry(
281
- provider="gogoanime",
282
- name=name,
283
- identifier=identifier,
284
- episode=episode,
285
- language=LanguageTypeEnum.DUB if is_dub else LanguageTypeEnum.SUB,
286
- languages=langs,
287
- timestamp=int(time.time()),
288
- )
289
-
290
- new_list.data[unique_id] = new_entry
291
-
292
- new_list.write(file)
241
+ choice = inquirer.confirm( # type: ignore
242
+ message="Should it be delted?",
243
+ default=False,
244
+ ).execute()
245
+ if choice:
246
+ file.unlink()
293
247
  return new_list
294
- except KeyError:
295
- choice = inquirer.confirm( # type: ignore
296
- message=f"Can not migrate {file}, should it be delted?",
297
- default=False,
298
- ).execute()
299
- if choice:
300
- file.unlink()
301
- return new_list
302
- else:
303
- error("could not read {file}", fatal=True)
248
+ else:
249
+ error("could not read {file}", fatal=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: anipy-cli
3
- Version: 3.3.5
3
+ Version: 3.4.1
4
4
  Summary: Watch and Download anime from the comfort of your Terminal
5
5
  License: GPL-3.0
6
6
  Keywords: anime,cli
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
15
  Classifier: Programming Language :: Python :: 3.12
16
16
  Classifier: Programming Language :: Python :: 3.13
17
- Requires-Dist: anipy-api (>=3.3.5,<4.0.0)
17
+ Requires-Dist: anipy-api (>=3.4.1,<4.0.0)
18
18
  Requires-Dist: appdirs (>=1.4.4,<2.0.0)
19
19
  Requires-Dist: inquirerpy (>=0.3.4,<0.4.0)
20
20
  Requires-Dist: pypresence (>=4.3.0,<5.0.0)
@@ -1,4 +1,4 @@
1
- anipy_cli/__init__.py,sha256=m0ttavJdEyVIQZoPfenEijFOjxhlkglQuDMmZfrvPH4,48
1
+ anipy_cli/__init__.py,sha256=pci7IomO1zna7sU8W6fGV45w0PQQeOQKrehpEeSzL5s,48
2
2
  anipy_cli/arg_parser.py,sha256=Y_p5Sh7LR0yeqfhFVXkyAbZMjDR1-NIoY_TVuPwUnwk,6009
3
3
  anipy_cli/cli.py,sha256=Ah5BE-u_SjcuzU5dQ5cSHtUloVRApCWwTK5i49yQtH8,1922
4
4
  anipy_cli/clis/__init__.py,sha256=Y00uiPWiMvvRImxJMvfLA55BOkMUOrrx5vJUNvquNsY,411
@@ -10,7 +10,7 @@ anipy_cli/clis/history_cli.py,sha256=2ccv6BpQQpUhY4K-KM7lO9qxVLXBrmCY5lec6czipSE
10
10
  anipy_cli/clis/mal_cli.py,sha256=_tSLgDUOa6GOZNyCncSSzaVj088y5GAKkHVRSndLLxk,2258
11
11
  anipy_cli/clis/seasonal_cli.py,sha256=GV2TQNm9UotG1cxfYbrFFgg7Jmy8SFa7w_GlFtPdRVE,616
12
12
  anipy_cli/colors.py,sha256=voXC7z1Fs9tHg4zzNTNMIrt9k-EVgJ3_xEf5KiW2xgo,916
13
- anipy_cli/config.py,sha256=mbR7D1472Z6lLLw1_Vx_H0cH7fQVJJBPpIVXA6SMvy0,17751
13
+ anipy_cli/config.py,sha256=x9u5UHbPMewsA2q7XMHs6pvfFfTGzTxgROER2LEZESI,17746
14
14
  anipy_cli/discord.py,sha256=c6mdqnEdblzZBYs3cGP66oDeS4ySm59OfTRP-R-Duls,1160
15
15
  anipy_cli/download_component.py,sha256=3GCPoWIEjhN1rBtOt8NQg9lqBTI4OHV3gG2RZ3NMzcA,5248
16
16
  anipy_cli/mal_proxy.py,sha256=me2ESB442pYeNEpHY8mqrOEb477UA0uAg2LprKcp8sM,7098
@@ -20,8 +20,8 @@ anipy_cli/menus/mal_menu.py,sha256=jAVJh7K5d0BCnoT4qUIZ7CavrnrctXj-eg9k8E90ulE,2
20
20
  anipy_cli/menus/menu.py,sha256=ejTOGVG8fFJhTT7t23kA_uBbF5pkNcdvj4cGAIPvdt8,8101
21
21
  anipy_cli/menus/seasonal_menu.py,sha256=diABjK7LIDlXUoMydhDyLG9ba7J4UFmeD5AyGO3GPAI,10648
22
22
  anipy_cli/prompts.py,sha256=lQDrb8IlhsQhOpLG4sflamprTSn-PlCy41tGpXIowdo,10156
23
- anipy_cli/util.py,sha256=PxUPRxKCCTig1IHwmzH4m4Jofr4r-bg9lHyID3l5CIA,8944
24
- anipy_cli-3.3.5.dist-info/METADATA,sha256=4Msqc5Yph-s2AKdvmWCvfeKFQ1JgjmmRO69rHeiF5nY,3481
25
- anipy_cli-3.3.5.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
26
- anipy_cli-3.3.5.dist-info/entry_points.txt,sha256=86iXpcm_ECFndrt0JAI2mqYfXC2Ar7mGi0iOaxCrNP0,51
27
- anipy_cli-3.3.5.dist-info/RECORD,,
23
+ anipy_cli/util.py,sha256=8AzEeoSPXMGTdTrArhE0COhSuYP_MCvYIeGHv5X7haU,6841
24
+ anipy_cli-3.4.1.dist-info/METADATA,sha256=9tvikoVU5gVJR8SG6v0Ru3_248z7m1tQPFRC4gWJYCk,3481
25
+ anipy_cli-3.4.1.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
26
+ anipy_cli-3.4.1.dist-info/entry_points.txt,sha256=86iXpcm_ECFndrt0JAI2mqYfXC2Ar7mGi0iOaxCrNP0,51
27
+ anipy_cli-3.4.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.0.1
2
+ Generator: poetry-core 2.1.2
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any