Skip to content

Commit

Permalink
Use a regex to hide anidb links.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cazzar committed Mar 13, 2019
1 parent 2748a19 commit 6a94cb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Contents/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#this is from https://github.com/plexinc-agents/PlexThemeMusic.bundle/blob/master/Contents/Code/__init__.py
THEME_URL = 'http://tvthemes.plexapp.com/%s.mp3'

LINK_REGEX = r"https?:\/\/\w+.\w+(?:\/?\w+)? \[([\w ]+)\]"

def ValidatePrefs():
pass
Expand Down Expand Up @@ -104,7 +104,7 @@ def Update(self, metadata, media, lang, force, movie):
series = HttpReq("api/serie?id=%s&level=3&allpics=1&tagfilter=%d" % (aid, flags))

# build metadata on the TV show.
metadata.summary = try_get(series, 'summary')
metadata.summary = re.sub(LINK_REGEX, r'\1', try_get(series, 'summary'))
metadata.title = series['name']
metadata.rating = float(series['rating'])
year = try_get(series, "year", None)
Expand Down

0 comments on commit 6a94cb4

Please sign in to comment.