diff options
Diffstat (limited to 'common/src/lib.rs')
| -rw-r--r-- | common/src/lib.rs | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/common/src/lib.rs b/common/src/lib.rs index aa9da2c..38b0d05 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -5,6 +5,7 @@ */ #![feature(array_try_map)] pub mod routes; +pub mod user; use jellyobject::{Object, Registry, Tag, TypedTag, enums, fields}; pub use jellystream_types as stream; use std::sync::LazyLock; @@ -15,20 +16,26 @@ pub static TAGREG: LazyLock<Registry> = LazyLock::new(|| { let mut reg = Registry::default(); register_fields(&mut reg); register_enums(&mut reg); + user::register_fields(&mut reg); reg }); +#[test] +fn check_tag_conflicts() { + let _ = &*TAGREG; +} + fields! { - // Tag counter: 39 + // Tag counter: 40 NO_KIND: Tag = 1 "kind"; NO_TITLE: &str = 2 "title"; NO_PARENT: u64 = 3 "parent"; // multi - NO_SUBTITLE: &str = 37 "subtitle"; + NO_SUBTITLE: &str = 38 "subtitle"; NO_TAGLINE: &str = 4 "tagline"; NO_DESCRIPTION: &str = 5 "description"; NO_RELEASEDATE: i64 = 6 "releasedate"; - NO_DURATION: f64 = 37 "duration"; + NO_DURATION: f64 = 39 "duration"; NO_INDEX: u64 = 7 "index"; NO_SEASON_INDEX: u64 = 8 "season_index"; NO_TRACK: Object = 9 "track"; // multi @@ -68,10 +75,10 @@ fields! { LANG_NATIVE: &str = 0xa001 "native"; LANG_ENG: &str = 0xa002 "eng"; LANG_DEU: &str = 0xa003 "deu"; - LANG_JPN: &str = 0xa003 "jpn"; + LANG_JPN: &str = 0xa004 "jpn"; PICT_COVER: &str = 0xd001 "cover"; - PICT_BACKDROP: &str = 0xd001 "backdrop"; + PICT_BACKDROP: &str = 0xd002 "backdrop"; RTYP_IMDB: f64 = 0xf001 "imdb"; RTYP_TMDB: f64 = 0xf002 "tmdb"; @@ -114,10 +121,10 @@ enums! { VISI_REDUCED = 0xe002 "reduced"; VISI_VISIBLE = 0xe003 "visible"; - TRKIND_VIDEO = 0x1001 "video"; - TRKIND_AUDIO = 0x1002 "audio"; - TRKIND_TEXT = 0x1003 "text"; - TRKIND_UNKNOWN = 0x1004 "unknown"; + TRKIND_VIDEO = 0x3001 "video"; + TRKIND_AUDIO = 0x3002 "audio"; + TRKIND_TEXT = 0x3003 "text"; + TRKIND_UNKNOWN = 0x3004 "unknown"; KIND_MOVIE = 0xb001 "movie"; KIND_VIDEO = 0xb002 "video"; |