internal static ItemListDataType GetDataType(Mp4Tag type) { switch (type) { case Mp4Tag.Album: case Mp4Tag.Artist: case Mp4Tag.Comment: case Mp4Tag.Description: case Mp4Tag.Encoder: case Mp4Tag.LongDescription: case Mp4Tag.Title: case Mp4Tag.ReleaseDate: case Mp4Tag.SortAlbum: case Mp4Tag.SortArtist: case Mp4Tag.SortTitle: case Mp4Tag.SortTvShowName: case Mp4Tag.TvNetwork: case Mp4Tag.TvShowName: return(ItemListDataType.Utf8String); case Mp4Tag.CoverArt: return(ItemListDataType.Image); case Mp4Tag.DiskNumber: // DiskNumber and TrackNumber may be bytes instead of Int32s case Mp4Tag.Genre: case Mp4Tag.Rating: case Mp4Tag.TrackNumber: case Mp4Tag.TvEpisode: case Mp4Tag.TvSeason: return(ItemListDataType.Int32); default: throw new NotImplementedException("No mapping for " + type); } }
private void CopyTagToExTags(Mp4Tag tag, string exTag, IDictionary <string, string> exTags) { string value; if (!exTags.ContainsKey(exTag) && Tags.TryGetValue(tag, out value) && !String.IsNullOrEmpty(value)) { exTags[exTag] = value; } }
internal static string GetWMPropertyKey(Mp4Tag type) { switch (type) { case Mp4Tag.ParentalRating: return("WM/ParentalRating"); default: return(null); } }
internal static string GetExtendedTag(Mp4Tag type) { switch (type) { case Mp4Tag.TvEpisode: return("tvepisode"); case Mp4Tag.TvSeason: return("tvseason"); default: return(null); } }
private static uint GetClass(Mp4Tag type) { switch (type) { case Mp4Tag.DiskNumber: case Mp4Tag.TrackNumber: return(0); case Mp4Tag.Album: case Mp4Tag.Artist: case Mp4Tag.Comment: case Mp4Tag.Description: case Mp4Tag.Encoder: case Mp4Tag.Genre: case Mp4Tag.LongDescription: case Mp4Tag.ReleaseDate: case Mp4Tag.SortAlbum: case Mp4Tag.SortArtist: case Mp4Tag.SortTitle: case Mp4Tag.SortTvShowName: case Mp4Tag.Title: case Mp4Tag.TvNetwork: case Mp4Tag.TvShowName: return(1); case Mp4Tag.CoverArt: return(13); // 14 for png case Mp4Tag.Rating: case Mp4Tag.TvEpisode: case Mp4Tag.TvSeason: return(21); default: throw new NotImplementedException("No class for " + type); } }