aboutsummaryrefslogtreecommitdiff
path: root/common/src/impl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/impl.rs')
-rw-r--r--common/src/impl.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/common/src/impl.rs b/common/src/impl.rs
index 55364ab..ff2ce22 100644
--- a/common/src/impl.rs
+++ b/common/src/impl.rs
@@ -3,7 +3,7 @@
which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
Copyright (C) 2023 metamuffin <metamuffin.org>
*/
-use crate::{SourceTrack, SourceTrackKind};
+use crate::{AssetRole, SourceTrack, SourceTrackKind};
impl SourceTrackKind {
pub fn letter(&self) -> char {
@@ -15,6 +15,15 @@ impl SourceTrackKind {
}
}
+impl AssetRole {
+ pub fn as_str(&self) -> &'static str {
+ match self {
+ AssetRole::Poster => "poster",
+ AssetRole::Backdrop => "backdrop",
+ }
+ }
+}
+
impl std::fmt::Display for SourceTrack {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let kspec = match &self.kind {