/*
    This file is part of jellything (https://codeberg.org/metamuffin/jellything)
    which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
    Copyright (C) 2025 metamuffin <metamuffin.org>
*/

use jellyobject::{Object, Tag, enums, fields};

fields! {
    NO_KIND: Tag = b"kind";
    NO_TITLE: str = b"titl";
    NO_PARENT: u64 = b"prnt"; // multi
    NO_SUBTITLE: str = b"sbtl";
    NO_TAGLINE: str = b"tgln";
    NO_DESCRIPTION: str = b"desc";
    NO_RELEASEDATE: i64 = b"rldt";
    NO_DURATION: f64 = b"durn";
    NO_INDEX: u64 = b"indx";
    NO_SEASON_INDEX: u64 = b"sidx";
    NO_TRACK: Object = b"trak"; // multi
    NO_CHAPTER: Object = b"chpt"; // multi
    NO_TAG: str = b"tag1"; // multi
    NO_RATINGS: Object = b"rtng";
    NO_PICTURES: Object = b"pict";
    NO_IDENTIFIERS: Object = b"iden";
    NO_VISIBILITY: Tag = b"visi";
    NO_STORAGE_SIZE: u64 = b"stsz";
    NO_CREDIT: Object = b"crdt"; // multi
    NO_SLUG: str = b"slug";
    NO_METASOURCE: Object = b"msrc";

    CR_NODE: u64 = b"node";
    CR_KIND: Tag = b"kind";
    CR_ROLE: str = b"role"; // multi

    TR_KIND: Tag = b"kind";
    TR_SOURCE: Object = b"sour";
    TR_NAME: str = b"name";
    TR_CODEC: str = b"codc";
    TR_LANGUAGE: str = b"lang"; // BCP 47
    TR_RATE: f64 = b"rate";
    TR_BIT_DEPTH: u32 = b"bdep";
    TR_CHANNELS: u32 = b"chnl";
    TR_PIXEL_WIDTH: u32 = b"pwid";
    TR_PIXEL_HEIGHT: u32 = b"phei";

    TRSOURCE_LOCAL_PATH: str = b"lpat";
    TRSOURCE_LOCAL_TRACKNUM: u64 = b"ltrn";

    CH_START: f64 = b"strt";
    CH_END: f64 = b"end1";
    CH_NAME: str = b"name";

    PICT_COVER: str = b"covr";
    PICT_BACKDROP: str = b"bdro";

    RTYP_IMDB: f64 = b"imdb";
    RTYP_TMDB: f64 = b"tmdb";
    RTYP_ROTTEN_TOMATOES: f64 = b"rtom";
    RTYP_METACRITIC: f64 = b"mcri";
    RTYP_YOUTUBE_VIEWS: f64 = b"ytvi";
    RTYP_YOUTUBE_LIKES: f64 = b"ytli";
    RTYP_YOUTUBE_SUBSCRIBERS: f64 = b"ytsu";
    RTYP_TRAKT: f64 = b"trkt";

    IDENT_MUSICBRAINZ_RECORDING: str = b"mbrc";
    IDENT_MUSICBRAINZ_ARTIST: str = b"mbar";
    IDENT_MUSICBRAINZ_RELEASE: str = b"mbrl";
    IDENT_MUSICBRAINZ_RELEASE_GROUP: str = b"mbrg";
    IDENT_ACOUST_ID_TRACK: str = b"actr";
    IDENT_YOUTUBE_VIDEO: str = b"ytvi";
    IDENT_YOUTUBE_CHANNEL: str = b"ytc1";
    IDENT_YOUTUBE_CHANNEL_HANDLE: str = b"ytch";
    IDENT_BANDCAMP: str = b"bcmp";
    IDENT_ISRC: str = b"isrc";
    IDENT_BARCODE: str = b"barc";
    IDENT_TRAKT_MOVIE: str = b"trmv";
    IDENT_TRAKT_SHOW: str = b"trsh";
    IDENT_TRAKT_SEASON: str = b"trse";
    IDENT_TRAKT_EPISODE: str = b"trep";
    IDENT_TRAKT_PERSON: str = b"trpe";
    IDENT_IMDB: str = b"imdb";
    IDENT_IMDB_PERSON: str = b"impe";
    IDENT_TMDB_SERIES: str = b"tmse";
    IDENT_TMDB_MOVIE: str = b"tmmv";
    IDENT_TMDB_PERSON: str = b"tmpe";
    IDENT_TVDB: str = b"tvdb";
    IDENT_OMDB: str = b"omdb";
    IDENT_VGMDB_ARTIST: str = b"vgar";
    IDENT_WIKIDATA: str = b"wkdt";
}

enums! {
    MSOURCE_TRAKT = b"trkt";
    MSOURCE_INFOJSON = b"infj";
    MSOURCE_TMDB = b"tmdb";
    MSOURCE_OMDB = b"omdb";
    MSOURCE_VGMDB = b"vgmd";
    MSOURCE_WIKIDATA = b"wkdt";
    MSOURCE_MUSICBRAINZ = b"mbrz";
    MSOURCE_TAGS = b"tags";
    MSOURCE_IMAGE_ATT = b"iatt";
    MSOURCE_ACOUSTID = b"acid";
    MSOURCE_MEDIA = b"medi";
    MSOURCE_EXPLICIT = b"expl";

    VISI_HIDDEN = b"hidn";
    VISI_REDUCED = b"rdcd";
    VISI_VISIBLE = b"visi";

    TRKIND_VIDEO = b"vide";
    TRKIND_AUDIO = b"audi";
    TRKIND_TEXT = b"text";
    TRKIND_UNKNOWN = b"unkn";

    KIND_MOVIE = b"movi";
    KIND_VIDEO = b"vide";
    KIND_MUSIC = b"musi";
    KIND_SHORTFORMVIDEO = b"sfvi";
    KIND_COLLECTION = b"coll";
    KIND_CHANNEL = b"chnl";
    KIND_SHOW = b"show";
    KIND_PERSON = b"prsn";
    KIND_SERIES = b"seri";
    KIND_SEASON = b"sesn";
    KIND_EPISODE = b"epsd";

    CRCAT_CAST = b"cast";
    CRCAT_WRITING = b"writ";
    CRCAT_DIRECTING = b"dire";
    CRCAT_ART = b"art1";
    CRCAT_SOUND = b"sond";
    CRCAT_CAMERA = b"came";
    CRCAT_LIGHTING = b"ligh";
    CRCAT_CREW = b"crew";
    CRCAT_EDITING = b"edit";
    CRCAT_PRODUCTION = b"prod";
    CRCAT_VFX = b"vfx1";
    CRCAT_COSTUME_MAKEUP = b"coma";
    CRCAT_CREATED_BY = b"crby";
    CRCAT_PERFORMANCE = b"perf";
    CRCAT_INSTRUMENT = b"inst";
    CRCAT_VOCAL = b"voca";
    CRCAT_ARRANGER = b"arra";
    CRCAT_PRODUCER = b"pro2";
    CRCAT_ENGINEER = b"engi";
}
