mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-30 19:32:57 +01:00
implement dlna headers
This commit is contained in:
@@ -3,7 +3,6 @@ using MediaBrowser.Controller.Entities.Movies;
|
||||
using MediaBrowser.Controller.Entities.TV;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
@@ -75,16 +74,6 @@ namespace MediaBrowser.Providers.Savers
|
||||
|
||||
XmlSaverHelpers.AddCommonNodes(video, builder);
|
||||
|
||||
if (video.CommunityRating.HasValue)
|
||||
{
|
||||
builder.Append("<IMDBrating>" + SecurityElement.Escape(video.CommunityRating.Value.ToString(UsCulture)) + "</IMDBrating>");
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(video.Overview))
|
||||
{
|
||||
builder.Append("<Description><![CDATA[" + video.Overview + "]]></Description>");
|
||||
}
|
||||
|
||||
var musicVideo = item as MusicVideo;
|
||||
|
||||
if (musicVideo != null)
|
||||
@@ -117,8 +106,12 @@ namespace MediaBrowser.Providers.Savers
|
||||
|
||||
XmlSaverHelpers.Save(builder, xmlFilePath, new List<string>
|
||||
{
|
||||
// Deprecated. No longer saving in this field.
|
||||
"IMDBrating",
|
||||
|
||||
// Deprecated. No longer saving in this field.
|
||||
"Description",
|
||||
|
||||
"Artist",
|
||||
"Album",
|
||||
"TmdbCollectionName"
|
||||
|
||||
@@ -60,11 +60,6 @@ namespace MediaBrowser.Providers.Savers
|
||||
builder.Append("<id>" + SecurityElement.Escape(tvdb) + "</id>");
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(item.Name))
|
||||
{
|
||||
builder.Append("<SeriesName>" + SecurityElement.Escape(item.Name) + "</SeriesName>");
|
||||
}
|
||||
|
||||
if (series.Status.HasValue)
|
||||
{
|
||||
builder.Append("<Status>" + SecurityElement.Escape(series.Status.Value.ToString()) + "</Status>");
|
||||
@@ -111,7 +106,6 @@ namespace MediaBrowser.Providers.Savers
|
||||
XmlSaverHelpers.Save(builder, xmlFilePath, new List<string>
|
||||
{
|
||||
"id",
|
||||
"SeriesName",
|
||||
"Status",
|
||||
"Network",
|
||||
"Airs_Time",
|
||||
@@ -120,6 +114,10 @@ namespace MediaBrowser.Providers.Savers
|
||||
|
||||
// Don't preserve old series node
|
||||
"Series",
|
||||
|
||||
"SeriesName",
|
||||
|
||||
// Deprecated. No longer saving in this field.
|
||||
"AnimeSeriesIndex"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -28,7 +28,10 @@ namespace MediaBrowser.Providers.Savers
|
||||
"AwardSummary",
|
||||
"BirthDate",
|
||||
"Budget",
|
||||
|
||||
// Deprecated. No longer saving in this field.
|
||||
"certification",
|
||||
|
||||
"Chapters",
|
||||
"ContentRating",
|
||||
"CustomRating",
|
||||
@@ -40,22 +43,31 @@ namespace MediaBrowser.Providers.Savers
|
||||
"Genres",
|
||||
"Genre",
|
||||
"GamesDbId",
|
||||
|
||||
// Deprecated. No longer saving in this field.
|
||||
"IMDB_ID",
|
||||
|
||||
"IMDB",
|
||||
|
||||
// Deprecated. No longer saving in this field.
|
||||
"IMDbId",
|
||||
|
||||
"Language",
|
||||
"LocalTitle",
|
||||
"LockData",
|
||||
"LockedFields",
|
||||
"Format3D",
|
||||
"Metascore",
|
||||
|
||||
// Deprecated. No longer saving in this field.
|
||||
"MPAARating",
|
||||
|
||||
"MusicBrainzArtistId",
|
||||
"MusicBrainzAlbumArtistId",
|
||||
"MusicBrainzAlbumId",
|
||||
"MusicBrainzReleaseGroupId",
|
||||
|
||||
// Old - not used anymore
|
||||
// Deprecated. No longer saving in this field.
|
||||
"MusicbrainzId",
|
||||
|
||||
"Overview",
|
||||
@@ -67,15 +79,24 @@ namespace MediaBrowser.Providers.Savers
|
||||
"Revenue",
|
||||
"RottenTomatoesId",
|
||||
"RunningTime",
|
||||
|
||||
// Deprecated. No longer saving in this field.
|
||||
"Runtime",
|
||||
|
||||
"SortTitle",
|
||||
"Studios",
|
||||
"Tags",
|
||||
|
||||
// Deprecated. No longer saving in this field.
|
||||
"TagLine",
|
||||
|
||||
"Taglines",
|
||||
"TMDbCollectionId",
|
||||
"TMDbId",
|
||||
|
||||
// Deprecated. No longer saving in this field.
|
||||
"Trailer",
|
||||
|
||||
"Trailers",
|
||||
"TVcomId",
|
||||
"TvDbId",
|
||||
@@ -207,8 +228,6 @@ namespace MediaBrowser.Providers.Savers
|
||||
if (!string.IsNullOrEmpty(item.OfficialRating))
|
||||
{
|
||||
builder.Append("<ContentRating>" + SecurityElement.Escape(item.OfficialRating) + "</ContentRating>");
|
||||
builder.Append("<MPAARating>" + SecurityElement.Escape(item.OfficialRating) + "</MPAARating>");
|
||||
builder.Append("<certification>" + SecurityElement.Escape(item.OfficialRating) + "</certification>");
|
||||
}
|
||||
|
||||
builder.Append("<Added>" + SecurityElement.Escape(item.DateCreated.ToLocalTime().ToString("G")) + "</Added>");
|
||||
@@ -376,16 +395,13 @@ namespace MediaBrowser.Providers.Savers
|
||||
var timespan = TimeSpan.FromTicks(runTimeTicks.Value);
|
||||
|
||||
builder.Append("<RunningTime>" + Convert.ToInt32(timespan.TotalMinutes).ToString(UsCulture) + "</RunningTime>");
|
||||
builder.Append("<Runtime>" + Convert.ToInt32(timespan.TotalMinutes).ToString(UsCulture) + "</Runtime>");
|
||||
}
|
||||
|
||||
var imdb = item.GetProviderId(MetadataProviders.Imdb);
|
||||
|
||||
if (!string.IsNullOrEmpty(imdb))
|
||||
{
|
||||
builder.Append("<IMDB_ID>" + SecurityElement.Escape(imdb) + "</IMDB_ID>");
|
||||
builder.Append("<IMDB>" + SecurityElement.Escape(imdb) + "</IMDB>");
|
||||
builder.Append("<IMDbId>" + SecurityElement.Escape(imdb) + "</IMDbId>");
|
||||
}
|
||||
|
||||
var tmdb = item.GetProviderId(MetadataProviders.Tmdb);
|
||||
|
||||
@@ -90,6 +90,8 @@ namespace MediaBrowser.Providers.TV
|
||||
break;
|
||||
}
|
||||
case "SeriesName":
|
||||
// TODO: Deprecate in mid-2014
|
||||
// No longer saving this tag but will still read it for a while
|
||||
item.Name = reader.ReadElementContentAsString();
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user