From 2faed982d95e2f5eac41caaca090ea6ce9f6115b Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Sun, 19 Dec 2021 09:56:13 -0500 Subject: [PATCH] Fixed issues with release_info for some providers. #1644 --- libs/subliminal_patch/providers/betaseries.py | 5 +---- libs/subliminal_patch/providers/bsplayer.py | 5 +---- libs/subliminal_patch/providers/greeksubtitles.py | 1 + libs/subliminal_patch/providers/ktuvit.py | 5 +---- libs/subliminal_patch/providers/legendasdivx.py | 5 +---- libs/subliminal_patch/providers/napisy24.py | 1 + libs/subliminal_patch/providers/nekur.py | 1 + libs/subliminal_patch/providers/regielive.py | 5 +---- libs/subliminal_patch/providers/subtitriid.py | 1 + libs/subliminal_patch/providers/wizdom.py | 5 +---- libs/subliminal_patch/providers/xsubs.py | 1 + 11 files changed, 11 insertions(+), 24 deletions(-) diff --git a/libs/subliminal_patch/providers/betaseries.py b/libs/subliminal_patch/providers/betaseries.py index 65530ed66..ea4d248e8 100644 --- a/libs/subliminal_patch/providers/betaseries.py +++ b/libs/subliminal_patch/providers/betaseries.py @@ -36,6 +36,7 @@ class BetaSeriesSubtitle(Subtitle): self.matches = matches self.source = source self.video_release_group = video_release_group + self.release_info = video_name @property def id(self): @@ -45,10 +46,6 @@ class BetaSeriesSubtitle(Subtitle): def download_link(self): return self.download_url - @property - def release_info(self): - return self.video_name - def get_matches(self, video): matches = self.matches diff --git a/libs/subliminal_patch/providers/bsplayer.py b/libs/subliminal_patch/providers/bsplayer.py index 9b44089fe..33de75f0d 100644 --- a/libs/subliminal_patch/providers/bsplayer.py +++ b/libs/subliminal_patch/providers/bsplayer.py @@ -36,15 +36,12 @@ class BSPlayerSubtitle(Subtitle): self.subtype = subtype self.video = video self.subid = subid + self.release_info = filename @property def id(self): return self.subid - @property - def release_info(self): - return self.filename - def get_matches(self, video): matches = set() matches |= guess_matches(video, guessit(self.filename)) diff --git a/libs/subliminal_patch/providers/greeksubtitles.py b/libs/subliminal_patch/providers/greeksubtitles.py index 7ee26efce..90960d65b 100644 --- a/libs/subliminal_patch/providers/greeksubtitles.py +++ b/libs/subliminal_patch/providers/greeksubtitles.py @@ -28,6 +28,7 @@ class GreekSubtitlesSubtitle(Subtitle): self.download_link = download_link self.hearing_impaired = None self.encoding = 'windows-1253' + self.release_info = version @property def id(self): diff --git a/libs/subliminal_patch/providers/ktuvit.py b/libs/subliminal_patch/providers/ktuvit.py index 56c713c63..9bb746547 100644 --- a/libs/subliminal_patch/providers/ktuvit.py +++ b/libs/subliminal_patch/providers/ktuvit.py @@ -50,6 +50,7 @@ class KtuvitSubtitle(Subtitle): self.ktuvit_id = ktuvit_id self.subtitle_id = subtitle_id self.release = release + self.release_info = release def __repr__(self): return "<%s [%s] %r [%s:%s]>" % ( @@ -64,10 +65,6 @@ class KtuvitSubtitle(Subtitle): def id(self): return str(self.subtitle_id) - @property - def release_info(self): - return self.release - def get_matches(self, video): matches = set() # episode diff --git a/libs/subliminal_patch/providers/legendasdivx.py b/libs/subliminal_patch/providers/legendasdivx.py index d72b762b4..2f7ac60e7 100644 --- a/libs/subliminal_patch/providers/legendasdivx.py +++ b/libs/subliminal_patch/providers/legendasdivx.py @@ -42,15 +42,12 @@ class LegendasdivxSubtitle(Subtitle): self.uploader = data['uploader'] self.wrong_fps = False self.skip_wrong_fps = skip_wrong_fps + self.release_info = self.description @property def id(self): return self.page_link - @property - def release_info(self): - return self.description - def get_matches(self, video): matches = set() diff --git a/libs/subliminal_patch/providers/napisy24.py b/libs/subliminal_patch/providers/napisy24.py index 337c1fb87..c4c31281b 100644 --- a/libs/subliminal_patch/providers/napisy24.py +++ b/libs/subliminal_patch/providers/napisy24.py @@ -26,6 +26,7 @@ class Napisy24Subtitle(Subtitle): self.hash = hash self.imdb_id = imdb_id self.napis_id = napis_id + self.release_info = '' # TODO Try to get the release info from parsing the page @property def id(self): diff --git a/libs/subliminal_patch/providers/nekur.py b/libs/subliminal_patch/providers/nekur.py index 096c34abd..e91043202 100644 --- a/libs/subliminal_patch/providers/nekur.py +++ b/libs/subliminal_patch/providers/nekur.py @@ -39,6 +39,7 @@ class NekurSubtitle(Subtitle): self.fps = fps self.notes = notes self.matches = None + self.release_info = notes @property def id(self): diff --git a/libs/subliminal_patch/providers/regielive.py b/libs/subliminal_patch/providers/regielive.py index 91853f790..b35ae5c36 100644 --- a/libs/subliminal_patch/providers/regielive.py +++ b/libs/subliminal_patch/providers/regielive.py @@ -29,15 +29,12 @@ class RegieLiveSubtitle(Subtitle): self.video = video self.rating = rating self.language = language + self.release_info = filename @property def id(self): return self.page_link - @property - def release_info(self): - return self.filename - def get_matches(self, video): type_ = "movie" if isinstance(video, Movie) else "episode" matches = set() diff --git a/libs/subliminal_patch/providers/subtitriid.py b/libs/subliminal_patch/providers/subtitriid.py index 99062496f..10cadce1a 100644 --- a/libs/subliminal_patch/providers/subtitriid.py +++ b/libs/subliminal_patch/providers/subtitriid.py @@ -35,6 +35,7 @@ class SubtitriIdSubtitle(Subtitle): self.year = year self.imdb_id = imdb_id self.matches = None + self.release_info = '' # TODO Try to get the release info from parsing the page @property def id(self): diff --git a/libs/subliminal_patch/providers/wizdom.py b/libs/subliminal_patch/providers/wizdom.py index f6ef2498e..ba8833707 100644 --- a/libs/subliminal_patch/providers/wizdom.py +++ b/libs/subliminal_patch/providers/wizdom.py @@ -35,15 +35,12 @@ class WizdomSubtitle(Subtitle): self.imdb_id = imdb_id self.subtitle_id = subtitle_id self.release = release + self.release_info = release @property def id(self): return str(self.subtitle_id) - @property - def release_info(self): - return self.release - def get_matches(self, video): matches = set() # episode diff --git a/libs/subliminal_patch/providers/xsubs.py b/libs/subliminal_patch/providers/xsubs.py index 70fc47760..c7f166390 100644 --- a/libs/subliminal_patch/providers/xsubs.py +++ b/libs/subliminal_patch/providers/xsubs.py @@ -39,6 +39,7 @@ class XSubsSubtitle(Subtitle): self.download_link = download_link self.hearing_impaired = None self.encoding = 'windows-1253' + self.release_info = version @property def id(self):