Add icon and fix some problems

This commit is contained in:
Jeena 2025-06-01 16:15:32 +09:00
parent 86bf8750de
commit 204218c8bb
6 changed files with 19 additions and 9 deletions

View file

@ -11,7 +11,7 @@ Adw.init()
class RecoderApp(Adw.Application):
def __init__(self):
super().__init__(application_id="net.jeena.recoder",
super().__init__(application_id="net.jeena.Recoder",
flags=Gio.ApplicationFlags.FLAGS_NONE)
self.window = None

View file

@ -34,15 +34,15 @@ class TranscoderWorker:
def _process_files(self):
total = len(self.files)
for idx, filepath in enumerate(self.files, start=1):
for idx, filepath in enumerate(self.files):
basename = os.path.basename(filepath)
self._update_progress(f"Processing {basename} ({idx}/{total})...", idx / total)
success, output_path = transcode_file(filepath, os.path.join(os.path.dirname(filepath), "transcoded"))
if not success:
self._update_progress(f"Error transcoding {basename}", idx / total)
self._update_progress(f"Error transcoding {basename}", idx + 1 / total)
else:
self._update_progress(f"Finished {basename}", idx / total)
self._update_progress(f"Finished {basename}", idx + 1 / total)
self.is_processing = False
self._update_progress("All done!", 1.0)