KekikStream 0.0.7__tar.gz → 0.0.8__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. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Core/PluginBase.py +3 -0
  2. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Core/PluginModels.py +5 -1
  3. kekikstream-0.0.8/KekikStream/Plugins/SineWix.py +68 -0
  4. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/__init__.py +20 -2
  5. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream.egg-info/PKG-INFO +5 -1
  6. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream.egg-info/SOURCES.txt +1 -0
  7. {kekikstream-0.0.7 → kekikstream-0.0.8}/PKG-INFO +5 -1
  8. {kekikstream-0.0.7 → kekikstream-0.0.8}/README.md +4 -0
  9. {kekikstream-0.0.7 → kekikstream-0.0.8}/setup.py +1 -1
  10. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/CLI/__init__.py +0 -0
  11. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Core/ExtractorBase.py +0 -0
  12. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Core/ExtractorLoader.py +0 -0
  13. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Core/ExtractorModels.py +0 -0
  14. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Core/MediaHandler.py +0 -0
  15. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Core/PluginLoader.py +0 -0
  16. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Core/__init__.py +0 -0
  17. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Extractors/CloseLoad.py +0 -0
  18. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Extractors/MailRu.py +0 -0
  19. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Extractors/VidMoxy.py +0 -0
  20. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Managers/ExtractorManager.py +0 -0
  21. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Managers/MediaManager.py +0 -0
  22. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Managers/PluginManager.py +0 -0
  23. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Managers/UIManager.py +0 -0
  24. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Managers/__init__.py +0 -0
  25. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Plugins/FilmMakinesi.py +0 -0
  26. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Plugins/FullHDFilmizlesene.py +0 -0
  27. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/Plugins/UgurFilm.py +0 -0
  28. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/__main__.py +0 -0
  29. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream/requirements.txt +0 -0
  30. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream.egg-info/dependency_links.txt +0 -0
  31. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream.egg-info/entry_points.txt +0 -0
  32. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream.egg-info/requires.txt +0 -0
  33. {kekikstream-0.0.7 → kekikstream-0.0.8}/KekikStream.egg-info/top_level.txt +0 -0
  34. {kekikstream-0.0.7 → kekikstream-0.0.8}/LICENSE +0 -0
  35. {kekikstream-0.0.7 → kekikstream-0.0.8}/MANIFEST.in +0 -0
  36. {kekikstream-0.0.7 → kekikstream-0.0.8}/setup.cfg +0 -0
@@ -3,10 +3,12 @@
3
3
  from abc import ABC, abstractmethod
4
4
  from httpx import AsyncClient, Timeout
5
5
  from .PluginModels import SearchResult, MovieInfo
6
+ from .MediaHandler import MediaHandler
6
7
 
7
8
  class PluginBase(ABC):
8
9
  name = "Plugin"
9
10
  main_url = "https://example.com"
11
+ _data = {}
10
12
 
11
13
  def __init__(self):
12
14
  self.oturum = AsyncClient(
@@ -16,6 +18,7 @@ class PluginBase(ABC):
16
18
  },
17
19
  timeout = Timeout(10.0),
18
20
  )
21
+ self.media_handler = MediaHandler()
19
22
 
20
23
  @abstractmethod
21
24
  async def search(self, query: str) -> list[SearchResult]:
@@ -29,4 +29,8 @@ class MovieInfo(BaseModel):
29
29
 
30
30
  @validator("actors", pre=True)
31
31
  def convert_actors(cls, value):
