KekikStream 1.0.5__py3-none-any.whl → 1.0.6__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.
@@ -1,6 +1,6 @@
1
1
  # Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
2
2
 
3
- from pydantic import BaseModel, field_validator
3
+ from pydantic import BaseModel, field_validator, model_validator
4
4
  from typing import List, Optional
5
5
 
6
6
 
@@ -40,6 +40,15 @@ class Episode(BaseModel):
40
40
  title : Optional[str] = None
41
41
  url : Optional[str] = None
42
42
 
43
+ @model_validator(mode="after")
44
+ def check_title(self) -> "Episode":
45
+ if not self.title:
46
+ self.title = ""
47
+
48
+ if any(keyword in self.title.lower() for keyword in ["bölüm", "sezon", "episode"]):
49
+ self.title = ""
50
+
51
+ return self
43
52
 
44
53
  class SeriesInfo(BaseModel):
45
54
  url : Optional[str] = None
@@ -57,7 +57,7 @@ class DiziBox(PluginBase):
57
57
  episodes.append(Episode(
58
58
  season = ep_season,
59
59
  episode = ep_episode,
60
- title = "",
60
+ title = ep_title,
61
61
  url = ep_href,
62
62
  ))
63
63
 
@@ -77,7 +77,7 @@ class Dizilla(PluginBase):
77
77
  bolumler.append(Episode(
78
78
  season = sezon.get("seasonNumber"),
79
79
  episode = bolum.get("episodeNumber"),
80
- title = "",
80
+ title = bolum.get("name"),
81
81
  url = await self.url_base_degis(bolum.get("url"), self.main_url),
82
82
  ))
83
83
 
@@ -50,7 +50,7 @@ class RecTV(PluginBase):
50
50
  ep_model = Episode(
51
51
  season = int(re.search(r"(\d+)\.S", season.get("title")).group(1)) if re.search(r"(\d+)\.S", season.get("title")) else 1,
52
52
  episode = int(re.search(r"Bölüm (\d+)", episode.get("title")).group(1)) if re.search(r"Bölüm (\d+)", episode.get("title")) else 1,
53
- title = "",
53
+ title = episode.get("title"),
54
54
  url = self.fix_url(episode.get("sources")[0].get("url")),
55
55
  )
56
56
 
KekikStream/__init__.py CHANGED
@@ -18,6 +18,13 @@ class KekikStream:
18
18
  self.secilen_sonuc = None
19
19
  self.dizi = False
20
20
 
21
+ def _temizle_ve_baslik_goster(self, baslik: str):
22
+ """
23
+ Konsolu temizler ve verilen başlıkla bir kural (separator) gösterir.
24
+ """
25
+ self.arayuz_yonetici.clear_console()
26
+ konsol.rule(baslik)
27
+
21
28
  async def baslat(self):
22
29
  """
23
30
  Uygulamayı başlatır: konsolu temizler, başlığı gösterir ve eklenti seçimiyle devam eder.
@@ -33,12 +40,12 @@ class KekikStream:
33
40
  # Program kapanırken tüm eklentileri kapat
34
41
  await self.eklentiler_yonetici.close_plugins()
35
42
 
36
- def _temizle_ve_baslik_goster(self, baslik: str):
37
- """
38
- Konsolu temizler ve verilen başlıkla bir kural (separator) gösterir.
39
- """
40
- self.arayuz_yonetici.clear_console()
41
- konsol.rule(baslik)
43
+ async def bi_bolum_daha(self):
44
+ self._temizle_ve_baslik_goster(f"[bold cyan]{self.suanki_eklenti.name} » Bi Bölüm Daha?[/bold cyan]")
45
+ return await self.sonuc_detaylari_goster(self.secilen_sonuc)
46
+
47
+ async def icerik_bitti(self):
48
+ return await self.bi_bolum_daha() if self.dizi else await self.baslat()
42
49
 
43
50
  async def sonuc_bulunamadi(self):
44
51
  """
@@ -168,7 +175,7 @@ class KekikStream:
168
175
  choices = secenekler
169
176
  )
170
177
 
171
- async def _medya_bilgisi_yukle(self, url: str, deneme: int = 3):
178
+ async def __medya_bilgisi_yukle(self, url: str, deneme: int = 3):
172
179
  """
173
180
  Belirtilen URL için medya bilgilerini, belirlenen deneme sayısı kadar yüklemeye çalışır.
174
181
  """
@@ -194,7 +201,7 @@ class KekikStream:
194
201
  else:
195
202
  url = secilen_sonuc
196
203
 
197
- medya_bilgi = await self._medya_bilgisi_yukle(url)
204
+ medya_bilgi = await self.__medya_bilgisi_yukle(url)
198
205
  if not medya_bilgi:
