import kivy from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.uix.button import Button from kivy.uix.textinput import TextInput from kivy.uix.label import Label import subprocess # gallery-dl kütüphanesini kullanmak için import edildi class GalleryDLApp(App): def build(self): self.layout = BoxLayout(orientation='vertical', padding=10, spacing=10) self.url_input = TextInput(hint_text='Enter URL', size_hint=(1, 0.1)) self.layout.add_widget(self.url_input) self.download_button = Button(text='Download', size_hint=(1, 0.1)) self.download_button.bind(on_press=self.download) self.layout.add_widget(self.download_button) self.status_label = Label(text='', size_hint=(1, 0.1)) self.layout.add_widget(self.status_label) return self.layout def download(self, instance): url = self.url_input.text if url: try: result = subprocess.run(['gallery-dl', url], capture_output=True, text=True, check=True) self.status_label.text = result.stdout except subprocess.CalledProcessError as e: self.status_label.text = f'Error: {e.stderr}' if __name__ == '__main__': GalleryDLApp().run()