32
- return ", ".join(value) if isinstance(value, list) else value
32
+ return ", ".join(value) if isinstance(value, list) else value
33
+
34
+ @validator("rating", pre=True)
35
+ def ensure_string(cls, value):
36
+ return str(value) if value is not None else value
@@ -0,0 +1,68 @@
1
+ # Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
2
+
3
+ from KekikStream.Core import PluginBase, SearchResult, MovieInfo
4
+ from KekikStream.Core.ExtractorModels import ExtractResult, Subtitle
5
+
6
+ class SineWix(PluginBase):
7
+ name = "SineWix"
8
+ main_url = "https://ythls.kekikakademi.org"
9
+
10
+ async def search(self, query: str) -> list[SearchResult]:
11
+ istek = await self.oturum.get(f"{self.main_url}/sinewix/search/{query}")
12
+
13
+ return [
14
+ SearchResult(
15
+ title = veri.get("name"),
16
+ url = f"?type={veri.get('type')}&id={veri.get('id')}",
17
+ poster = self.fix_url(veri.get("poster_path")),
18
+ )
19
+ for veri in istek.json().get("search") if veri.get("type") == "movie"
20
+ ]
21
+
22
+ async def load_item(self, url: str) -> MovieInfo:
23
+ item_type = url.split("?type=")[-1].split("&id=")[0]
24
+ item_id = url.split("&id=")[-1]
25
+
26
+ match item_type:
27
+ case "movie":
28
+ istek = await self.oturum.get(f"{self.main_url}/sinewix/movie/{item_id}")
29
+ veri = istek.json()
30
+
31
+ org_title = veri.get("title")
32
+ alt_title = veri.get("original_name") or ""
33
+ title = f"{org_title} - {alt_title}" if (alt_title and org_title != alt_title) else org_title
34
+
35
+ return MovieInfo(
36
+ url = self.fix_url(f"{self.main_url}/sinewix/movie/{item_id}"),
37
+ poster = self.fix_url(veri.get("poster_path")),
38
+ title = title,
39
+ description = veri.get("overview"),
40
+ tags = [genre.get("name") for genre in veri.get("genres")],
41
+ rating = veri.get("vote_average"),
42
+ year = veri.get("release_date"),
43
+ actors = [actor.get("name") for actor in veri.get("casterslist")],
44
+ )
45
+
46
+ async def load_links(self, url: str) -> list[str]:
47
+ istek = await self.oturum.get(url)
48
+ veri = istek.json()
49
+
50
+ org_title = veri.get("title")
51
+ alt_title = veri.get("original_name") or ""
52
+ title = f"{org_title} - {alt_title}" if (alt_title and org_title != alt_title) else org_title
53
+ title = f"{self.name} | {title}"
54
+
55
+ for video in veri.get("videos"):
56
+ video_link = video.get("link").split("_blank\">")[-1]
57
+ self._data[video_link] = {
58
+ "name" : title,
59
+ "referer" : self.main_url,
60
+ "subtitles" : []
61
+ }
62
+
63
+ return list(self._data.keys())
64
+
65
+ async def play(self, name: str, url: str, referer: str, subtitles: list[Subtitle]):
66
+ extract_result = ExtractResult(name=name, url=url, referer=referer, subtitles=subtitles)
67
+ self.media_handler.title = name
68
+ self.media_handler.play_with_vlc(extract_result)
@@ -68,16 +68,25 @@ class KekikStream:
68
68
 
69
69
  self.ui_manager.display_media_info(self.current_plugin.name, media_info)
70
70
 
71
- links = await self.current_plugin.load_links(url)
71
+ links = await self.current_plugin.load_links(media_info.url)
72
72
  await self.show_options(links)
73
73
 
74
74
  async def show_options(self, links):
75
75
  mapping = self.extractor_manager.map_links_to_extractors(links)
76
- if not mapping:
76
+ if not mapping and (not hasattr(self.current_plugin, "play") and not callable(self.current_plugin.play)):
77
77
  konsol.print("[bold red]Hiçbir Extractor bulunamadı![/bold red]")
78
78
  konsol.print(links)
79
79
  return
80
80
 