199
206
  return await self.sonuc_bulunamadi()
200
207
 
@@ -238,22 +245,19 @@ class KekikStream:
238
245
  konsol.print("[bold red]Hiçbir bağlantı bulunamadı![/bold red]")
239
246
  return await self.sonuc_bulunamadi()
240
247
 
248
+ # Doğrudan oynatma seçeneği
249
+ if hasattr(self.suanki_eklenti, "play") and callable(getattr(self.suanki_eklenti, "play", None)):
250
+ return await self.direkt_oynat(baglantilar)
251
+
241
252
  # Bağlantıları çıkarıcılarla eşleştir
242
253
  haritalama = self.cikaricilar_yonetici.map_links_to_extractors(baglantilar)
243
- play_fonksiyonu_var = hasattr(self.suanki_eklenti, "play") and callable(getattr(self.suanki_eklenti, "play", None))
244
- # ! DEBUG
245
- # konsol.print(baglantilar)
246
254
 
247
255
  # Uygun çıkarıcı kontrolü
248
- if not haritalama and not play_fonksiyonu_var:
256
+ if not haritalama:
249
257
  konsol.print("[bold red]Hiçbir Extractor bulunamadı![/bold red]")
250
258
  konsol.print(baglantilar)
251
259
  return await self.sonuc_bulunamadi()
252
260
 
253
- # Doğrudan oynatma seçeneği
254
- if not haritalama:
255
- return await self.direkt_oynat(baglantilar)
256
-
257
261
  # Kullanıcı seçenekleri
258
262
  secim = await self.arayuz_yonetici.select_from_list(
259
263
  message = "Ne yapmak istersiniz?",
@@ -267,7 +271,7 @@ class KekikStream:
267
271
  choices = [{"name": cikarici_adi, "value": link} for link, cikarici_adi in haritalama.items()]
268
272
  )
269
273
  if secilen_link:
270
- await self.medya_oynat(secilen_link)
274
+ await self.extractor_ile_oynat(secilen_link)
271
275
 
272
276
  case "Tüm Eklentilerde Ara":
273
277
  await self.tum_eklentilerde_arama()
@@ -286,28 +290,23 @@ class KekikStream:
286
290
  for key, value in self.suanki_eklenti._data.items() if key in baglantilar
287
291
  ]
288
292
  )
289
- if secilen_link:
290
- await self.medya_oynat(secilen_link)
293
+ if not secilen_link:
294
+ return await self.icerik_bitti()
295
+
296
+ data = self.suanki_eklenti._data.get(secilen_link, {})
297
+ await self.suanki_eklenti.play(
298
+ name = data.get("name"),
299
+ url = secilen_link,
300
+ referer = data.get("referer"),
301
+ subtitles = data.get("subtitles")
302
+ )
291
303
 
292
- async def bi_bolum_daha(self):
293
- self._temizle_ve_baslik_goster(f"[bold cyan]{self.suanki_eklenti.name} » Bi Bölüm Daha?[/bold cyan]")
294
- return await self.sonuc_detaylari_goster(self.secilen_sonuc)
304
+ return await self.icerik_bitti()
295
305
 
296
- async def medya_oynat(self, secilen_link: str):
306
+ async def extractor_ile_oynat(self, secilen_link: str):
297
307
  """
298
308
  Seçilen bağlantıya göre medya oynatma işlemini gerçekleştirir.
299
309
  """
300
- if hasattr(self.suanki_eklenti, "play") and callable(self.suanki_eklenti.play):
301
- data = self.suanki_eklenti._data.get(secilen_link, {})
302
-
303
- await self.suanki_eklenti.play(
304
- name = data.get("name"),
305
- url = secilen_link,
306
- referer = data.get("referer"),
307
- subtitles = data.get("subtitles")
308
- )
309
- return await self.bi_bolum_daha() if self.dizi else await self.baslat()
310
-
311
310
  # Uygun çıkarıcıyı bul
312
311
  cikarici: ExtractorBase = self.cikaricilar_yonetici.find_extractor(secilen_link)
313
312
  if not cikarici:
@@ -320,25 +319,40 @@ class KekikStream:
320
319
  konsol.print(f"[bold red]{cikarici.name} » hata oluştu: {hata}[/bold red]")
321
320
  return await self.sonuc_bulunamadi()
322
321
 
323
- # Birden fazla bağlantı varsa seçim yap
322
+ secilen_data = await self.__baglanti_secimi_yap(extract_data)
323
+ if not secilen_data:
324
+ return
325
+
326
+ self.__medya_ayarla(secilen_data)
327
+ self.medya_yonetici.play_media(secilen_data)
328
+
329
+ await self.icerik_bitti()
330
+
331
+ async def __baglanti_secimi_yap(self, extract_data):
332
+ """
333
+ Birden fazla bağlantı varsa seçim yapar.
334
+ """
324
335
  if isinstance(extract_data, list):
