aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/Cargo.toml2
-rw-r--r--common/src/helpers.rs12
-rw-r--r--common/src/lib.rs8
3 files changed, 17 insertions, 5 deletions
diff --git a/common/Cargo.toml b/common/Cargo.toml
index 7e25933..51e2208 100644
--- a/common/Cargo.toml
+++ b/common/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "jellycommon"
version = "0.1.0"
-edition = "2021"
+edition = "2024"
[dependencies]
serde = { version = "1.0.228", features = ["derive", "rc"] }
diff --git a/common/src/helpers.rs b/common/src/helpers.rs
index d643aa6..20042e9 100644
--- a/common/src/helpers.rs
+++ b/common/src/helpers.rs
@@ -92,7 +92,10 @@ impl Display for IdentifierType {
IdentifierType::MusicbrainzRelease => "musicbrainz_release",
IdentifierType::MusicbrainzReleaseGroup => "musicbrainz_release_group",
IdentifierType::Isrc => "isrc",
- IdentifierType::Trakt => "trakt",
+ IdentifierType::TraktEpisode => "trakt_episode",
+ IdentifierType::TraktMovie => "trakt_movie",
+ IdentifierType::TraktSeason => "trakt_season",
+ IdentifierType::TraktShow => "trakt_show",
IdentifierType::Imdb => "imdb",
IdentifierType::Tmdb => "tmdb",
IdentifierType::Tvdb => "tvdb",
@@ -103,6 +106,7 @@ impl Display for IdentifierType {
IdentifierType::Barcode => "barcode",
IdentifierType::AcoustIdTrack => "acoustid_track",
IdentifierType::Bandcamp => "bandcamp",
+ IdentifierType::VgmdbArtist => "vgmdb_artist",
})
}
}
@@ -115,7 +119,10 @@ impl FromStr for IdentifierType {
"musicbrainz_release" => IdentifierType::MusicbrainzRelease,
"musicbrainz_release_group" => IdentifierType::MusicbrainzReleaseGroup,
"isrc" => IdentifierType::Isrc,
- "trakt" => IdentifierType::Trakt,
+ "trakt_episode" => IdentifierType::TraktEpisode,
+ "trakt_movie" => IdentifierType::TraktMovie,
+ "trakt_season" => IdentifierType::TraktSeason,
+ "trakt_show" => IdentifierType::TraktShow,
"imdb" => IdentifierType::Imdb,
"tmdb" => IdentifierType::Tmdb,
"tvdb" => IdentifierType::Tvdb,
@@ -125,6 +132,7 @@ impl FromStr for IdentifierType {
"youtube_channel_handle" => IdentifierType::YoutubeChannelHandle,
"barcode" => IdentifierType::Barcode,
"acoustid_track" => IdentifierType::AcoustIdTrack,
+ "vgmdb_artist" => IdentifierType::VgmdbArtist,
_ => return Err(()),
})
}
diff --git a/common/src/lib.rs b/common/src/lib.rs
index 670d9af..5e2134f 100644
--- a/common/src/lib.rs
+++ b/common/src/lib.rs
@@ -17,7 +17,7 @@ pub use chrono;
use serde::{Deserialize, Serialize};
use std::{
- collections::{BTreeMap, BTreeSet},
+ collections::{BTreeMap, BTreeSet, HashSet},
path::PathBuf,
};
@@ -97,11 +97,15 @@ pub enum IdentifierType {
Bandcamp,
Isrc,
Barcode,
- Trakt,
+ TraktMovie,
+ TraktShow,
+ TraktSeason,
+ TraktEpisode,
Imdb,
Tmdb,
Tvdb,
Omdb,
+ VgmdbArtist,
}
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, Hash)]