81
+ if not mapping:
82
+ selected_link = await self.ui_manager.select_from_list(
83
+ message = "Doğrudan bir bağlantı seçin:",
84
+ choices = [{"name": self.current_plugin.name, "value": link} for link in links]
85
+ )
86
+ if selected_link:
87
+ await self.play_media(selected_link)
88
+ return
89
+
81
90
  action = await self.ui_manager.select_from_list(
82
91
  message = "Ne yapmak istersiniz?",
83
92
  choices = ["İzle", "Geri Git", "Ana Menü"]
@@ -99,6 +108,15 @@ class KekikStream:
99
108
  await self.run()
100
109
 
101
110
  async def play_media(self, selected_link):
111
+ if hasattr(self.current_plugin, "play") and callable(self.current_plugin.play):
112
+ await self.current_plugin.play(
113
+ name = self.current_plugin._data[selected_link]["name"],
114
+ url = selected_link,
115
+ referer = self.current_plugin._data[selected_link]["referer"],
116
+ subtitles = self.current_plugin._data[selected_link]["subtitles"]
117
+ )
118
+ return
119
+
102
120
  extractor:ExtractorBase = self.extractor_manager.find_extractor(selected_link)
103
121
  if not extractor:
104
122
  konsol.print("[bold red]Uygun Extractor bulunamadı.[/bold red]")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: KekikStream
3
- Version: 0.0.7
3
+ Version: 0.0.8
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
@@ -66,6 +66,10 @@ KekikStream
66
66
 
67
67
  **[☕️ Kahve Ismarla](https://KekikAkademi.org/Kahve)**
68
68
 
69
+ ### 🎁 Teşekkürler
70
+
71
+ - [DeoDorqnt387/aniwatch-tr](https://github.com/DeoDorqnt387/aniwatch-tr)
72
+
69
73
  ## 🌐 Telif Hakkı ve Lisans
70
74
 
71
75
  * *Copyright (C) 2024 by* [keyiflerolsun](https://github.com/keyiflerolsun) ❤️️
@@ -30,4 +30,5 @@ KekikStream/Managers/UIManager.py
30
30
  KekikStream/Managers/__init__.py
31
31
  KekikStream/Plugins/FilmMakinesi.py
32
32
  KekikStream/Plugins/FullHDFilmizlesene.py
33
+ KekikStream/Plugins/SineWix.py
33
34
  KekikStream/Plugins/UgurFilm.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: KekikStream
3
- Version: 0.0.7
3
+ Version: 0.0.8
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
@@ -66,6 +66,10 @@ KekikStream
66
66
 
67
67
  **[☕️ Kahve Ismarla](https://KekikAkademi.org/Kahve)**
68
68
 
69
+ ### 🎁 Teşekkürler
70
+
71
+ - [DeoDorqnt387/aniwatch-tr](https://github.com/DeoDorqnt387/aniwatch-tr)
72
+
69
73
  ## 🌐 Telif Hakkı ve Lisans
70
74
 
71
75
  * *Copyright (C) 2024 by* [keyiflerolsun](https://github.com/keyiflerolsun) ❤️️
@@ -43,6 +43,10 @@ KekikStream
43
43
 
44
44
  **[☕️ Kahve Ismarla](https://KekikAkademi.org/Kahve)**
45
45
 
46
+ ### 🎁 Teşekkürler
47
+
48
+ - [DeoDorqnt387/aniwatch-tr](https://github.com/DeoDorqnt387/aniwatch-tr)
49
+
46
50
  ## 🌐 Telif Hakkı ve Lisans
47
51
 
48
52
  * *Copyright (C) 2024 by* [keyiflerolsun](https://github.com/keyiflerolsun) ❤️️
@@ -6,7 +6,7 @@ from io import open
6
6
  setup(
7
7
  # ? Genel Bilgiler
8
8
  name = "KekikStream",
9
- version = "0.0.7",
9
+ version = "0.0.8",
10
10
  url = "https://github.com/keyiflerolsun/KekikStream",
11
11
  description = "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ı",
12
12
  keywords = ["KekikStream", "KekikAkademi", "keyiflerolsun"],
File without changes
File without changes
File without changes