Skip to content

Commit

Permalink
show season additional_title if helpful
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name authored and alphatownsman committed Jul 16, 2024
1 parent 4707343 commit 8778100
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions catalog/templates/tvseason.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
{% load thumb %}
<!-- class specific details -->
{% block details %}
<div>{% include '_people.html' with people=item.additional_title role='' max=99 %}</div>
{% with item.all_seasons as seasons %}
{% if seasons %}
<div>
Expand Down
10 changes: 10 additions & 0 deletions catalog/tv/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,16 @@ def display_title(self):
return f"{self.parent_item.display_title} {s}"
return s

@cached_property
def additional_title(self) -> list[str]:
title = self.display_title
return [
t["text"]
for t in self.localized_title
if t["text"] != title
and RE_LOCALIZED_SEASON_NUMBERS.sub("", t["text"]) != ""
]

def update_linked_items_from_external_resource(self, resource):
for w in resource.required_resources:
if w["model"] == "TVShow":
Expand Down

0 comments on commit 8778100

Please sign in to comment.