Skip to content

Commit

Permalink
Merge pull request #16 from zeroquinc:plex-seasons
Browse files Browse the repository at this point in the history
fix: plex season embed title
  • Loading branch information
zeroquinc authored May 31, 2024
2 parents 6fde996 + ef2ef1a commit 23dcec1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions api/plex/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,14 @@ def embed_for_newcontent(self):
if self.poster_url:
embed.set_thumbnail(url=self.poster_url)
if self.webhook_type == 'newcontent_season':
embed.add_field(name="Season", value=f"Season {self.season_num00}", inline=True)
embed.add_field(name="Episodes", value=f"{self.episode_count}", inline=True)
embed.set_author(name=f"New {self.media_type.capitalize()} added to Plex", icon_url=PLEX_ICON)
return embed

def get_newcontent_title(self):
titles = {
'newcontent_episode': f"{self.title} (S{self.season_num00}E{self.episode_num00})",
'newcontent_season': f"{self.title} - Season {self.season_num00}",
'newcontent_season': f"{self.title}",
'newcontent_movie': f"{self.title} ({self.year})"
}
return titles.get(self.webhook_type, self.title)
Expand Down

0 comments on commit 23dcec1

Please sign in to comment.