mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
added logging during app update, and IsHD
This commit is contained in:
parent
cdfb009df8
commit
02ebeb0e5b
@ -229,7 +229,7 @@ namespace MediaBrowser.Api.DefaultTheme
|
|||||||
var movies = items.OfType<Movie>()
|
var movies = items.OfType<Movie>()
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
var hdMovies = movies.Where(i => i.IsHd).ToList();
|
var hdMovies = movies.Where(i => i.IsHD).ToList();
|
||||||
|
|
||||||
var familyGenres = request.FamilyGenre.Split(',').ToDictionary(i => i, StringComparer.OrdinalIgnoreCase);
|
var familyGenres = request.FamilyGenre.Split(',').ToDictionary(i => i, StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ using MediaBrowser.Common.MediaInfo;
|
|||||||
using MediaBrowser.Controller;
|
using MediaBrowser.Controller;
|
||||||
using MediaBrowser.Controller.Dto;
|
using MediaBrowser.Controller.Dto;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.MediaInfo;
|
using MediaBrowser.Controller.MediaInfo;
|
||||||
using MediaBrowser.Model.Drawing;
|
using MediaBrowser.Model.Drawing;
|
||||||
@ -442,7 +443,23 @@ namespace MediaBrowser.Api.Playback
|
|||||||
/// <returns>System.String.</returns>
|
/// <returns>System.String.</returns>
|
||||||
protected string GetProbeSizeArgument(BaseItem item)
|
protected string GetProbeSizeArgument(BaseItem item)
|
||||||
{
|
{
|
||||||
return MediaEncoder.GetProbeSizeArgument(MediaEncoderHelpers.GetInputType(item));
|
var type = InputType.AudioFile;
|
||||||
|
|
||||||
|
if (item is Audio)
|
||||||
|
{
|
||||||
|
type = MediaEncoderHelpers.GetInputType(item.Path, null, null);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var video = item as Video;
|
||||||
|
|
||||||
|
if (video != null)
|
||||||
|
{
|
||||||
|
type = MediaEncoderHelpers.GetInputType(item.Path, video.VideoType, video.IsoType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return MediaEncoder.GetProbeSizeArgument(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -756,7 +756,7 @@ namespace MediaBrowser.Api.UserLibrary
|
|||||||
|
|
||||||
if (request.IsHD.HasValue)
|
if (request.IsHD.HasValue)
|
||||||
{
|
{
|
||||||
items = items.OfType<Video>().Where(i => i.IsHd == request.IsHD.Value);
|
items = items.OfType<Video>().Where(i => i.IsHD == request.IsHD.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.ParentIndexNumber.HasValue)
|
if (request.ParentIndexNumber.HasValue)
|
||||||
|
@ -586,6 +586,8 @@ namespace MediaBrowser.Common.Implementations
|
|||||||
/// <param name="newVersion">The new version.</param>
|
/// <param name="newVersion">The new version.</param>
|
||||||
protected void OnApplicationUpdated(Version newVersion)
|
protected void OnApplicationUpdated(Version newVersion)
|
||||||
{
|
{
|
||||||
|
Logger.Info("Application has been updated to version {0}", newVersion);
|
||||||
|
|
||||||
EventHelper.QueueEventIfNotNull(ApplicationUpdated, this, new GenericEventArgs<Version> { Argument = newVersion }, Logger);
|
EventHelper.QueueEventIfNotNull(ApplicationUpdated, this, new GenericEventArgs<Version> { Argument = newVersion }, Logger);
|
||||||
|
|
||||||
NotifyPendingRestart();
|
NotifyPendingRestart();
|
||||||
|
@ -79,6 +79,7 @@
|
|||||||
<Compile Include="ScheduledTasks\TaskManager.cs" />
|
<Compile Include="ScheduledTasks\TaskManager.cs" />
|
||||||
<Compile Include="ScheduledTasks\Tasks\DeleteCacheFileTask.cs" />
|
<Compile Include="ScheduledTasks\Tasks\DeleteCacheFileTask.cs" />
|
||||||
<Compile Include="ScheduledTasks\Tasks\DeleteLogFileTask.cs" />
|
<Compile Include="ScheduledTasks\Tasks\DeleteLogFileTask.cs" />
|
||||||
|
<Compile Include="ScheduledTasks\Tasks\PluginUpdateTask.cs" />
|
||||||
<Compile Include="ScheduledTasks\Tasks\ReloadLoggerTask.cs" />
|
<Compile Include="ScheduledTasks\Tasks\ReloadLoggerTask.cs" />
|
||||||
<Compile Include="ScheduledTasks\Tasks\SystemUpdateTask.cs" />
|
<Compile Include="ScheduledTasks\Tasks\SystemUpdateTask.cs" />
|
||||||
<Compile Include="Security\MBLicenseFile.cs" />
|
<Compile Include="Security\MBLicenseFile.cs" />
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using MediaBrowser.Common;
|
using MediaBrowser.Common.ScheduledTasks;
|
||||||
using MediaBrowser.Common.ScheduledTasks;
|
|
||||||
using MediaBrowser.Common.Updates;
|
using MediaBrowser.Common.Updates;
|
||||||
using MediaBrowser.Model.Logging;
|
using MediaBrowser.Model.Logging;
|
||||||
using MediaBrowser.Model.Net;
|
using MediaBrowser.Model.Net;
|
||||||
@ -10,7 +9,7 @@ using System.Linq;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.ScheduledTasks
|
namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Plugin Update Task
|
/// Plugin Update Task
|
@ -439,7 +439,6 @@ namespace MediaBrowser.Common.Implementations.Updates
|
|||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
// Dispose the progress object and remove the installation from the in-progress list
|
// Dispose the progress object and remove the installation from the in-progress list
|
||||||
|
|
||||||
innerProgress.Dispose();
|
innerProgress.Dispose();
|
||||||
tuple.Item2.Dispose();
|
tuple.Item2.Dispose();
|
||||||
}
|
}
|
||||||
@ -457,8 +456,10 @@ namespace MediaBrowser.Common.Implementations.Updates
|
|||||||
// Do the install
|
// Do the install
|
||||||
await PerformPackageInstallation(progress, package, cancellationToken).ConfigureAwait(false);
|
await PerformPackageInstallation(progress, package, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
|
var extension = Path.GetExtension(package.targetFilename) ?? "";
|
||||||
|
|
||||||
// Do plugin-specific processing
|
// Do plugin-specific processing
|
||||||
if (!(Path.GetExtension(package.targetFilename) ?? "").Equals(".zip", StringComparison.OrdinalIgnoreCase))
|
if (!string.Equals(extension, ".zip", StringComparison.OrdinalIgnoreCase) && !string.Equals(extension, ".rar", StringComparison.OrdinalIgnoreCase) && !string.Equals(extension, ".7z", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
// Set last update time if we were installed before
|
// Set last update time if we were installed before
|
||||||
var plugin = _applicationHost.Plugins.FirstOrDefault(p => p.Name.Equals(package.name, StringComparison.OrdinalIgnoreCase));
|
var plugin = _applicationHost.Plugins.FirstOrDefault(p => p.Name.Equals(package.name, StringComparison.OrdinalIgnoreCase));
|
||||||
@ -471,7 +472,6 @@ namespace MediaBrowser.Common.Implementations.Updates
|
|||||||
{
|
{
|
||||||
OnPluginInstalled(package);
|
OnPluginInstalled(package);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -479,7 +479,8 @@ namespace MediaBrowser.Common.Implementations.Updates
|
|||||||
{
|
{
|
||||||
// Target based on if it is an archive or single assembly
|
// Target based on if it is an archive or single assembly
|
||||||
// zip archives are assumed to contain directory structures relative to our ProgramDataPath
|
// zip archives are assumed to contain directory structures relative to our ProgramDataPath
|
||||||
var isArchive = string.Equals(Path.GetExtension(package.targetFilename), ".zip", StringComparison.OrdinalIgnoreCase);
|
var extension = Path.GetExtension(package.targetFilename);
|
||||||
|
var isArchive = string.Equals(extension, ".zip", StringComparison.OrdinalIgnoreCase) || string.Equals(extension, ".rar", StringComparison.OrdinalIgnoreCase) || string.Equals(extension, ".7z", StringComparison.OrdinalIgnoreCase);
|
||||||
var target = Path.Combine(isArchive ? _appPaths.TempUpdatePath : _appPaths.PluginsPath, package.targetFilename);
|
var target = Path.Combine(isArchive ? _appPaths.TempUpdatePath : _appPaths.PluginsPath, package.targetFilename);
|
||||||
|
|
||||||
// Download to temporary file so that, if interrupted, it won't destroy the existing installation
|
// Download to temporary file so that, if interrupted, it won't destroy the existing installation
|
||||||
@ -536,7 +537,6 @@ namespace MediaBrowser.Common.Implementations.Updates
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Uninstalls a plugin
|
/// Uninstalls a plugin
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -136,7 +136,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
get { return Video3DFormat.HasValue; }
|
get { return Video3DFormat.HasValue; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsHd
|
public bool IsHD
|
||||||
{
|
{
|
||||||
get { return MediaStreams != null && MediaStreams.Any(i => i.Type == MediaStreamType.Video && i.Width.HasValue && i.Width.Value >= 1280); }
|
get { return MediaStreams != null && MediaStreams.Any(i => i.Type == MediaStreamType.Video && i.Width.HasValue && i.Width.Value >= 1280); }
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using MediaBrowser.Common.IO;
|
using MediaBrowser.Common.MediaInfo;
|
||||||
using MediaBrowser.Common.MediaInfo;
|
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
@ -64,17 +63,17 @@ namespace MediaBrowser.Controller.MediaInfo
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the type of the input.
|
/// Gets the type of the input.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="item">The item.</param>
|
/// <param name="path">The path.</param>
|
||||||
|
/// <param name="videoType">Type of the video.</param>
|
||||||
|
/// <param name="isoType">Type of the iso.</param>
|
||||||
/// <returns>InputType.</returns>
|
/// <returns>InputType.</returns>
|
||||||
public static InputType GetInputType(BaseItem item)
|
public static InputType GetInputType(string path, VideoType? videoType, IsoType? isoType)
|
||||||
{
|
{
|
||||||
var type = InputType.AudioFile;
|
var type = InputType.AudioFile;
|
||||||
|
|
||||||
var video = item as Video;
|
if (videoType.HasValue)
|
||||||
|
|
||||||
if (video != null)
|
|
||||||
{
|
{
|
||||||
switch (video.VideoType)
|
switch (videoType.Value)
|
||||||
{
|
{
|
||||||
case VideoType.BluRay:
|
case VideoType.BluRay:
|
||||||
type = InputType.Bluray;
|
type = InputType.Bluray;
|
||||||
@ -83,9 +82,9 @@ namespace MediaBrowser.Controller.MediaInfo
|
|||||||
type = InputType.Dvd;
|
type = InputType.Dvd;
|
||||||
break;
|
break;
|
||||||
case VideoType.Iso:
|
case VideoType.Iso:
|
||||||
if (video.IsoType.HasValue)
|
if (isoType.HasValue)
|
||||||
{
|
{
|
||||||
switch (video.IsoType.Value)
|
switch (isoType.Value)
|
||||||
{
|
{
|
||||||
case IsoType.BluRay:
|
case IsoType.BluRay:
|
||||||
type = InputType.Bluray;
|
type = InputType.Bluray;
|
||||||
|
@ -138,6 +138,10 @@ namespace MediaBrowser.Model.Dto
|
|||||||
/// <value>The production year.</value>
|
/// <value>The production year.</value>
|
||||||
public int? ProductionYear { get; set; }
|
public int? ProductionYear { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the season count.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The season count.</value>
|
||||||
public int? SeasonCount { get; set; }
|
public int? SeasonCount { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -188,6 +192,12 @@ namespace MediaBrowser.Model.Dto
|
|||||||
/// <value>The language.</value>
|
/// <value>The language.</value>
|
||||||
public string Language { get; set; }
|
public string Language { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value indicating whether this instance is HD.
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>null</c> if [is HD] contains no value, <c>true</c> if [is HD]; otherwise, <c>false</c>.</value>
|
||||||
|
public bool? IsHD { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether this instance is folder.
|
/// Gets or sets a value indicating whether this instance is folder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -32,12 +32,6 @@ namespace MediaBrowser.Model.Entities
|
|||||||
/// <value>The type of the media.</value>
|
/// <value>The type of the media.</value>
|
||||||
public string MediaType { get; set; }
|
public string MediaType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether this instance is folder.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>true</c> if this instance is folder; otherwise, <c>false</c>.</value>
|
|
||||||
public bool IsFolder { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the run time ticks.
|
/// Gets or sets the run time ticks.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -54,6 +54,10 @@ namespace MediaBrowser.Providers.TV
|
|||||||
.Distinct()
|
.Distinct()
|
||||||
.Count();
|
.Count();
|
||||||
|
|
||||||
|
series.DateLastEpisodeAdded = episodes.Select(i => i.DateCreated)
|
||||||
|
.OrderByDescending(i => i)
|
||||||
|
.FirstOrDefault();
|
||||||
|
|
||||||
numComplete++;
|
numComplete++;
|
||||||
double percent = numComplete;
|
double percent = numComplete;
|
||||||
percent /= seriesList.Count;
|
percent /= seriesList.Count;
|
||||||
|
@ -275,7 +275,6 @@ namespace MediaBrowser.Server.Implementations.Dto
|
|||||||
Name = item.Name,
|
Name = item.Name,
|
||||||
MediaType = item.MediaType,
|
MediaType = item.MediaType,
|
||||||
Type = item.GetType().Name,
|
Type = item.GetType().Name,
|
||||||
IsFolder = item.IsFolder,
|
|
||||||
RunTimeTicks = item.RunTimeTicks
|
RunTimeTicks = item.RunTimeTicks
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -959,6 +958,7 @@ namespace MediaBrowser.Server.Implementations.Dto
|
|||||||
dto.VideoType = video.VideoType;
|
dto.VideoType = video.VideoType;
|
||||||
dto.Video3DFormat = video.Video3DFormat;
|
dto.Video3DFormat = video.Video3DFormat;
|
||||||
dto.IsoType = video.IsoType;
|
dto.IsoType = video.IsoType;
|
||||||
|
dto.IsHD = video.IsHD;
|
||||||
|
|
||||||
dto.PartCount = video.AdditionalPartIds.Count + 1;
|
dto.PartCount = video.AdditionalPartIds.Count + 1;
|
||||||
|
|
||||||
|
@ -168,7 +168,6 @@
|
|||||||
<Compile Include="Providers\ProviderManager.cs" />
|
<Compile Include="Providers\ProviderManager.cs" />
|
||||||
<Compile Include="ScheduledTasks\PeopleValidationTask.cs" />
|
<Compile Include="ScheduledTasks\PeopleValidationTask.cs" />
|
||||||
<Compile Include="ScheduledTasks\ChapterImagesTask.cs" />
|
<Compile Include="ScheduledTasks\ChapterImagesTask.cs" />
|
||||||
<Compile Include="ScheduledTasks\PluginUpdateTask.cs" />
|
|
||||||
<Compile Include="ScheduledTasks\RefreshMediaLibraryTask.cs" />
|
<Compile Include="ScheduledTasks\RefreshMediaLibraryTask.cs" />
|
||||||
<Compile Include="ServerApplicationPaths.cs" />
|
<Compile Include="ServerApplicationPaths.cs" />
|
||||||
<Compile Include="ServerManager\ServerManager.cs" />
|
<Compile Include="ServerManager\ServerManager.cs" />
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common.Internal</id>
|
<id>MediaBrowser.Common.Internal</id>
|
||||||
<version>3.0.209</version>
|
<version>3.0.210</version>
|
||||||
<title>MediaBrowser.Common.Internal</title>
|
<title>MediaBrowser.Common.Internal</title>
|
||||||
<authors>Luke</authors>
|
<authors>Luke</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
|
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
|
||||||
<copyright>Copyright © Media Browser 2013</copyright>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.209" />
|
<dependency id="MediaBrowser.Common" version="3.0.210" />
|
||||||
<dependency id="NLog" version="2.0.1.2" />
|
<dependency id="NLog" version="2.0.1.2" />
|
||||||
<dependency id="ServiceStack.Text" version="3.9.58" />
|
<dependency id="ServiceStack.Text" version="3.9.58" />
|
||||||
<dependency id="SimpleInjector" version="2.3.2" />
|
<dependency id="SimpleInjector" version="2.3.2" />
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common</id>
|
<id>MediaBrowser.Common</id>
|
||||||
<version>3.0.209</version>
|
<version>3.0.210</version>
|
||||||
<title>MediaBrowser.Common</title>
|
<title>MediaBrowser.Common</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Server.Core</id>
|
<id>MediaBrowser.Server.Core</id>
|
||||||
<version>3.0.209</version>
|
<version>3.0.210</version>
|
||||||
<title>Media Browser.Server.Core</title>
|
<title>Media Browser.Server.Core</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
||||||
<copyright>Copyright © Media Browser 2013</copyright>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.209" />
|
<dependency id="MediaBrowser.Common" version="3.0.210" />
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user