mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
don't overwrite ffmpeg runtime with xml value
This commit is contained in:
parent
3b1dabff0f
commit
e95837ff53
@ -1,13 +1,13 @@
|
|||||||
using System.Globalization;
|
using MediaBrowser.Controller.Entities;
|
||||||
using System.IO;
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
using System.Text;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using MediaBrowser.Controller.Entities;
|
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Logging;
|
using MediaBrowser.Model.Logging;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
|
||||||
@ -226,7 +226,15 @@ namespace MediaBrowser.Controller.Providers
|
|||||||
int runtime;
|
int runtime;
|
||||||
if (int.TryParse(text.Split(' ')[0], out runtime))
|
if (int.TryParse(text.Split(' ')[0], out runtime))
|
||||||
{
|
{
|
||||||
item.RunTimeTicks = TimeSpan.FromMinutes(runtime).Ticks;
|
// For audio and video don't replace ffmpeg data
|
||||||
|
if (item is Video || item is Audio)
|
||||||
|
{
|
||||||
|
item.OriginalRunTimeTicks = TimeSpan.FromMinutes(runtime).Ticks;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
item.RunTimeTicks = TimeSpan.FromMinutes(runtime).Ticks;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -415,10 +423,10 @@ namespace MediaBrowser.Controller.Providers
|
|||||||
case "IMDB_ID":
|
case "IMDB_ID":
|
||||||
case "IMDB":
|
case "IMDB":
|
||||||
case "IMDbId":
|
case "IMDbId":
|
||||||
var IMDbId = reader.ReadElementContentAsString();
|
var imDbId = reader.ReadElementContentAsString();
|
||||||
if (!string.IsNullOrWhiteSpace(IMDbId))
|
if (!string.IsNullOrWhiteSpace(imDbId))
|
||||||
{
|
{
|
||||||
item.SetProviderId(MetadataProviders.Imdb, IMDbId);
|
item.SetProviderId(MetadataProviders.Imdb, imDbId);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user