diff --git a/README.md b/README.md index f43eaca..edc4528 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# LDownloader v3.1.0 🎬🎵 +# LDownloader v3.2.0 🎬🎵 **LDownloader**, Python, Tkinter ve `yt-dlp` tabanlı, koyu temalı bir Windows masaüstü video ve ses indirme uygulamasıdır. Kullanılabilir platformlar ve formatlar, kaynak içeriğe ve `yt-dlp` desteğine bağlıdır. @@ -33,8 +33,9 @@ * **Kapak Resmi ve Metadata**: İsteğe bağlı olarak kapak görseli ve metadata, desteklenen formatlara eklenir. ### 7. 🍪 Zen Browser & Modern Çerez (Cookies) Yönetimi +* **Önemli Çerez Bildirimi**: YouTube oturum çerezleri en fazla **30 dakikada bir** yenilenmelidir. Windows App-Bound güvenlik koruması sebebiyle Chromium tabanlı tarayıcılardan (Chrome, Edge, Brave vb.) doğrudan otomatik çerez çekimi kısıtlıdır; Firefox, Zen Browser veya `cookies.txt` eklentisi önerilir. * Yaş kısıtlamalı, gizli veya YouTube 403 engeline takılan videolarda oturum çerezlerinizi tek tıkla aktarın: - * **Desteklenen tarayıcı seçenekleri**: Zen Browser, Firefox, Chrome, Microsoft Edge, Brave, Opera, Vivaldi, Chromium. Tarayıcı sürümü, profil konumu ve işletim sistemi izinleri nedeniyle doğrudan çerez aktarımı her sistemde çalışmayabilir. + * **Desteklenen tarayıcı seçenekleri**: Zen Browser, Firefox, Chrome, Microsoft Edge, Brave, Opera, Vivaldi, Chromium. * İsteğe bağlı manuel `cookies.txt` yükleme desteği. ### 8. 📋 Gelişmiş Playlist İndirme diff --git a/ui/app.py b/ui/app.py index 3d5c928..8520221 100644 --- a/ui/app.py +++ b/ui/app.py @@ -27,7 +27,7 @@ from core.dependencies import get_ytdlp_status, get_ffmpeg_status, get_js_status class LDownloaderApp(tk.Tk): def __init__(self): super().__init__() - self.title("LDownloader v3.1.0") + self.title("LDownloader v3.2.0") self.geometry("980x660") self.minsize(880, 580) self.configure(bg=BG) @@ -110,7 +110,7 @@ class LDownloaderApp(tk.Tk): if self.logo_img: tk.Label(brand_frame, image=self.logo_img, bg=TAB_BG).pack(side="left", padx=(0, 8)) - tk.Label(brand_frame, text="LDownloader v3.1.0", font=FONT_TITLE, bg=TAB_BG, fg=TEXT).pack(side="left") + tk.Label(brand_frame, text="LDownloader v3.2.0", font=FONT_TITLE, bg=TAB_BG, fg=TEXT).pack(side="left") # Orta: Sekmeler self.nav_buttons = {} @@ -174,10 +174,19 @@ class LDownloaderApp(tk.Tk): "single": SingleTab( self.content_container, on_download_requested=self.start_single_download, - on_switch_to_playlist=self._transfer_to_playlist + on_switch_to_playlist=self._transfer_to_playlist, + on_open_settings=lambda: self.switch_tab("settings") + ), + "playlist": PlaylistTab( + self.content_container, + on_download_requested=self.start_playlist_download, + on_open_settings=lambda: self.switch_tab("settings") + ), + "batch": BatchTab( + self.content_container, + on_batch_requested=self.start_batch_download, + on_open_settings=lambda: self.switch_tab("settings") ), - "playlist": PlaylistTab(self.content_container, on_download_requested=self.start_playlist_download), - "batch": BatchTab(self.content_container, on_batch_requested=self.start_batch_download), "history": HistoryTab(self.content_container), "settings": SettingsTab(self.content_container, on_dependency_updated=self._on_deps_updated) } diff --git a/ui/components.py b/ui/components.py index 062f775..0c21f56 100644 --- a/ui/components.py +++ b/ui/components.py @@ -27,6 +27,78 @@ class Card(tk.Frame): ) +class CookieNoticeBanner(tk.Frame): + """ + Üst kısım bilgilendirme banner'ı: + Oturum çerezlerinin geçerlilik süresi (maksimum 30 dk) ve Chromium güvenlik koruması uyarısını gösterir. + """ + def __init__(self, parent, on_open_settings=None, dismissible=True, **kwargs): + super().__init__( + parent, + bg=ACCENT_MUTED, + highlightthickness=1, + highlightbackground=BORDER, + padx=14, + pady=10, + **kwargs + ) + self.on_open_settings = on_open_settings + + # Sol: İkon + lbl_icon = tk.Label(self, text="🍪", bg=ACCENT_MUTED, font=("Segoe UI", 12)) + lbl_icon.pack(side="left", padx=(0, 10)) + + # Orta: Metin Alanı + text_frame = tk.Frame(self, bg=ACCENT_MUTED) + text_frame.pack(side="left", fill="both", expand=True) + + t_title = tk.Label( + text_frame, + text="Önemli Çerez & Oturum Bilgilendirmesi", + bg=ACCENT_MUTED, + fg=ACCENT_LIGHT, + font=FONT_SMALL_BOLD, + anchor="w" + ) + t_title.pack(fill="x") + + t_desc = tk.Label( + text_frame, + text="YouTube oturum çerezleri en fazla 30 dakikada bir yenilenmelidir. Windows App-Bound güvenlik koruması sebebiyle Chromium tabanlı tarayıcılardan (Chrome, Edge, Brave vb.) otomatik çerez çekimi geçici olarak desteklenmemektedir. Sorunsuz indirme için Firefox, Zen Browser kullanmanız veya Ayarlar'dan 'cookies.txt' dosyasını yüklemeniz önerilir.", + bg=ACCENT_MUTED, + fg=SUBTEXT, + font=FONT_SMALL, + anchor="w", + justify="left", + wraplength=640 + ) + t_desc.pack(fill="x", pady=(2, 0)) + + # Sağ: Eylem Butonları + actions = tk.Frame(self, bg=ACCENT_MUTED) + actions.pack(side="right", padx=(8, 0)) + + if on_open_settings: + btn_sett = PillButton( + actions, + text="⚙️ Çerez Ayarları", + command=on_open_settings, + small=True, + style="secondary" + ) + btn_sett.pack(side="left", padx=(0, 6)) + + if dismissible: + btn_close = PillButton( + actions, + text="✕", + command=self.destroy, + small=True, + style="ghost" + ) + btn_close.pack(side="left") + + class PillButton(tk.Frame): """Flat, high-contrast button with a clear hover and disabled state.""" def __init__(self, parent, text="", command=None, style="secondary", small=False, **kwargs): diff --git a/ui/tabs/batch_tab.py b/ui/tabs/batch_tab.py index 17db9e7..44a4ad7 100644 --- a/ui/tabs/batch_tab.py +++ b/ui/tabs/batch_tab.py @@ -4,21 +4,26 @@ from ui.theme import ( BG, SURFACE, SURFACE_LIGHT, ENTRY_BG, BORDER, ACCENT, ACCENT_LIGHT, TEXT, SUBTEXT, FONT_HERO, FONT_TITLE, FONT_REGULAR, FONT_BOLD, FONT_SMALL, FONT_SMALL_BOLD ) -from ui.components import Card, PillButton, ModernEntry, SegmentedPill +from ui.components import Card, CookieNoticeBanner, PillButton, ModernEntry, SegmentedPill from core.config import config class BatchTab(tk.Frame): - def __init__(self, parent, on_batch_requested=None, **kwargs): + def __init__(self, parent, on_batch_requested=None, on_open_settings=None, **kwargs): super().__init__(parent, bg=BG, **kwargs) self.on_batch_requested = on_batch_requested + self.on_open_settings = on_open_settings self.queue = [] self._build_ui() def _build_ui(self): + # ── Üst Çerez Bilgilendirme Banner'ı ──────────────────────── + self.cookie_banner = CookieNoticeBanner(self, on_open_settings=self.on_open_settings) + self.cookie_banner.pack(fill="x", padx=32, pady=(16, 0)) + # ── 1. Bağlantı Ekleme Kartı ──────────────────────────────── c_input = Card(self, padx=24, pady=16) - c_input.pack(fill="x", padx=32, pady=(24, 12)) + c_input.pack(fill="x", padx=32, pady=(12, 12)) top = tk.Frame(c_input, bg=SURFACE) top.pack(fill="x") diff --git a/ui/tabs/playlist_tab.py b/ui/tabs/playlist_tab.py index b62c95b..267d76f 100644 --- a/ui/tabs/playlist_tab.py +++ b/ui/tabs/playlist_tab.py @@ -4,14 +4,15 @@ from ui.theme import ( BG, SURFACE, SURFACE_LIGHT, ENTRY_BG, BORDER, ACCENT, ACCENT_LIGHT, TEXT, SUBTEXT, FONT_HERO, FONT_TITLE, FONT_REGULAR, FONT_BOLD, FONT_SMALL, FONT_SMALL_BOLD ) -from ui.components import Card, PillButton, PillChip, ModernEntry, SegmentedPill, ScrollableFrame +from ui.components import Card, CookieNoticeBanner, PillButton, PillChip, ModernEntry, SegmentedPill, ScrollableFrame from core.config import config class PlaylistTab(tk.Frame): - def __init__(self, parent, on_download_requested=None, **kwargs): + def __init__(self, parent, on_download_requested=None, on_open_settings=None, **kwargs): super().__init__(parent, bg=BG, **kwargs) self.on_download_requested = on_download_requested + self.on_open_settings = on_open_settings self._build_ui() def _build_ui(self): @@ -19,9 +20,13 @@ class PlaylistTab(tk.Frame): self.scroll_container.pack(fill="both", expand=True) scroll_frame = self.scroll_container.inner + # ── Üst Çerez Bilgilendirme Banner'ı ──────────────────────── + self.cookie_banner = CookieNoticeBanner(scroll_frame, on_open_settings=self.on_open_settings) + self.cookie_banner.pack(fill="x", padx=32, pady=(16, 0)) + # ── Ana Çalışma Kartı ──────────────────────────────────────── main_card = Card(scroll_frame, padx=24, pady=20) - main_card.pack(fill="x", padx=32, pady=(24, 14)) + main_card.pack(fill="x", padx=32, pady=(12, 14)) # 1. URL Satırı tk.Label(main_card, text="Oynatma Listesi Bağlantısı", bg=SURFACE, fg=TEXT, font=FONT_BOLD).pack(anchor="w") diff --git a/ui/tabs/settings_tab.py b/ui/tabs/settings_tab.py index 3dcf157..62b5ec0 100644 --- a/ui/tabs/settings_tab.py +++ b/ui/tabs/settings_tab.py @@ -88,6 +88,27 @@ class SettingsTab(tk.Frame): ) self.ck_seg.pack(side="right") + # Çerez Güvenlik ve Süre Uyarısı + ck_notice = tk.Frame(c_ck, bg=ACCENT_MUTED, highlightthickness=1, highlightbackground=BORDER, padx=12, pady=10) + ck_notice.pack(fill="x", pady=(12, 4)) + + notice_header = tk.Frame(ck_notice, bg=ACCENT_MUTED) + notice_header.pack(fill="x") + tk.Label(notice_header, text="⚠️", bg=ACCENT_MUTED, font=("Segoe UI", 10)).pack(side="left", padx=(0, 6)) + tk.Label( + notice_header, + text="Önemli Çerez & Güvenlik Koruması Bildirimi", + bg=ACCENT_MUTED, fg=ACCENT_LIGHT, font=FONT_SMALL_BOLD + ).pack(side="left") + + tk.Label( + ck_notice, + text="• YouTube oturum çerezleri güvenlik sebebiyle en fazla 30 dakikada bir yenilenmelidir.\n" + "• Windows App-Bound koruması sebebiyle Chromium tabanlı tarayıcılardan (Chrome, Edge, Brave, Opera vb.) otomatik çerez çekimi geçici olarak desteklenmemektedir.\n" + "• Çerezle indirme için Firefox, Zen Browser profillerini kullanabilir veya tarayıcınızdan 'Get cookies.txt locally' eklentisiyle aldığınız cookies.txt dosyasını yükleyebilirsiniz.", + bg=ACCENT_MUTED, fg=TEXT, font=FONT_SMALL, justify="left", anchor="w" + ).pack(fill="x", pady=(4, 0)) + # Tarayıcı alanı self.browser_frame = tk.Frame(c_ck, bg=SURFACE) b_sel_row = tk.Frame(self.browser_frame, bg=SURFACE) diff --git a/ui/tabs/single_tab.py b/ui/tabs/single_tab.py index 26739ed..0771df0 100644 --- a/ui/tabs/single_tab.py +++ b/ui/tabs/single_tab.py @@ -4,17 +4,18 @@ from ui.theme import ( BG, SURFACE, SURFACE_LIGHT, ENTRY_BG, BORDER, ACCENT, ACCENT_LIGHT, TEXT, SUBTEXT, MUTED, FONT_HERO, FONT_TITLE, FONT_SUBTITLE, FONT_REGULAR, FONT_BOLD, FONT_SMALL, FONT_SMALL_BOLD ) -from ui.components import Card, PillButton, PillChip, ModernEntry, SegmentedPill, VideoPreviewCard, ScrollableFrame +from ui.components import Card, CookieNoticeBanner, PillButton, PillChip, ModernEntry, SegmentedPill, VideoPreviewCard, ScrollableFrame from core.config import config from core.metadata import fetch_video_metadata from core.dependencies import resolve_cookies_args class SingleTab(tk.Frame): - def __init__(self, parent, on_download_requested=None, on_switch_to_playlist=None, **kwargs): + def __init__(self, parent, on_download_requested=None, on_switch_to_playlist=None, on_open_settings=None, **kwargs): super().__init__(parent, bg=BG, **kwargs) self.on_download_requested = on_download_requested self.on_switch_to_playlist = on_switch_to_playlist + self.on_open_settings = on_open_settings self.current_metadata = None self._metadata_url = "" self._metadata_request_id = 0 @@ -27,9 +28,13 @@ class SingleTab(tk.Frame): self.scroll_container.pack(fill="both", expand=True) scroll_frame = self.scroll_container.inner + # ── Üst Çerez Bilgilendirme Banner'ı ──────────────────────── + self.cookie_banner = CookieNoticeBanner(scroll_frame, on_open_settings=self.on_open_settings) + self.cookie_banner.pack(fill="x", padx=32, pady=(16, 0)) + # ── Ana Çalışma Kartı ──────────────────────────────────────── main_card = Card(scroll_frame, padx=24, pady=20) - main_card.pack(fill="x", padx=32, pady=(24, 14)) + main_card.pack(fill="x", padx=32, pady=(12, 14)) self.main_card = main_card # 1. URL Satırı