325
- secilen_data = await self.arayuz_yonetici.select_from_list(
336
+ return await self.arayuz_yonetici.select_from_list(
326
337
  message = "Birden fazla bağlantı bulundu, lütfen birini seçin:",
327
338
  choices = [{"name": data.name, "value": data} for data in extract_data]
328
339
  )
329
- else:
330
- secilen_data = extract_data
340
+ return extract_data
331
341
 
332
- # Cookie varsa ayarla
333
- if secilen_data.headers.get("Cookie"):
334
- self.medya_yonetici.set_headers({"Cookie": secilen_data.headers.get("Cookie")})
342
+ def __medya_ayarla(self, secilen_data):
343
+ """
344
+ Medya bilgilerini ayarlar.
345
+ """
346
+ self.medya_yonetici.set_headers(secilen_data.headers)
335
347
 
336
- # Başlık ve referrer ayarla
337
- self.medya_yonetici.set_title(f"{self.medya_yonetici.get_title()} | {secilen_data.name}")
338
- self.medya_yonetici.set_headers({"Referer": secilen_data.referer})
339
- self.medya_yonetici.play_media(secilen_data)
340
-
341
- await self.bi_bolum_daha() if self.dizi else await self.baslat()
348
+ if secilen_data.referer and not secilen_data.headers.get("Referer"):
349
+ self.medya_yonetici.set_headers({"Referer": secilen_data.referer})
350
+
351
+ if self.suanki_eklenti.name not in self.medya_yonetici.get_title():
352
+ self.medya_yonetici.set_title(f"{self.suanki_eklenti.name} | {self.medya_yonetici.get_title()}")
353
+
354
+ if secilen_data.name not in self.medya_yonetici.get_title():
355
+ self.medya_yonetici.set_title(f"{self.medya_yonetici.get_title()} | {secilen_data.name}")
342
356
 
343
357
  def basla():
344
358
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: KekikStream
3
- Version: 1.0.5
3
+ Version: 1.0.6
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,4 +1,4 @@
1
- KekikStream/__init__.py,sha256=EkpYyex0spnhaG1hRneOSXPNSUFT0k5Zy_kVHcEI08c,14635
1
+ KekikStream/__init__.py,sha256=QDfo9WEynwnO-NJA_lNnEUJKHrlroz5xbYiVY2Vlwrg,14952
2
2
  KekikStream/__main__.py,sha256=B81dQoeGEb-T5Sycs3eNAmW7unvx0Mef0syCjs4nPds,137
3
3
  KekikStream/requirements.txt,sha256=QWCXrrmKodIm7mGtIz9cWr9sks-lmL_TilKMrruWJn0,77
4
4
  KekikStream/CLI/__init__.py,sha256=U6oLq_O7u5y2eHhBnmfhZNns_EqHHJXJmzl8jvZFUNY,230
@@ -13,7 +13,7 @@ KekikStream/Core/Media/MediaManager.py,sha256=9ItiUguOkk3wg3YY5uf3mrjfwLPCvggnP8
13
13
  KekikStream/Core/Plugin/PluginBase.py,sha256=KuR89bkrChPAct4-PMjxbK4i6busXMMFeZjv-x4F1CQ,2521
14
14
  KekikStream/Core/Plugin/PluginLoader.py,sha256=2UM3gNcEgd7k-FxG-JB5nTIS0K_clzvFtzGjMA_Sx7Q,3379
15
15
  KekikStream/Core/Plugin/PluginManager.py,sha256=CZVg1eegi8vfMfccx0DRV0Box8kXz-aoULTQLgbPbvM,893
16
- KekikStream/Core/Plugin/PluginModels.py,sha256=q8tjkt_-uiJ7uNxOThYR0FgTQLZglVAOAaM0Kske-28,2063
16
+ KekikStream/Core/Plugin/PluginModels.py,sha256=M4uZl0rG3tt8xnmDubgTYfxyzTIC5cwEA2Mv5i7Zsqk,2354
17
17
  KekikStream/Core/UI/UIManager.py,sha256=T4V_kdTTWa-UDamgLSKa__dWJuzcvRK9NuwBlzU9Bzc,1693
18
18
  KekikStream/Extractors/CloseLoad.py,sha256=YmDB3YvuDaCUbQ0T_tmhnkEsC5mSdEN6GNoAR662fl8,990
19
19
  KekikStream/Extractors/ContentX.py,sha256=XPoAuA95LOTgCUGyioXxOFWR0nNKWWOHLkYMlzguIIE,2980
@@ -42,20 +42,20 @@ KekikStream/Extractors/VidMoly.py,sha256=jYvFSzE46mStArVEQedkvqUUIPwi1LS47qRk0Yn
42
42
  KekikStream/Extractors/VidMolyMe.py,sha256=ogLiFUJVqFbhtzQrZ1gSB9me85DiHvntjWtSvidYVS8,218
43
43
  KekikStream/Extractors/VidMoxy.py,sha256=_K6BA7Uo59DA3ty_tsayCUZjXmRoDBTghekVNXiuZ7g,1800
44
44
  KekikStream/Extractors/VideoSeyred.py,sha256=otyGi1zdY_JPrXJjoZjesCQDiOkxFdaWiXQ9mOmrygA,1780
45
- KekikStream/Plugins/DiziBox.py,sha256=3luzkJ0tQzdYc6qQCp_-OGKGmYZx5eWYaJJV5w5R6JM,6089
45
+ KekikStream/Plugins/DiziBox.py,sha256=hDkIbZ2aoG0WoQyYc_168WpB3CaTYs7ArGBfgvUY7s4,6095
46
46
  KekikStream/Plugins/DiziYou.py,sha256=tqTZUGJhXg5FBmCBmjw4JqyyQ5irXs3WnfKFDTkiHoY,5457
47
- KekikStream/Plugins/Dizilla.py,sha256=Ou2dtQ-I_kn5CUsoEsQKsl7ozKs-qYOSfESydiwfUD0,4243
47
+ KekikStream/Plugins/Dizilla.py,sha256=evWYvETw1c4RY0GB5P20cB_I_U7ZxzzvnG7RLNGJRPs,4258
48
48
  KekikStream/Plugins/FilmMakinesi.py,sha256=rz8TQeL41PJbeEmksgPHIhp6J-4vbSCBTeEH0ukExz4,2822
49
49
  KekikStream/Plugins/FullHDFilmizlesene.py,sha256=Fa0gRP_NoMfPC8HIKRxERjQVOv8Fyb-ayMJ2EooZ7BE,3080
50
50
  KekikStream/Plugins/JetFilmizle.py,sha256=Gu4Ums-88x7jNKAtKkdSXyMaOyLv0_Kb6jnomhAWhM0,3916
51
- KekikStream/Plugins/RecTV.py,sha256=wFRHHWQRMcT4IgdIbmsK7QlJkhlhLtYWjuHKO1w-b_o,5088
51
+ KekikStream/Plugins/RecTV.py,sha256=dSDv6IV5ZNrgP4XnwD_fD-Rx8qxmx2dqNy70BgE63jE,5106
52
52
  KekikStream/Plugins/SezonlukDizi.py,sha256=VUyKAu2SlUCV4uTQfIr2BLLTus2-LOXPFF4rDHG1rs8,4444
53
53
  KekikStream/Plugins/Shorten.py,sha256=kDQGmj7qvfdDyDkU__QGjx-FoGSgCOPxcA3veM2BGPk,8858
54
54
  KekikStream/Plugins/SineWix.py,sha256=EqezB8Fism2dugptFgCEpeauqsbvSEDRNozHxDIZNrQ,4997
55
55
  KekikStream/Plugins/UgurFilm.py,sha256=rp6M7yjVljVWbGEAC9BB96W1wBsM-PdFbh5tcZ2ZhzI,2930
56
- KekikStream-1.0.5.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
57
- KekikStream-1.0.5.dist-info/METADATA,sha256=-o2Qtp46CEd23wrAAc3IGVXQ8ZMmiv2_zXGwNYOoK98,4508
58
- KekikStream-1.0.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
59
- KekikStream-1.0.5.dist-info/entry_points.txt,sha256=dFwdiTx8djyehI0Gsz-rZwjAfZzUzoBSrmzRu9ubjJc,50
60
- KekikStream-1.0.5.dist-info/top_level.txt,sha256=DNmGJDXl27Drdfobrak8KYLmocW_uznVYFJOzcjUgmY,12
61
- KekikStream-1.0.5.dist-info/RECORD,,
56
+ KekikStream-1.0.6.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
57
+ KekikStream-1.0.6.dist-info/METADATA,sha256=92sWqR5Oj1PQiVyOQxnJ_cMDBT6DwhJmRdNAQMov4A8,4508
58
+ KekikStream-1.0.6.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
59
+ KekikStream-1.0.6.dist-info/entry_points.txt,sha256=dFwdiTx8djyehI0Gsz-rZwjAfZzUzoBSrmzRu9ubjJc,50
60
+ KekikStream-1.0.6.dist-info/top_level.txt,sha256=DNmGJDXl27Drdfobrak8KYLmocW_uznVYFJOzcjUgmY,12
61
+ KekikStream-1.0.6.dist-info/RECORD,,