fix: human-readable watch medium labels in classic HTML (Media Server, Physical Media)

This commit is contained in:
2026-07-10 00:44:23 +02:00
parent 081a20ae31
commit c8f93bdd35
2 changed files with 15 additions and 1 deletions

View File

@@ -43,7 +43,7 @@
{% endfor %}
</div>
{% if let Some(wm) = entry.review().watch_medium() %}
<span class="watch-medium">{{ wm }}</span>
<span class="watch-medium">{{ wm.label() }}</span>
{% endif %}
{% if let Some(comment) = entry.review().comment() %}
<div class="comment">{{ comment.value() }}</div>

View File

@@ -28,6 +28,20 @@ impl fmt::Display for WatchMedium {
}
}
impl WatchMedium {
pub fn label(&self) -> &'static str {
match self {
Self::Cinema => "Cinema",
Self::Streaming => "Streaming",
Self::TV => "TV",
Self::PhysicalMedia => "Physical Media",
Self::Download => "Download",
Self::MediaServer => "Media Server",
Self::Other => "Other",
}
}
}
impl FromStr for WatchMedium {
type Err = DomainError;