KekikStream 0.0.9__py3-none-any.whl → 0.1.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.
- KekikStream/CLI/__init__.py +2 -1
- KekikStream/CLI/check_update.py +33 -0
- KekikStream/Core/PluginModels.py +38 -6
- KekikStream/Core/__init__.py +1 -1
- KekikStream/Managers/UIManager.py +3 -0
- KekikStream/Plugins/SineWix.py +43 -6
- KekikStream/__init__.py +20 -3
- {KekikStream-0.0.9.dist-info → KekikStream-0.1.1.dist-info}/METADATA +1 -1
- {KekikStream-0.0.9.dist-info → KekikStream-0.1.1.dist-info}/RECORD +13 -12
- {KekikStream-0.0.9.dist-info → KekikStream-0.1.1.dist-info}/LICENSE +0 -0
- {KekikStream-0.0.9.dist-info → KekikStream-0.1.1.dist-info}/WHEEL +0 -0
- {KekikStream-0.0.9.dist-info → KekikStream-0.1.1.dist-info}/entry_points.txt +0 -0
- {KekikStream-0.0.9.dist-info → KekikStream-0.1.1.dist-info}/top_level.txt +0 -0
KekikStream/CLI/__init__.py
CHANGED
@@ -1,3 +1,4 @@
|
|
1
1
|
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
2
2
|
|
3
|
-
from Kekik.cli
|
3
|
+
from Kekik.cli import konsol, cikis_yap, hata_salla, log_salla, hata_yakala, bellek_temizle, temizle
|
4
|
+
from .check_update import check_and_update_package
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
2
|
+
|
3
|
+
from . import konsol
|
4
|
+
from rich.panel import Panel
|
5
|
+
from pkg_resources import get_distribution
|
6
|
+
from requests import get
|
7
|
+
from subprocess import check_call
|
8
|
+
import sys
|
9
|
+
|
10
|
+
def check_and_update_package(package_name: str):
|
11
|
+
"""Paketi kontrol et ve gerekirse güncelle."""
|
12
|
+
try:
|
13
|
+
# Mevcut sürümü al
|
14
|
+
current_version = get_distribution(package_name).version
|
15
|
+
konsol.print(Panel(f"[cyan]Yüklü sürüm:[/cyan] [bold yellow]{current_version}[/bold yellow]"))
|
16
|
+
|
17
|
+
# PyPI'den en son sürümü al
|
18
|
+
response = get(f"https://pypi.org/pypi/{package_name}/json")
|
19
|
+
if response.status_code == 200:
|
20
|
+
latest_version = response.json()["info"]["version"]
|
21
|
+
konsol.print(Panel(f"[cyan]En son sürüm:[/cyan] [bold green]{latest_version}[/bold green]"))
|
22
|
+
|
23
|
+
# Eğer güncel değilse güncelle
|
24
|
+
if current_version != latest_version:
|
25
|
+
konsol.print(f"[bold red]{package_name} güncelleniyor...[/bold red]")
|
26
|
+
check_call([sys.executable, "-m", "pip", "install", "--upgrade", package_name, "--break-system-packages"])
|
27
|
+
konsol.print(f"[bold green]{package_name} güncellendi![/bold green]")
|
28
|
+
else:
|
29
|
+
konsol.print(f"[bold green]{package_name} zaten güncel.[/bold green]")
|
30
|
+
else:
|
31
|
+
konsol.print("[bold red]PyPI'ye erişilemiyor. Güncelleme kontrolü atlanıyor.[/bold red]")
|
32
|
+
except Exception as e:
|
33
|
+
konsol.print(f"[bold red]Güncelleme kontrolü sırasında hata oluştu: {e}[/bold red]")
|
KekikStream/Core/PluginModels.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
2
2
|
|
3
|
-
from pydantic import BaseModel,
|
4
|
-
from typing import Optional
|
3
|
+
from pydantic import BaseModel, field_validator
|
4
|
+
from typing import List, Optional
|
5
5
|
|
6
6
|
|
7
7
|
class SearchResult(BaseModel):
|
@@ -23,14 +23,46 @@ class MovieInfo(BaseModel):
|
|
23
23
|
actors : Optional[str] = None
|
24
24
|
duration : Optional[int] = None
|
25
25
|
|
26
|
-
@
|
26
|
+
@field_validator("tags", mode="before")
|
27
|
+
@classmethod
|
27
28
|
def convert_tags(cls, value):
|
28
29
|
return ", ".join(value) if isinstance(value, list) else value
|
29
30
|
|
30
|
-
@
|
31
|
+
@field_validator("actors", mode="before")
|
32
|
+
@classmethod
|
31
33
|
def convert_actors(cls, value):
|
32
34
|
return ", ".join(value) if isinstance(value, list) else value
|
33
35
|
|
34
|
-
@
|
36
|
+
@field_validator("rating", mode="before")
|
37
|
+
@classmethod
|
35
38
|
def ensure_string(cls, value):
|
36
|
-
return str(value) if value is not None else value
|
39
|
+
return str(value) if value is not None else value
|
40
|
+
|
41
|
+
|
42
|
+
class Episode(BaseModel):
|
43
|
+
season : Optional[int] = None
|
44
|
+
episode : Optional[int] = None
|
45
|
+
title : Optional[str] = None
|
46
|
+
url : Optional[str] = None
|
47
|
+
|
48
|
+
|
49
|
+
class SeriesInfo(BaseModel):
|
50
|
+
url : Optional[str] = None
|
51
|
+
poster : Optional[str] = None
|
52
|
+
title : Optional[str] = None
|
53
|
+
description : Optional[str] = None
|
54
|
+
tags : Optional[str] = None
|
55
|
+
rating : Optional[float] = None
|
56
|
+
year : Optional[str] = None
|
57
|
+
actors : Optional[str] = None
|
58
|
+
episodes : Optional[List[Episode]] = None
|
59
|
+
|
60
|
+
@field_validator("tags", mode="before")
|
61
|
+
@classmethod
|
62
|
+
def convert_tags(cls, value):
|
63
|
+
return ", ".join(value) if isinstance(value, list) else value
|
64
|
+
|
65
|
+
@field_validator("actors", mode="before")
|
66
|
+
@classmethod
|
67
|
+
def convert_actors(cls, value):
|
68
|
+
return ", ".join(value) if isinstance(value, list) else value
|
KekikStream/Core/__init__.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
from .PluginBase import PluginBase
|
4
4
|
from .PluginLoader import PluginLoader
|
5
|
-
from .PluginModels import SearchResult, MovieInfo
|
5
|
+
from .PluginModels import SearchResult, MovieInfo, Episode, SeriesInfo
|
6
6
|
from .ExtractorBase import ExtractorBase
|
7
7
|
from .ExtractorLoader import ExtractorLoader
|
8
8
|
from .ExtractorModels import ExtractResult, Subtitle
|
KekikStream/Plugins/SineWix.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
2
2
|
|
3
|
-
from KekikStream.Core import PluginBase, SearchResult, MovieInfo
|
3
|
+
from KekikStream.Core import PluginBase, SearchResult, MovieInfo, Episode, SeriesInfo
|
4
4
|
from KekikStream.Core.ExtractorModels import ExtractResult, Subtitle
|
5
5
|
|
6
6
|
class SineWix(PluginBase):
|
@@ -16,24 +16,24 @@ class SineWix(PluginBase):
|
|
16
16
|
url = f"?type={veri.get('type')}&id={veri.get('id')}",
|
17
17
|
poster = self.fix_url(veri.get("poster_path")),
|
18
18
|
)
|
19
|
-
for veri in istek.json().get("search")
|
19
|
+
for veri in istek.json().get("search")
|
20
20
|
]
|
21
21
|
|
22
22
|
async def load_item(self, url: str) -> MovieInfo:
|
23
23
|
item_type = url.split("?type=")[-1].split("&id=")[0]
|
24
24
|
item_id = url.split("&id=")[-1]
|
25
25
|
|
26
|
+
istek = await self.oturum.get(f"{self.main_url}/sinewix/{item_type}/{item_id}")
|
27
|
+
veri = istek.json()
|
28
|
+
|
26
29
|
match item_type:
|
27
30
|
case "movie":
|
28
|
-
istek = await self.oturum.get(f"{self.main_url}/sinewix/movie/{item_id}")
|
29
|
-
veri = istek.json()
|
30
|
-
|
31
31
|
org_title = veri.get("title")
|
32
32
|
alt_title = veri.get("original_name") or ""
|
33
33
|
title = f"{org_title} - {alt_title}" if (alt_title and org_title != alt_title) else org_title
|
34
34
|
|
35
35
|
return MovieInfo(
|
36
|
-
url = self.fix_url(f"{self.main_url}/sinewix/
|
36
|
+
url = self.fix_url(f"{self.main_url}/sinewix/{item_type}/{item_id}"),
|
37
37
|
poster = self.fix_url(veri.get("poster_path")),
|
38
38
|
title = title,
|
39
39
|
description = veri.get("overview"),
|
@@ -42,8 +42,45 @@ class SineWix(PluginBase):
|
|
42
42
|
year = veri.get("release_date"),
|
43
43
|
actors = [actor.get("name") for actor in veri.get("casterslist")],
|
44
44
|
)
|
45
|
+
case _:
|
46
|
+
org_title = veri.get("name")
|
47
|
+
alt_title = veri.get("original_name") or ""
|
48
|
+
title = f"{org_title} - {alt_title}" if (alt_title and org_title != alt_title) else org_title
|
49
|
+
|
50
|
+
episodes = []
|
51
|
+
for season in veri.get("seasons"):
|
52
|
+
for episode in season.get("episodes"):
|
53
|
+
ep_model = Episode(
|
54
|
+
season = season.get("season_number"),
|
55
|
+
episode = episode.get("episode_number"),
|
56
|
+
title = episode.get("name"),
|
57
|
+
url = self.fix_url(episode.get("videos")[0].get("link")),
|
58
|
+
)
|
59
|
+
|
60
|
+
episodes.append(ep_model)
|
61
|
+
|
62
|
+
self._data[ep_model.url] = {
|
63
|
+
"name" : f"{ep_model.season}. Sezon {ep_model.episode}. Bölüm - {ep_model.title}",
|
64
|
+
"referer" : self.main_url,
|
65
|
+
"subtitles" : []
|
66
|
+
}
|
67
|
+
|
68
|
+
return SeriesInfo(
|
69
|
+
url = self.fix_url(f"{self.main_url}/sinewix/{item_type}/{item_id}"),
|
70
|
+
poster = self.fix_url(veri.get("poster_path")),
|
71
|
+
title = title,
|
72
|
+
description = veri.get("overview"),
|
73
|
+
tags = [genre.get("name") for genre in veri.get("genres")],
|
74
|
+
rating = veri.get("vote_average"),
|
75
|
+
year = veri.get("first_air_date"),
|
76
|
+
actors = [actor.get("name") for actor in veri.get("casterslist")],
|
77
|
+
episodes = episodes,
|
78
|
+
)
|
45
79
|
|
46
80
|
async def load_links(self, url: str) -> list[str]:
|
81
|
+
if not url.startswith(self.main_url):
|
82
|
+
return [url]
|
83
|
+
|
47
84
|
istek = await self.oturum.get(url)
|
48
85
|
veri = istek.json()
|
49
86
|
|
KekikStream/__init__.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
from .CLI import konsol, cikis_yap, hata_yakala
|
4
4
|
from .Managers import PluginManager, ExtractorManager, UIManager, MediaManager
|
5
|
-
from .Core import PluginBase, ExtractorBase
|
5
|
+
from .Core import PluginBase, ExtractorBase, SeriesInfo
|
6
6
|
from asyncio import run
|
7
7
|
|
8
8
|
class KekikStream:
|
@@ -68,8 +68,20 @@ class KekikStream:
|
|
68
68
|
|
69
69
|
self.ui_manager.display_media_info(self.current_plugin.name, media_info)
|
70
70
|
|
71
|
-
|
72
|
-
|
71
|
+
if isinstance(media_info, SeriesInfo):
|
72
|
+
selected_episode = await self.ui_manager.select_from_list(
|
73
|
+
message="Bir bölüm seçin:",
|
74
|
+
choices=[
|
75
|
+
{"name": f"{episode.season}. Sezon {episode.episode}. Bölüm - {episode.title}", "value": episode.url}
|
76
|
+
for episode in media_info.episodes
|
77
|
+
]
|
78
|
+
)
|
79
|
+
if selected_episode:
|
80
|
+
links = await self.current_plugin.load_links(selected_episode)
|
81
|
+
await self.show_options(links)
|
82
|
+
else:
|
83
|
+
links = await self.current_plugin.load_links(media_info.url)
|
84
|
+
await self.show_options(links)
|
73
85
|
|
74
86
|
async def show_options(self, links):
|
75
87
|
mapping = self.extractor_manager.map_links_to_extractors(links)
|
@@ -132,8 +144,13 @@ class KekikStream:
|
|
132
144
|
self.media_manager.play_media(extract_data)
|
133
145
|
|
134
146
|
|
147
|
+
from .CLI import check_and_update_package
|
148
|
+
|
135
149
|
def basla():
|
136
150
|
try:
|
151
|
+
konsol.print("[bold cyan]Güncelleme kontrol ediliyor...[/bold cyan]")
|
152
|
+
check_and_update_package("KekikStream")
|
153
|
+
|
137
154
|
app = KekikStream()
|
138
155
|
run(app.run())
|
139
156
|
cikis_yap(False)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: KekikStream
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.1.1
|
4
4
|
Summary: terminal üzerinden medya içeriği aramanızı ve VLC/MPV gibi popüler medya oynatıcılar aracılığıyla doğrudan izlemenizi sağlayan modüler ve genişletilebilir bir bıdı bıdı
|
5
5
|
Home-page: https://github.com/keyiflerolsun/KekikStream
|
6
6
|
Author: keyiflerolsun
|
@@ -1,30 +1,31 @@
|
|
1
|
-
KekikStream/__init__.py,sha256=
|
1
|
+
KekikStream/__init__.py,sha256=kZae3M7ad7nX1r-hek5dfek3DImgrTZSbIb1rtCe-rI,6230
|
2
2
|
KekikStream/__main__.py,sha256=4U-NO1f0Mts5Mf_QnWhWqRbTsRBy2y2VPlpHyaqG9_I,137
|
3
3
|
KekikStream/requirements.txt,sha256=Kh3E0NzIkAmhVODtIwRVffVOHLiElO6Ua9kIgjbocPE,57
|
4
|
-
KekikStream/CLI/__init__.py,sha256=
|
4
|
+
KekikStream/CLI/__init__.py,sha256=9YlF135BVff85y492hX4sq2WY2CNqa4BuVzF9hIIaKE,233
|
5
|
+
KekikStream/CLI/check_update.py,sha256=rOa16bO9sGN-p78yaTRaccFoNfhHWEfDgGZNavpcwNI,1642
|
5
6
|
KekikStream/Core/ExtractorBase.py,sha256=SPXKZPfpzvgkJeMds-USzgpm8-qb0vgZjjLDs58NfGU,1069
|
6
7
|
KekikStream/Core/ExtractorLoader.py,sha256=JovJJr6Clk3xpbRLlh7v_XOl3FGwVXCjTZivec1FktI,2533
|
7
8
|
KekikStream/Core/ExtractorModels.py,sha256=vJeh4qd05K7nbqdCCGU29UkGQpce6jXfsCm7LuDL1G8,454
|
8
9
|
KekikStream/Core/MediaHandler.py,sha256=Q_9LMc4Wnmv8PhMfoo2IgxpHLeikUgrqp_B_Rfs217U,3005
|
9
10
|
KekikStream/Core/PluginBase.py,sha256=CHq2ANsedSY1BQhGZgP4CumERRnOjiyopW3FMrE4J70,1474
|
10
11
|
KekikStream/Core/PluginLoader.py,sha256=POayKsWOjAuReMbp6_aWbG5lIioQzpQT3u1LQXMqUwY,2574
|
11
|
-
KekikStream/Core/PluginModels.py,sha256
|
12
|
-
KekikStream/Core/__init__.py,sha256=
|
12
|
+
KekikStream/Core/PluginModels.py,sha256=-V4Be9ebnUQsQtGzLxg0kGK13RJTmpB7bvAUwsE-ir0,2208
|
13
|
+
KekikStream/Core/__init__.py,sha256=HZpXs3MKy4joO0sDpIGcZ2DrUKwK49IKG-GQgKbO2jk,416
|
13
14
|
KekikStream/Extractors/CloseLoad.py,sha256=YmDB3YvuDaCUbQ0T_tmhnkEsC5mSdEN6GNoAR662fl8,990
|
14
15
|
KekikStream/Extractors/MailRu.py,sha256=lB3Xy912EaSEUw7Im65L5TwtIeM7OLFV1_9lan39g40,1308
|
15
16
|
KekikStream/Extractors/VidMoxy.py,sha256=UnVrCEI4XNiONE2aLV9dGUhRqQ9ELJTnYVXyG81N11A,1800
|
16
17
|
KekikStream/Managers/ExtractorManager.py,sha256=4p5VaERx3qIIzvti9gl_khkCWYcVnzUNORmMP-OrQu0,925
|
17
18
|
KekikStream/Managers/MediaManager.py,sha256=F7mkSvAttAaMHRvnDcxnV2K1D_sK644BCSrEaAmMl_U,522
|
18
19
|
KekikStream/Managers/PluginManager.py,sha256=5O19YNCt4P7a6yVzlDvmxfZLA9SX9LxDs5bqqZ4i1rA,566
|
19
|
-
KekikStream/Managers/UIManager.py,sha256=
|
20
|
+
KekikStream/Managers/UIManager.py,sha256=7C_y3DZhMYxmfE88be5v4DlEk_H8CmBzn4dRHwr5klY,1162
|
20
21
|
KekikStream/Managers/__init__.py,sha256=3085I_9Sa2L_Vq6Z-QvYUYn1BapkN4sQqBo8ITZoD_4,251
|
21
22
|
KekikStream/Plugins/FilmMakinesi.py,sha256=g4LRDP5Atn97PqbgnEdm0-wjVdXaJIVk1Ru0F8B66Ws,2902
|
22
23
|
KekikStream/Plugins/FullHDFilmizlesene.py,sha256=HJzHDXHhhMpvXxiD2SjpoZEYs7dmnPymE8EXCSvLKVo,3106
|
23
|
-
KekikStream/Plugins/SineWix.py,sha256=
|
24
|
+
KekikStream/Plugins/SineWix.py,sha256=RJxggTrZxBimQHI4ehtJipVeIBpfHy85NW-ixE2iF2k,4762
|
24
25
|
KekikStream/Plugins/UgurFilm.py,sha256=U7ryNWpjSZJWuYlMGX1Be9uuyiM3SfuI9VJcEiXedNs,2960
|
25
|
-
KekikStream-0.
|
26
|
-
KekikStream-0.
|
27
|
-
KekikStream-0.
|
28
|
-
KekikStream-0.
|
29
|
-
KekikStream-0.
|
30
|
-
KekikStream-0.
|
26
|
+
KekikStream-0.1.1.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
27
|
+
KekikStream-0.1.1.dist-info/METADATA,sha256=797zzUyhvsgwruOjsMM3lWDV-gAwVrMIn2bdl5c9Dek,3960
|
28
|
+
KekikStream-0.1.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
29
|
+
KekikStream-0.1.1.dist-info/entry_points.txt,sha256=dFwdiTx8djyehI0Gsz-rZwjAfZzUzoBSrmzRu9ubjJc,50
|
30
|
+
KekikStream-0.1.1.dist-info/top_level.txt,sha256=DNmGJDXl27Drdfobrak8KYLmocW_uznVYFJOzcjUgmY,12
|
31
|
+
KekikStream-0.1.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|