diff --git a/.gitignore b/.gitignore index 3a2891d..53f7f59 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,7 @@ tmp/ test_*.py test_release.zip test_release/ +DiscoReaper-* REAPER-*/ Reaper-*/ diff --git a/src/core/configuration.py b/src/core/configuration.py index 5c8f9d2..a8f8281 100644 --- a/src/core/configuration.py +++ b/src/core/configuration.py @@ -101,18 +101,18 @@ def save_config(config: AppConfig, config_path: Union[str, Path] = "config.yaml" yaml.safe_dump(data, f, default_flow_style=False, sort_keys=False) def get_available_configs() -> list[str]: - """Returns a list of available configuration names from `Reaper-*` folders.""" + """Returns a list of available configuration names from `ReaperFiles-*` folders.""" configs = [] for item in Path(".").iterdir(): - if item.is_dir() and item.name.startswith("Reaper-"): - config_name = item.name[len("Reaper-"):] + if item.is_dir() and item.name.startswith("ReaperFiles-"): + config_name = item.name[len("ReaperFiles-"):] if (item / "config.yaml").exists(): configs.append(config_name) return sorted(configs) def create_new_config(name: str) -> Path: """Creates a new configuration folder and default config file.""" - folder_path = Path(f"Reaper-{name}") + folder_path = Path(f"ReaperFiles-{name}") folder_path.mkdir(exist_ok=True) config_path = folder_path / "config.yaml" load_config(config_path) # creates default diff --git a/src/ui/backup_ops.py b/src/ui/backup_ops.py index 5a4fb26..f66178d 100644 --- a/src/ui/backup_ops.py +++ b/src/ui/backup_ops.py @@ -50,8 +50,8 @@ class BackupPane(Container): self.cfg_name = cfg_name self.config_path = cfg_path self.config = load_config(cfg_path) - self.engine = MigrationContext(self.config, target_platform=self.config.target_platform or "fluxer", base_dir=f"Reaper-{self.cfg_name}") - self.exporter = DiscordExporter(self.engine.discord_reader, base_dir=f"Reaper-{self.cfg_name}") + self.engine = MigrationContext(self.config, target_platform=self.config.target_platform or "fluxer", base_dir=f"ReaperFiles-{self.cfg_name}") + self.exporter = DiscordExporter(self.engine.discord_reader, base_dir=f"ReaperFiles-{self.cfg_name}") def compose(self) -> ComposeResult: with VerticalScroll(): @@ -82,8 +82,8 @@ class BackupPane(Container): def reload_config(self) -> None: self.config = load_config(self.config_path) - self.engine = MigrationContext(self.config, target_platform=self.config.target_platform or "fluxer", base_dir=f"Reaper-{self.cfg_name}") - self.exporter = DiscordExporter(self.engine.discord_reader, base_dir=f"Reaper-{self.cfg_name}") + self.engine = MigrationContext(self.config, target_platform=self.config.target_platform or "fluxer", base_dir=f"ReaperFiles-{self.cfg_name}") + self.exporter = DiscordExporter(self.engine.discord_reader, base_dir=f"ReaperFiles-{self.cfg_name}") self._validate() # ── validation ──────────────────────────────────────────────────────── @@ -113,7 +113,7 @@ class BackupPane(Container): self._update_ui(f"[red]Error: {e}[/red]", "", "", False) def _get_backup_info(self) -> str | None: - profile_file = Path(f"Reaper-{self.cfg_name}") / "server_profile" / "profile.json" + profile_file = Path(f"ReaperFiles-{self.cfg_name}") / "server_profile" / "profile.json" if profile_file.exists(): try: with open(profile_file, "r", encoding="utf-8") as f: diff --git a/src/ui/main_app.py b/src/ui/main_app.py index 8f73751..3c1f08f 100644 --- a/src/ui/main_app.py +++ b/src/ui/main_app.py @@ -16,7 +16,7 @@ from src.core.configuration import ( # ────────────────────────────────────────────────────────────────────────────── -# Modal: create a new Reaper-* config folder +# Modal: create a new ReaperFiles-* config folder # ────────────────────────────────────────────────────────────────────────────── class NewConfigModal(ModalScreen[str]): @@ -63,7 +63,7 @@ class NewConfigModal(ModalScreen[str]): # ────────────────────────────────────────────────────────────────────────────── -# Screen 1: pick (or create) a Reaper-* config +# Screen 1: pick (or create) a ReaperFiles-* config # ────────────────────────────────────────────────────────────────────────────── class ConfigSelectionScreen(Screen): @@ -109,11 +109,11 @@ class ConfigSelectionScreen(Screen): lv = self.query_one("#config_list", ListView) lv.clear() for c in configs: - lv.append(ListItem(Label(f"Reaper-{c}"), name=c)) + lv.append(ListItem(Label(f"ReaperFiles-{c}"), name=c)) def on_list_view_selected(self, event: ListView.Selected) -> None: cfg_name = event.item.name - cfg_path = Path(f"Reaper-{cfg_name}") / "config.yaml" + cfg_path = Path(f"ReaperFiles-{cfg_name}") / "config.yaml" from src.ui.mode_screen import ModeScreen self.app.push_screen(ModeScreen(cfg_name, cfg_path)) @@ -124,7 +124,7 @@ class ConfigSelectionScreen(Screen): create_new_config(name) self.refresh_configs() # Immediately open the ConfigScreen for the new config - cfg_path = Path(f"Reaper-{name}") / "config.yaml" + cfg_path = Path(f"ReaperFiles-{name}") / "config.yaml" def on_config_saved(saved: bool = False): if saved: self.refresh_configs() diff --git a/src/ui/shuttle_ops.py b/src/ui/shuttle_ops.py index 7d7bf2e..9e8307f 100644 --- a/src/ui/shuttle_ops.py +++ b/src/ui/shuttle_ops.py @@ -146,7 +146,7 @@ class ShuttlePane(Container): self.run_validate() def _base_dir(self) -> str: - return f"Reaper-{self.cfg_name}" + return f"ReaperFiles-{self.cfg_name}" def _rebuild_engine(self): source = "backup" if self.config.tool_mode == "backup_transfer" else "live" @@ -793,7 +793,7 @@ class ShuttlePane(Container): modal.set_status(f"Fetching {platform_name} channels...") full_f = await self.engine.writer.get_channels() - f_channels = [c for c in full_f if c.get("name") not in ["reaper_logs", "reaper-logs"] and c.get("type") not in [2, 4]] + f_channels = [c for c in full_f if c.get("name") not in ["reaper_logs", "ReaperFiles-logs"] and c.get("type") not in [2, 4]] if not f_channels: modal.write(f"[yellow]No channels found in {platform_name} community.[/yellow]") @@ -1132,7 +1132,7 @@ class ShuttlePane(Container): try: if "dz_del_channels" in selections or "dz_reset_perms" in selections: channels_raw = await writer.get_channels() - protected = ["reaper-logs", "reaper_logs"] + protected = ["ReaperFiles-logs", "reaper_logs"] channel_names = [ c.get("name", "Unknown") for c in channels_raw if c.get("type") != 4 and str(c.get("name", "")).lower() not in protected