KekikStream 0.0.7__py3-none-any.whl → 0.2.0__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.
@@ -21,7 +21,7 @@ class ExtractorManager:
21
21
  for extractor_cls in self.extractors:
22
22
  extractor:ExtractorBase = extractor_cls()
23
23
  if extractor.can_handle_url(link):
24
- mapping[link] = extractor.name
24
+ mapping[link] = f"{extractor.name:<30} » {link.replace(extractor.main_url, '')}"
25
25
  break
26
26
 
27
27
  return mapping
@@ -1,6 +1,6 @@
1
1
  # Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
2
2
 
3
- from ..Core import PluginLoader
3
+ from ..Core import PluginLoader, PluginBase
4
4
 
5
5
  class PluginManager:
6
6
  def __init__(self, plugin_dir="Plugins"):
@@ -8,11 +8,12 @@ class PluginManager:
8
8
  self.plugins = self.plugin_loader.load_all()
9
9
 
10
10
  def get_plugin_names(self):
11
- return list(self.plugins.keys())
11
+ return sorted(list(self.plugins.keys()))
12
12
 
13
13
  def select_plugin(self, plugin_name):
14
14
  return self.plugins.get(plugin_name)
15
15
 
16
16
  async def close_plugins(self):
17
17
  for plugin in self.plugins.values():
18
- await plugin.close()
18
+ if isinstance(plugin, PluginBase):
19
+ await plugin.close()
@@ -13,7 +13,17 @@ class UIManager:
13
13
 
14
14
  @staticmethod
15
15
  async def select_from_list(message, choices):
16
- return await inquirer.select(message=message, choices=choices).execute_async()
16
+ return await inquirer.select(message=message, choices=choices, max_height="75%").execute_async()
17
+
18
+ @staticmethod
19
+ async def select_from_fuzzy(message, choices):
20
+ return await inquirer.fuzzy(
21
+ message = message,
22
+ choices = choices,
23
+ validate = lambda result: result in [choice if isinstance(choice, str) else choice["value"] for choice in choices],
24
+ filter = lambda result: result,
25
+ max_height = "75%"
26
+ ).execute_async()
17
27
 
18
28
  @staticmethod
19
29
  async def prompt_text(message):
@@ -26,6 +36,9 @@ class UIManager:
26
36
  table.add_column(style="magenta")
27
37
 
28
38
  for key, value in media_info.dict().items():
39
+ if key == "episodes":
40
+ continue
41
+
29
42
  if value:
30
43
  table.add_row(f"[bold cyan]{key.capitalize()}[/bold cyan]", str(value))
31
44
 
