From 29acd86f842236c080f4143fc6b45240f0b1eed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 30 Dec 2024 20:48:33 +0200 Subject: [PATCH] Remove PlexGuidProvider prefix from class names --- plextraktsync/plex/guid/provider/Factory.py | 24 +++++++++---------- .../{PlexGuidProviderIMDB.py => IMDB.py} | 2 +- .../{PlexGuidProviderLocal.py => Local.py} | 2 +- .../{PlexGuidProviderMbid.py => Mbid.py} | 2 +- .../{PlexGuidProviderTMDB.py => TMDB.py} | 2 +- .../{PlexGuidProviderTVDB.py => TVDB.py} | 2 +- ...{PlexGuidProviderYoutube.py => Youtube.py} | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) rename plextraktsync/plex/guid/provider/{PlexGuidProviderIMDB.py => IMDB.py} (93%) rename plextraktsync/plex/guid/provider/{PlexGuidProviderLocal.py => Local.py} (92%) rename plextraktsync/plex/guid/provider/{PlexGuidProviderMbid.py => Mbid.py} (95%) rename plextraktsync/plex/guid/provider/{PlexGuidProviderTMDB.py => TMDB.py} (97%) rename plextraktsync/plex/guid/provider/{PlexGuidProviderTVDB.py => TVDB.py} (93%) rename plextraktsync/plex/guid/provider/{PlexGuidProviderYoutube.py => Youtube.py} (93%) diff --git a/plextraktsync/plex/guid/provider/Factory.py b/plextraktsync/plex/guid/provider/Factory.py index d9aaa6d7381..146599fd952 100644 --- a/plextraktsync/plex/guid/provider/Factory.py +++ b/plextraktsync/plex/guid/provider/Factory.py @@ -2,12 +2,12 @@ from typing import TYPE_CHECKING -from .PlexGuidProviderIMDB import PlexGuidProviderIMDB -from .PlexGuidProviderLocal import PlexGuidProviderLocal -from .PlexGuidProviderMbid import PlexGuidProviderMbid -from .PlexGuidProviderTMDB import PlexGuidProviderTMDB -from .PlexGuidProviderTVDB import PlexGuidProviderTVDB -from .PlexGuidProviderYoutube import PlexGuidProviderYoutube +from .IMDB import IMDB +from .Local import Local +from .Mbid import Mbid +from .TMDB import TMDB +from .TVDB import TVDB +from .Youtube import Youtube if TYPE_CHECKING: from plextraktsync.plex.PlexGuid import PlexGuid @@ -17,16 +17,16 @@ class Factory: @classmethod def create(cls, guid: PlexGuid): if guid.provider == "imdb": - return PlexGuidProviderIMDB(guid) + return IMDB(guid) if guid.provider == "tmdb": - return PlexGuidProviderTMDB(guid) + return TMDB(guid) if guid.provider == "tvdb": - return PlexGuidProviderTVDB(guid) + return TVDB(guid) if guid.provider == "mbid": - return PlexGuidProviderMbid(guid) + return Mbid(guid) if guid.provider == "youtube": - return PlexGuidProviderYoutube(guid) + return Youtube(guid) if guid.provider in ["local", "none"]: - return PlexGuidProviderLocal(guid) + return Local(guid) raise RuntimeError(f"Unsupported provider: {guid.provider}") diff --git a/plextraktsync/plex/guid/provider/PlexGuidProviderIMDB.py b/plextraktsync/plex/guid/provider/IMDB.py similarity index 93% rename from plextraktsync/plex/guid/provider/PlexGuidProviderIMDB.py rename to plextraktsync/plex/guid/provider/IMDB.py index a3c11e88b63..780d91ce0c3 100644 --- a/plextraktsync/plex/guid/provider/PlexGuidProviderIMDB.py +++ b/plextraktsync/plex/guid/provider/IMDB.py @@ -6,7 +6,7 @@ from plextraktsync.plex.PlexGuid import PlexGuid -class PlexGuidProviderIMDB: +class IMDB: def __init__(self, guid: PlexGuid): self.guid = guid diff --git a/plextraktsync/plex/guid/provider/PlexGuidProviderLocal.py b/plextraktsync/plex/guid/provider/Local.py similarity index 92% rename from plextraktsync/plex/guid/provider/PlexGuidProviderLocal.py rename to plextraktsync/plex/guid/provider/Local.py index f93e52edcd9..a097cdb6e87 100644 --- a/plextraktsync/plex/guid/provider/PlexGuidProviderLocal.py +++ b/plextraktsync/plex/guid/provider/Local.py @@ -6,7 +6,7 @@ from plextraktsync.plex.PlexGuid import PlexGuid -class PlexGuidProviderLocal: +class Local: def __init__(self, guid: PlexGuid): self.guid = guid diff --git a/plextraktsync/plex/guid/provider/PlexGuidProviderMbid.py b/plextraktsync/plex/guid/provider/Mbid.py similarity index 95% rename from plextraktsync/plex/guid/provider/PlexGuidProviderMbid.py rename to plextraktsync/plex/guid/provider/Mbid.py index 3abdacdcf18..290c2974cfe 100644 --- a/plextraktsync/plex/guid/provider/PlexGuidProviderMbid.py +++ b/plextraktsync/plex/guid/provider/Mbid.py @@ -6,7 +6,7 @@ from plextraktsync.plex.PlexGuid import PlexGuid -class PlexGuidProviderMbid: +class Mbid: def __init__(self, guid: PlexGuid): self.guid = guid diff --git a/plextraktsync/plex/guid/provider/PlexGuidProviderTMDB.py b/plextraktsync/plex/guid/provider/TMDB.py similarity index 97% rename from plextraktsync/plex/guid/provider/PlexGuidProviderTMDB.py rename to plextraktsync/plex/guid/provider/TMDB.py index e3695fb2c04..bee1a5c0bf8 100644 --- a/plextraktsync/plex/guid/provider/PlexGuidProviderTMDB.py +++ b/plextraktsync/plex/guid/provider/TMDB.py @@ -6,7 +6,7 @@ from plextraktsync.plex.PlexGuid import PlexGuid -class PlexGuidProviderTMDB: +class TMDB: url = "https://www.themoviedb.org" def __init__(self, guid: PlexGuid): diff --git a/plextraktsync/plex/guid/provider/PlexGuidProviderTVDB.py b/plextraktsync/plex/guid/provider/TVDB.py similarity index 93% rename from plextraktsync/plex/guid/provider/PlexGuidProviderTVDB.py rename to plextraktsync/plex/guid/provider/TVDB.py index 67feae0a752..a35cbc2d97a 100644 --- a/plextraktsync/plex/guid/provider/PlexGuidProviderTVDB.py +++ b/plextraktsync/plex/guid/provider/TVDB.py @@ -6,7 +6,7 @@ from plextraktsync.plex.PlexGuid import PlexGuid -class PlexGuidProviderTVDB: +class TVDB: def __init__(self, guid: PlexGuid): self.guid = guid diff --git a/plextraktsync/plex/guid/provider/PlexGuidProviderYoutube.py b/plextraktsync/plex/guid/provider/Youtube.py similarity index 93% rename from plextraktsync/plex/guid/provider/PlexGuidProviderYoutube.py rename to plextraktsync/plex/guid/provider/Youtube.py index 1ed1e94907a..1a0548b7550 100644 --- a/plextraktsync/plex/guid/provider/PlexGuidProviderYoutube.py +++ b/plextraktsync/plex/guid/provider/Youtube.py @@ -6,7 +6,7 @@ from plextraktsync.plex.PlexGuid import PlexGuid -class PlexGuidProviderYoutube: +class Youtube: def __init__(self, guid: PlexGuid): self.guid = guid