commit
76adfd1f63
|
@ -2206,17 +2206,19 @@ namespace Emby.Server.Implementations
|
|||
/// <returns>Task{CheckForUpdateResult}.</returns>
|
||||
public async Task<CheckForUpdateResult> CheckForApplicationUpdate(CancellationToken cancellationToken, IProgress<double> progress)
|
||||
{
|
||||
var cacheLength = TimeSpan.FromMinutes(5);
|
||||
var updateLevel = SystemUpdateLevel;
|
||||
var cacheLength = updateLevel == PackageVersionClass.Release ?
|
||||
TimeSpan.FromHours(4) :
|
||||
TimeSpan.FromMinutes(5);
|
||||
|
||||
var result = await new GithubUpdater(HttpClient, JsonSerializer).CheckForUpdateResult("MediaBrowser",
|
||||
"Emby",
|
||||
ApplicationVersion,
|
||||
var result = await new GithubUpdater(HttpClient, JsonSerializer).CheckForUpdateResult("MediaBrowser",
|
||||
"Emby",
|
||||
ApplicationVersion,
|
||||
updateLevel,
|
||||
ReleaseAssetFilename,
|
||||
"MBServer",
|
||||
UpdateTargetFileName,
|
||||
cacheLength,
|
||||
UpdateTargetFileName,
|
||||
cacheLength,
|
||||
cancellationToken).ConfigureAwait(false);
|
||||
|
||||
HasUpdateAvailable = result.IsUpdateAvailable;
|
||||
|
|
|
@ -4410,7 +4410,7 @@ namespace Emby.Server.Implementations.Data
|
|||
index++;
|
||||
}
|
||||
|
||||
whereClauses.Add(string.Join(" OR ", includeIds.ToArray()));
|
||||
whereClauses.Add("(" + string.Join(" OR ", includeIds.ToArray()) + ")");
|
||||
}
|
||||
if (query.ExcludeItemIds.Length > 0)
|
||||
{
|
||||
|
|
|
@ -50,7 +50,9 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
public static double? GetDefaultPrimaryImageAspectRatio(IHasProgramAttributes item)
|
||||
{
|
||||
var serviceName = item.ServiceName;
|
||||
if (!item.IsMovie && !string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase))
|
||||
if (!item.IsMovie
|
||||
&& !string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase)
|
||||
&& !string.Equals(serviceName, "Next Pvr", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
double value = 16;
|
||||
value /= 9;
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
using System.Linq;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Movies;
|
||||
|
@ -70,6 +73,17 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
|||
{
|
||||
movie.CollectionName = val;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
ParseSetXml(val, movie);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.ErrorException("Error parsing set node", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -109,6 +123,63 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
|||
}
|
||||
}
|
||||
|
||||
private void ParseSetXml(string xml, Movie movie)
|
||||
{
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
//xml = xml.Substring(xml.IndexOf('<'));
|
||||
//xml = xml.Substring(0, xml.LastIndexOf('>'));
|
||||
xml = "<set>" + xml + "</set>";
|
||||
|
||||
var bytes = Encoding.UTF8.GetBytes(xml);
|
||||
|
||||
ms.Write(bytes, 0, bytes.Length);
|
||||
ms.Position = 0;
|
||||
|
||||
// These are not going to be valid xml so no sense in causing the provider to fail and spamming the log with exceptions
|
||||
try
|
||||
{
|
||||
var settings = XmlReaderSettingsFactory.Create(false);
|
||||
|
||||
settings.CheckCharacters = false;
|
||||
settings.IgnoreProcessingInstructions = true;
|
||||
settings.IgnoreComments = true;
|
||||
|
||||
// Use XmlReader for best performance
|
||||
using (var reader = XmlReader.Create(ms, settings))
|
||||
{
|
||||
reader.MoveToContent();
|
||||
reader.Read();
|
||||
|
||||
// Loop through each element
|
||||
while (!reader.EOF && reader.ReadState == ReadState.Interactive)
|
||||
{
|
||||
if (reader.NodeType == XmlNodeType.Element)
|
||||
{
|
||||
switch (reader.Name)
|
||||
{
|
||||
case "name":
|
||||
movie.CollectionName = reader.ReadElementContentAsString();
|
||||
break;
|
||||
default:
|
||||
reader.Skip();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
reader.Read();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (XmlException)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public MovieNfoParser(ILogger logger, IConfigurationManager config, IProviderManager providerManager, IFileSystem fileSystem, IXmlReaderSettingsFactory xmlReaderSettingsFactory) : base(logger, config, providerManager, fileSystem, xmlReaderSettingsFactory)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("3.2.30.26")]
|
||||
[assembly: AssemblyVersion("3.2.30.27")]
|
||||
|
|
Loading…
Reference in New Issue
Block a user