From 249071a1d1f6f38766d65110139ab3804ab44631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 9 Oct 2023 14:05:13 +0300 Subject: [PATCH] Skip creating empty default server --- plextraktsync/config/ServerConfigFactory.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plextraktsync/config/ServerConfigFactory.py b/plextraktsync/config/ServerConfigFactory.py index a0d624fa28..3811107e59 100644 --- a/plextraktsync/config/ServerConfigFactory.py +++ b/plextraktsync/config/ServerConfigFactory.py @@ -41,6 +41,10 @@ def load(self): def migrate(self): from plextraktsync.factory import factory config = factory.config + + if not config["PLEX_BASEURL"]: + return + self.add_server( name="default", urls=[ @@ -52,6 +56,7 @@ def migrate(self): self.save() config["PLEX_SERVER"] = "default" config.save() + logger = factory.logger logger.warning(f"Added default server to {self.config_path}")