@@ -0,0 +1,96 @@
1
+ # Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
2
+
3
+ from KekikStream.Core import PluginBase, SearchResult, MovieInfo
4
+ from parsel import Selector
5
+
6
+ class JetFilmizle(PluginBase):
7
+ name = "JetFilmizle"
8
+ main_url = "https://jetfilmizle.media"
9
+
10
+ async def search(self, query: str) -> list[SearchResult]:
11
+ istek = await self.oturum.post(
12
+ url = f"{self.main_url}/filmara.php",
13
+ data = {"s": query},
14
+ headers = {"Referer": f"{self.main_url}/"}
15
+ )
16
+ secici = Selector(istek.text)
17
+
18
+ results = []
19
+ for article in secici.css("article.movie"):
20
+ title = self.clean_title(article.css("h2 a::text, h3 a::text, h4 a::text, h5 a::text, h6 a::text").get())
21
+ href = article.css("a::attr(href)").get()
22
+ poster = article.css("img::attr(data-src)").get() or article.css("img::attr(src)").get()
23
+
24
+ if title and href:
25
+ results.append(
26
+ SearchResult(
27
+ title = title.strip(),
28
+ url = self.fix_url(href.strip()),
29
+ poster = self.fix_url(poster.strip()) if poster else None,
30
+ )
31
+ )
32
+
33
+ return results
34
+
35
+ async def load_item(self, url: str) -> MovieInfo:
36
+ istek = await self.oturum.get(url)
37
+ secici = Selector(istek.text)
38
+
39
+ title = self.clean_title(secici.css("div.movie-exp-title::text").get())
40
+ poster = secici.css("section.movie-exp img::attr(data-src), section.movie-exp img::attr(src)").get().strip()
41
+ description = secici.css("section.movie-exp p.aciklama::text").get().strip()
42
+ tags = secici.css("section.movie-exp div.catss a::text").getall()
43
+ rating = secici.css("section.movie-exp div.imdb_puan span::text").get().strip()
44
+ year = secici.xpath("//div[@class='yap' and (contains(., 'Vizyon') or contains(., 'Yapım'))]/text()").get().strip()
45
+ actors = secici.css("div[itemprop='actor'] a span::text").getall()
46
+
47
+ return MovieInfo(
48
+ url = url,
49
+ poster = self.fix_url(poster),
50
+ title = title,
51
+ description = description,
52
+ tags = tags,
53
+ rating = rating,
54
+ year = year,
55
+ actors = actors
56
+ )
57
+
58
+ async def load_links(self, url: str) -> list[str]:
59
+ istek = await self.oturum.get(url)
60
+ secici = Selector(istek.text)
61
+
62
+ iframes = []
63
+ main_iframe = secici.css("div#movie iframe::attr(data-src), div#movie iframe::attr(data), div#movie iframe::attr(src)").get()
64
+ if main_iframe:
65
+ iframes.append(self.fix_url(main_iframe))
66
+
67
+ for part in secici.css("div.film_part a"):
68
+ part_href = part.attrib.get("href")
69
+ if not part_href:
70
+ continue
71
+
72
+ part_istek = await self.oturum.get(part_href)
73
+ part_secici = Selector(part_istek.text)
74
+
75
+ iframe = part_secici.css("div#movie iframe::attr(data-src), div#movie iframe::attr(data), div#movie iframe::attr(src)").get()
76
+ if iframe:
77
+ iframes.append(self.fix_url(iframe))
78
+ else:
79
+ for link in part_secici.css("div#movie p a"):
80
+ download_link = link.attrib.get("href")
81
+ if download_link:
82
+ iframes.append(self.fix_url(download_link))
83
+
84
+ processed_iframes = []
85
+ for iframe in iframes:
86
+ if "jetv.xyz" in iframe:
87
+ jetv_istek = await self.oturum.get(iframe)
88
+ jetv_secici = Selector(jetv_istek.text)
89
+
90
+ jetv_iframe = jetv_secici.css("iframe::attr(src)").get()
91
+ if jetv_iframe:
92
+ processed_iframes.append(self.fix_url(jetv_iframe))
93
+ else:
94
+ processed_iframes.append(iframe)
95
+
96
+ return processed_iframes
@@ -0,0 +1,108 @@
1
+ # Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
2
+
3
+ from KekikStream.Core import PluginBase, SearchResult, SeriesInfo, Episode
4
+ from parsel import Selector
5
+
6
+ class SezonlukDizi(PluginBase):
7
+ name = "SezonlukDizi"
8
+ main_url = "https://sezonlukdizi6.com"
9
+
10
+ async def search(self, query: str) -> list[SearchResult]:
11
+ istek = await self.oturum.get(f"{self.main_url}/diziler.asp?adi={query}")
12
+ secici = Selector(istek.text)
13
+
14
+ return [
15
+ SearchResult(
16
+ title = afis.css("div.description::text").get(default="").strip(),
17
+ url = self.fix_url(afis.attrib.get("href")),
18
+ poster = self.fix_url(afis.css("img::attr(data-src)").get()),
19
+ )
20
+ for afis in secici.css("div.afis a.column")
21
+ ]
22
+
23
+ async def load_item(self, url: str) -> SeriesInfo:
24
+ istek = await self.oturum.get(url)
25
+ secici = Selector(istek.text)
26
+
27
+ title = secici.css("div.header::text").get(default="").strip()
28
+ poster = self.fix_url(secici.css("div.image img::attr(data-src)").get(default="").strip())
29
+ year = secici.css("div.extra span::text").re_first(r"(\d{4})")
30
+ description = secici.css("span#tartismayorum-konu::text").get(default="").strip()
31
+ tags = secici.css("div.labels a[href*='tur']::text").getall()
32
+ rating = secici.css("div.dizipuani a div::text").re_first(r"[\d.,]+")
33
+ actors = []
34
+
35
+ actors_istek = await self.oturum.get(f"{self.main_url}/oyuncular/{url.split('/')[-1]}")
36
+ actors_secici = Selector(actors_istek.text)
37
+ actors = [
38
+ actor.css("div.header::text").get().strip()
39
+ for actor in actors_secici.css("div.doubling div.ui")
40
+ ]
41
+
42
+ episodes_istek = await self.oturum.get(f"{self.main_url}/bolumler/{url.split('/')[-1]}")
43
+ episodes_secici = Selector(episodes_istek.text)
44
+ episodes = []
45
+
46
+ for sezon in episodes_secici.css("table.unstackable"):
47
+ for bolum in sezon.css("tbody tr"):
48
+ ep_name = bolum.css("td:nth-of-type(4) a::text").get(default="").strip()
49
+ ep_href = self.fix_url(bolum.css("td:nth-of-type(4) a::attr(href)").get())
50
+ ep_episode = bolum.css("td:nth-of-type(3) a::text").re_first(r"(\d+)")
51
+ ep_season = bolum.css("td:nth-of-type(2)::text").re_first(r"(\d+)")
52
+
53
+ if ep_name and ep_href:
54
+ episode = Episode(
55
+ season = ep_season,
56
+ episode = ep_episode,
57
+ title = ep_name,
58
+ url = ep_href,
59
+ )
60
+ episodes.append(episode)
61
+
62
+ return SeriesInfo(
63
+ url = url,
64
+ poster = poster,
65
+ title = title,
66
+ description = description,
67
+ tags = tags,
68
+ rating = rating,
69
+ year = year,
70
+ episodes = episodes,
71
+ actors = actors
72
+ )
73
+
74
+ async def load_links(self, url: str) -> list[str]:
75
+ istek = await self.oturum.get(url)
76
+ secici = Selector(istek.text)
77
+
78
+ bid = secici.css("div#dilsec::attr(data-id)").get()
79
+ if not bid:
80
+ return []
81
+
82
+ links = []
83
+ for dil, label in [("1", "AltYazı"), ("0", "Dublaj")]:
84
+ dil_istek = await self.oturum.post(
85
+ url = f"{self.main_url}/ajax/dataAlternatif2.asp",
86
+ headers = {"X-Requested-With": "XMLHttpRequest"},
87
+ data = {"bid": bid, "dil": dil},
88
+ )
89
+
90
+ try:
91
+ dil_json = dil_istek.json()
92
+ except Exception:
93
+ continue
94
+
95
+ if dil_json.get("status") == "success":
96
+ for veri in dil_json.get("data", []):
97
+ veri_response = await self.oturum.post(
98
+ url = f"{self.main_url}/ajax/dataEmbed.asp",
99
+ headers = {"X-Requested-With": "XMLHttpRequest"},
100
+ data = {"id": veri.get("id")},
101
+ )
102
+ secici = Selector(veri_response.text)
103
+
104
+ if iframe := secici.css("iframe::attr(src)").get():
105
+ video_url = self.fix_url(iframe)
106
+ links.append(video_url)
107
+
108
+ return links
@@ -0,0 +1,105 @@
1
+ # Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
2
+
3
+ from KekikStream.Core import PluginBase, SearchResult, MovieInfo, Episode, SeriesInfo
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")
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
+ istek = await self.oturum.get(f"{self.main_url}/sinewix/{item_type}/{item_id}")
27
+ veri = istek.json()
28
+
29
+ match item_type:
30
+ case "movie":
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/{item_type}/{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
+ 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
+ )
79
+
80
+ async def load_links(self, url: str) -> list[str]:
81
+ if not url.startswith(self.main_url):
82
+ return [url]
83
+
84
+ istek = await self.oturum.get(url)
85
+ veri = istek.json()
86
+
87
+ org_title = veri.get("title")
88
+ alt_title = veri.get("original_name") or ""
89
+ title = f"{org_title} - {alt_title}" if (alt_title and org_title != alt_title) else org_title
90
+ title = f"{self.name} | {title}"
91
+
92
+ for video in veri.get("videos"):
93
+ video_link = video.get("link").split("_blank\">")[-1]
94
+ self._data[video_link] = {
95
+ "name" : title,
96
+ "referer" : self.main_url,
97
+ "subtitles" : []
98
+ }
99
+
100
+ return list(self._data.keys())
101
+
102
+ async def play(self, name: str, url: str, referer: str, subtitles: list[Subtitle]):
103
+ extract_result = ExtractResult(name=name, url=url, referer=referer, subtitles=subtitles)
104
+ self.media_handler.title = name
105
+ self.media_handler.play_with_vlc(extract_result)
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:
@@ -26,16 +26,18 @@ class KekikStream:
26
26
  await self.plugin_manager.close_plugins()
