Skip to content

Commit

Permalink
Fixed issues with release_info for some providers. #1644
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus65535 committed Dec 19, 2021
1 parent 46a8bd2 commit 2faed98
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 24 deletions.
5 changes: 1 addition & 4 deletions libs/subliminal_patch/providers/betaseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def __init__(self, subtitle_id, language, video_name, url, matches, source, vide
self.matches = matches
self.source = source
self.video_release_group = video_release_group
self.release_info = video_name

@property
def id(self):
Expand All @@ -45,10 +46,6 @@ def id(self):
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

Expand Down
5 changes: 1 addition & 4 deletions libs/subliminal_patch/providers/bsplayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,12 @@ def __init__(self, language, filename, subtype, video, link, subid):
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))
Expand Down
1 change: 1 addition & 0 deletions libs/subliminal_patch/providers/greeksubtitles.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(self, language, page_link, version, download_link):
self.download_link = download_link
self.hearing_impaired = None
self.encoding = 'windows-1253'
self.release_info = version

@property
def id(self):
Expand Down
5 changes: 1 addition & 4 deletions libs/subliminal_patch/providers/ktuvit.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def __init__(
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]>" % (
Expand All @@ -64,10 +65,6 @@ def __repr__(self):
def id(self):
return str(self.subtitle_id)

@property
def release_info(self):
return self.release

def get_matches(self, video):
matches = set()
# episode
Expand Down
5 changes: 1 addition & 4 deletions libs/subliminal_patch/providers/legendasdivx.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,12 @@ def __init__(self, language, video, data, skip_wrong_fps=True):
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()

Expand Down
1 change: 1 addition & 0 deletions libs/subliminal_patch/providers/napisy24.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def __init__(self, language, hash, imdb_id, napis_id):
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):
Expand Down
1 change: 1 addition & 0 deletions libs/subliminal_patch/providers/nekur.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def __init__(self, language, page_link, download_link, title, year, imdb_id, fps
self.fps = fps
self.notes = notes
self.matches = None
self.release_info = notes

@property
def id(self):
Expand Down
5 changes: 1 addition & 4 deletions libs/subliminal_patch/providers/regielive.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,12 @@ def __init__(self, filename, video, link, rating, language):
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()
Expand Down
1 change: 1 addition & 0 deletions libs/subliminal_patch/providers/subtitriid.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def __init__(self, language, page_link, download_link, title, year, imdb_id):
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):
Expand Down
5 changes: 1 addition & 4 deletions libs/subliminal_patch/providers/wizdom.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,12 @@ def __init__(self, language, hearing_impaired, page_link, series, season, episod
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
Expand Down
1 change: 1 addition & 0 deletions libs/subliminal_patch/providers/xsubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def __init__(self, language, page_link, series, season, episode, year, title, ve
self.download_link = download_link
self.hearing_impaired = None
self.encoding = 'windows-1253'
self.release_info = version

@property
def id(self):
Expand Down

0 comments on commit 2faed98

Please sign in to comment.