27
27
 
28
28
  async def select_plugin(self):
29
- plugin_name = await self.ui_manager.select_from_list(
30
- message = "Bir eklenti seçin:",
31
- choices = self.plugin_manager.get_plugin_names()
29
+ plugin_name = await self.ui_manager.select_from_fuzzy(
30
+ message = "Arama yapılacak eklentiyi seçin:",
31
+ choices = ["Tüm Eklentilerde Ara", *self.plugin_manager.get_plugin_names()]
32
32
  )
33
33
 
34
- self.current_plugin = self.plugin_manager.select_plugin(plugin_name)
34
+ if plugin_name == "Tüm Eklentilerde Ara":
35
+ await self.search_all()
36
+ else:
37
+ self.current_plugin = self.plugin_manager.select_plugin(plugin_name)
38
+ await self.search_single_plugin()
35
39
 
36
- await self.search()
37
-
38
- async def search(self):
40
+ async def search_single_plugin(self):
39
41
  self.ui_manager.clear_console()
40
42
  konsol.rule(f"[bold cyan]{self.current_plugin.name} Eklentisinde Arama Yapın[/bold cyan]")
41
43
 
@@ -46,38 +48,89 @@ class KekikStream:
46
48
  konsol.print("[bold red]Arama sonucu bulunamadı![/bold red]")
47
49
  return
48
50
 
49
- await self.select_result(results)
51
+ selected_result = await self.select_result(results)
52
+
53
+ if selected_result:
54
+ await self.show_details({"plugin": self.current_plugin.name, "url": selected_result})
55
+
56
+ async def search_all(self):
57
+ self.ui_manager.clear_console()
58
+ konsol.rule("[bold cyan]Tüm Eklentilerde Arama Yapın[/bold cyan]")
59
+
60
+ query = await self.ui_manager.prompt_text("Arama sorgusu girin:")
61
+ results = await self.search_all_plugins(query)
62
+
63
+ if not results:
64
+ return
65
+
66
+ selected_result = await self.select_from_all_results(results)
67
+
68
+ if selected_result:
69
+ await self.show_details(selected_result)
50
70
 
51
71
  async def select_result(self, results):
52
- selected_url = await self.ui_manager.select_from_list(
53
- message = "Bir içerik seçin:",
72
+ selected_url = await self.ui_manager.select_from_fuzzy(
73
+ message = "İçerik sonuçlarından birini seçin:",
54
74
  choices = [{"name": res.title, "value": res.url} for res in results]
55
75
  )
56
76
 
57
- await self.show_details(selected_url)
77
+ if selected_url:
78
+ return selected_url
58
79
 
59
- async def show_details(self, url):
80
+ async def show_details(self, selected_result):
60
81
  try:
82
+ if isinstance(selected_result, dict) and "plugin" in selected_result:
83
+ plugin_name = selected_result["plugin"]
84
+ url = selected_result["url"]
85
+
86
+ self.current_plugin = self.plugin_manager.select_plugin(plugin_name)
87
+ else:
88
+ url = selected_result
89
+
61
90
  media_info = await self.current_plugin.load_item(url)
62
91
  except Exception as hata:
63
- konsol.log(url)
92
+ konsol.log(selected_result)
64
93
  hata_yakala(hata)
65
94
  return
66
95
 
67
96
  self.media_manager.set_title(f"{self.current_plugin.name} | {media_info.title}")
68
97
 
69
- self.ui_manager.display_media_info(self.current_plugin.name, media_info)
70
-
71
- links = await self.current_plugin.load_links(url)
72
- await self.show_options(links)
98
+ self.ui_manager.display_media_info(f"{self.current_plugin.name} | {media_info.title}", media_info)
99
+
100
+ if isinstance(media_info, SeriesInfo):
101
+ selected_episode = await self.ui_manager.select_from_fuzzy(
102
+ message = "İzlemek istediğiniz bölümü seçin:",
103
+ choices = [
104
+ {"name": f"{episode.season}. Sezon {episode.episode}. Bölüm - {episode.title}", "value": episode.url}
105
+ for episode in media_info.episodes
106
+ ]
107
+ )
108
+ if selected_episode:
109
+ links = await self.current_plugin.load_links(selected_episode)
110
+ await self.show_options(links)
111
+ else:
112
+ links = await self.current_plugin.load_links(media_info.url)
113
+ await self.show_options(links)
73
114
 
74
115
  async def show_options(self, links):
75
116
  mapping = self.extractor_manager.map_links_to_extractors(links)
76
- if not mapping:
117
+ has_play_method = hasattr(self.current_plugin, "play") and callable(getattr(self.current_plugin, "play", None))
118
+ # ! DEBUG
119
+ # konsol.print(links)
120
+ if not mapping and not has_play_method:
77
121
  konsol.print("[bold red]Hiçbir Extractor bulunamadı![/bold red]")
78
122
  konsol.print(links)
79
123
  return
80
124
 
125
+ if not mapping:
126
+ selected_link = await self.ui_manager.select_from_list(
127
+ message = "Doğrudan oynatmak için bir bağlantı seçin:",
128
+ choices = [{"name": self.current_plugin.name, "value": link} for link in links]
129
+ )
130
+ if selected_link:
131
+ await self.play_media(selected_link)
132
+ return
133
+
81
134
  action = await self.ui_manager.select_from_list(
82
135
  message = "Ne yapmak istersiniz?",
83
136
  choices = ["İzle", "Geri Git", "Ana Menü"]
@@ -86,7 +139,7 @@ class KekikStream:
86
139
  match action:
87
140
  case "İzle":
88
141
  selected_link = await self.ui_manager.select_from_list(
89
- message = "Bir bağlantı seçin:",
142
+ message = "İzlemek için bir bağlantı seçin:",
90
143
  choices = [{"name": extractor_name, "value": link} for link, extractor_name in mapping.items()]
91
144
  )
92
145
  if selected_link:
@@ -99,22 +152,81 @@ class KekikStream:
99
152
  await self.run()
100
153
 
101
154
  async def play_media(self, selected_link):
102
- extractor:ExtractorBase = self.extractor_manager.find_extractor(selected_link)
155
+ if hasattr(self.current_plugin, "play") and callable(self.current_plugin.play):
156
+ await self.current_plugin.play(
157
+ name = self.current_plugin._data[selected_link]["name"],
158
+ url = selected_link,
159
+ referer = self.current_plugin._data[selected_link]["referer"],
160
+ subtitles = self.current_plugin._data[selected_link]["subtitles"]
161
+ )
162
+ return
163
+
164
+ extractor: ExtractorBase = self.extractor_manager.find_extractor(selected_link)
103
165
  if not extractor:
104
166
  konsol.print("[bold red]Uygun Extractor bulunamadı.[/bold red]")
105
167
  return
106
168
 
107
169
  extract_data = await extractor.extract(selected_link, referer=self.current_plugin.main_url)
108
- if extract_data.headers.get("Cookie"):
109
- self.media_manager.set_headers({"Cookie": extract_data.headers.get("Cookie")})
110
170
 
111
- self.media_manager.set_title(f"{self.media_manager.get_title()} | {extract_data.name}")
112
- self.media_manager.set_headers({"Referer": extract_data.referer})
113
- self.media_manager.play_media(extract_data)
171
+ if isinstance(extract_data, list):
172
+ selected_data = await self.ui_manager.select_from_list(
173
+ message = "Birden fazla bağlantı bulundu, lütfen birini seçin:",
174
+ choices = [{"name": data.name, "value": data} for data in extract_data]
175
+ )
176
+ else:
177
+ selected_data = extract_data
178
+
179
+ if selected_data.headers.get("Cookie"):
180
+ self.media_manager.set_headers({"Cookie": selected_data.headers.get("Cookie")})
181
+
182
+ self.media_manager.set_title(f"{self.media_manager.get_title()} | {selected_data.name}")
183
+ self.media_manager.set_headers({"Referer": selected_data.referer})
184
+ self.media_manager.play_media(selected_data)
185
+
186
+ async def search_all_plugins(self, query: str):
187
+ all_results = []
188
+
189
+ for plugin_name, plugin in self.plugin_manager.plugins.items():
190
+ if not isinstance(plugin, PluginBase):
191
+ konsol.print(f"[yellow][!] {plugin_name} geçerli bir PluginBase değil, atlanıyor...[/yellow]")
192
+ continue
193
+
194
+ konsol.log(f"[yellow][~] {plugin_name:<18} eklentisinde arama yapılıyor...[/]")
195
+ try:
196
+ results = await plugin.search(query)
197
+ if results:
198
+ all_results.extend(
199
+ [{"plugin": plugin_name, "title": result.title, "url": result.url, "poster": result.poster} for result in results]
200
+ )
201
+ except Exception as hata:
202
+ konsol.print(f"[bold red]{plugin_name} eklentisinde hata oluştu: {hata}[/bold red]")
203
+
204
+ if not all_results:
205
+ konsol.print("[bold red]Hiçbir sonuç bulunamadı![/bold red]")
206
+ return []
207
+
208
+ return all_results
209
+
210
+ async def select_from_all_results(self, results):
211
+ choices = [
212
+ {"name": f"[{res['plugin']}] {res['title']}", "value": res}
213
+ for res in results
214
+ ]
215
+
216
+ selected_result = await self.ui_manager.select_from_fuzzy(
217
+ message = "Arama sonuçlarından bir içerik seçin:",
218
+ choices = choices
219
+ )
114
220
 
221
+ return selected_result
222
+
223
+ from .CLI import check_and_update_package
115
224
 
116
225
  def basla():
117
226
  try:
227
+ konsol.print("[bold cyan]Güncelleme kontrol ediliyor...[/bold cyan]")
228
+ check_and_update_package("KekikStream")
229
+
118
230
  app = KekikStream()
119
231
  run(app.run())
120
232
  cikis_yap(False)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: KekikStream
3
- Version: 0.0.7
3
+ Version: 0.2.0
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
@@ -10,7 +10,7 @@ Keywords: KekikStream,KekikAkademi,keyiflerolsun
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
12
12
  Classifier: Programming Language :: Python :: 3
13
- Requires-Python: >=3.8
13
+ Requires-Python: >=3.10
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: LICENSE
16
16
  Requires-Dist: setuptools
@@ -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) ❤️️