mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge branch 'master' into feature/ffmpeg-version-check
This commit is contained in:
commit
268e87bbf2
@ -377,50 +377,50 @@ namespace Emby.Server.Implementations.Activity
|
|||||||
}).ConfigureAwait(false);
|
}).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void OnPluginUpdated(object sender, GenericEventArgs<(IPlugin, VersionInfo)> e)
|
private async void OnPluginUpdated(object sender, InstallationInfo e)
|
||||||
{
|
{
|
||||||
await CreateLogEntry(new ActivityLog(
|
await CreateLogEntry(new ActivityLog(
|
||||||
string.Format(
|
string.Format(
|
||||||
CultureInfo.InvariantCulture,
|
CultureInfo.InvariantCulture,
|
||||||
_localization.GetLocalizedString("PluginUpdatedWithName"),
|
_localization.GetLocalizedString("PluginUpdatedWithName"),
|
||||||
e.Argument.Item1.Name),
|
e.Name),
|
||||||
NotificationType.PluginUpdateInstalled.ToString(),
|
NotificationType.PluginUpdateInstalled.ToString(),
|
||||||
Guid.Empty)
|
Guid.Empty)
|
||||||
{
|
{
|
||||||
ShortOverview = string.Format(
|
ShortOverview = string.Format(
|
||||||
CultureInfo.InvariantCulture,
|
CultureInfo.InvariantCulture,
|
||||||
_localization.GetLocalizedString("VersionNumber"),
|
_localization.GetLocalizedString("VersionNumber"),
|
||||||
e.Argument.Item2.version),
|
e.Version),
|
||||||
Overview = e.Argument.Item2.changelog
|
Overview = e.Changelog
|
||||||
}).ConfigureAwait(false);
|
}).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void OnPluginUninstalled(object sender, GenericEventArgs<IPlugin> e)
|
private async void OnPluginUninstalled(object sender, IPlugin e)
|
||||||
{
|
{
|
||||||
await CreateLogEntry(new ActivityLog(
|
await CreateLogEntry(new ActivityLog(
|
||||||
string.Format(
|
string.Format(
|
||||||
CultureInfo.InvariantCulture,
|
CultureInfo.InvariantCulture,
|
||||||
_localization.GetLocalizedString("PluginUninstalledWithName"),
|
_localization.GetLocalizedString("PluginUninstalledWithName"),
|
||||||
e.Argument.Name),
|
e.Name),
|
||||||
NotificationType.PluginUninstalled.ToString(),
|
NotificationType.PluginUninstalled.ToString(),
|
||||||
Guid.Empty))
|
Guid.Empty))
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void OnPluginInstalled(object sender, GenericEventArgs<VersionInfo> e)
|
private async void OnPluginInstalled(object sender, InstallationInfo e)
|
||||||
{
|
{
|
||||||
await CreateLogEntry(new ActivityLog(
|
await CreateLogEntry(new ActivityLog(
|
||||||
string.Format(
|
string.Format(
|
||||||
CultureInfo.InvariantCulture,
|
CultureInfo.InvariantCulture,
|
||||||
_localization.GetLocalizedString("PluginInstalledWithName"),
|
_localization.GetLocalizedString("PluginInstalledWithName"),
|
||||||
e.Argument.name),
|
e.Name),
|
||||||
NotificationType.PluginInstalled.ToString(),
|
NotificationType.PluginInstalled.ToString(),
|
||||||
Guid.Empty)
|
Guid.Empty)
|
||||||
{
|
{
|
||||||
ShortOverview = string.Format(
|
ShortOverview = string.Format(
|
||||||
CultureInfo.InvariantCulture,
|
CultureInfo.InvariantCulture,
|
||||||
_localization.GetLocalizedString("VersionNumber"),
|
_localization.GetLocalizedString("VersionNumber"),
|
||||||
e.Argument.version)
|
e.Version)
|
||||||
}).ConfigureAwait(false);
|
}).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ using MediaBrowser.Controller.Plugins;
|
|||||||
using MediaBrowser.Controller.Session;
|
using MediaBrowser.Controller.Session;
|
||||||
using MediaBrowser.Model.Events;
|
using MediaBrowser.Model.Events;
|
||||||
using MediaBrowser.Model.Tasks;
|
using MediaBrowser.Model.Tasks;
|
||||||
|
using MediaBrowser.Model.Updates;
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.EntryPoints
|
namespace Emby.Server.Implementations.EntryPoints
|
||||||
{
|
{
|
||||||
@ -85,19 +86,19 @@ namespace Emby.Server.Implementations.EntryPoints
|
|||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void OnPackageInstalling(object sender, InstallationEventArgs e)
|
private async void OnPackageInstalling(object sender, InstallationInfo e)
|
||||||
{
|
{
|
||||||
await SendMessageToAdminSessions("PackageInstalling", e.InstallationInfo).ConfigureAwait(false);
|
await SendMessageToAdminSessions("PackageInstalling", e).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void OnPackageInstallationCancelled(object sender, InstallationEventArgs e)
|
private async void OnPackageInstallationCancelled(object sender, InstallationInfo e)
|
||||||
{
|
{
|
||||||
await SendMessageToAdminSessions("PackageInstallationCancelled", e.InstallationInfo).ConfigureAwait(false);
|
await SendMessageToAdminSessions("PackageInstallationCancelled", e).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void OnPackageInstallationCompleted(object sender, InstallationEventArgs e)
|
private async void OnPackageInstallationCompleted(object sender, InstallationInfo e)
|
||||||
{
|
{
|
||||||
await SendMessageToAdminSessions("PackageInstallationCompleted", e.InstallationInfo).ConfigureAwait(false);
|
await SendMessageToAdminSessions("PackageInstallationCompleted", e).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void OnPackageInstallationFailed(object sender, InstallationFailedEventArgs e)
|
private async void OnPackageInstallationFailed(object sender, InstallationFailedEventArgs e)
|
||||||
@ -115,9 +116,9 @@ namespace Emby.Server.Implementations.EntryPoints
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender">The sender.</param>
|
/// <param name="sender">The sender.</param>
|
||||||
/// <param name="e">The e.</param>
|
/// <param name="e">The e.</param>
|
||||||
private async void OnPluginUninstalled(object sender, GenericEventArgs<IPlugin> e)
|
private async void OnPluginUninstalled(object sender, IPlugin e)
|
||||||
{
|
{
|
||||||
await SendMessageToAdminSessions("PluginUninstalled", e.Argument.GetPluginInfo()).ConfigureAwait(false);
|
await SendMessageToAdminSessions("PluginUninstalled", e).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
47
Emby.Server.Implementations/Images/ArtistImageProvider.cs
Normal file
47
Emby.Server.Implementations/Images/ArtistImageProvider.cs
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using Emby.Server.Implementations.Images;
|
||||||
|
using MediaBrowser.Common.Configuration;
|
||||||
|
using MediaBrowser.Controller.Drawing;
|
||||||
|
using MediaBrowser.Controller.Dto;
|
||||||
|
using MediaBrowser.Controller.Entities;
|
||||||
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
|
using MediaBrowser.Controller.Entities.Movies;
|
||||||
|
using MediaBrowser.Controller.Entities.TV;
|
||||||
|
using MediaBrowser.Controller.Library;
|
||||||
|
using MediaBrowser.Controller.Playlists;
|
||||||
|
using MediaBrowser.Controller.Providers;
|
||||||
|
using MediaBrowser.Model.Entities;
|
||||||
|
using MediaBrowser.Model.IO;
|
||||||
|
using MediaBrowser.Model.Querying;
|
||||||
|
|
||||||
|
namespace Emby.Server.Implementations.Images
|
||||||
|
{
|
||||||
|
public class ArtistImageProvider : BaseDynamicImageProvider<MusicArtist>
|
||||||
|
{
|
||||||
|
private readonly ILibraryManager _libraryManager;
|
||||||
|
|
||||||
|
public ArtistImageProvider(IFileSystem fileSystem, IProviderManager providerManager, IApplicationPaths applicationPaths, IImageProcessor imageProcessor, ILibraryManager libraryManager) : base(fileSystem, providerManager, applicationPaths, imageProcessor)
|
||||||
|
{
|
||||||
|
_libraryManager = libraryManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override IReadOnlyList<BaseItem> GetItemsWithImages(BaseItem item)
|
||||||
|
{
|
||||||
|
return Array.Empty<BaseItem>();
|
||||||
|
|
||||||
|
// TODO enable this when BaseDynamicImageProvider objects are configurable
|
||||||
|
// return _libraryManager.GetItemList(new InternalItemsQuery
|
||||||
|
// {
|
||||||
|
// ArtistIds = new[] { item.Id },
|
||||||
|
// IncludeItemTypes = new[] { typeof(MusicAlbum).Name },
|
||||||
|
// OrderBy = new[] { (ItemSortBy.Random, SortOrder.Ascending) },
|
||||||
|
// Limit = 4,
|
||||||
|
// Recursive = true,
|
||||||
|
// ImageTypes = new[] { ImageType.Primary },
|
||||||
|
// DtoOptions = new DtoOptions(false)
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -194,7 +194,8 @@ namespace Emby.Server.Implementations.Images
|
|||||||
return outputPath;
|
return outputPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual string CreateImage(BaseItem item,
|
protected virtual string CreateImage(
|
||||||
|
BaseItem item,
|
||||||
IReadOnlyCollection<BaseItem> itemsWithImages,
|
IReadOnlyCollection<BaseItem> itemsWithImages,
|
||||||
string outputPathWithoutExtension,
|
string outputPathWithoutExtension,
|
||||||
ImageType imageType,
|
ImageType imageType,
|
||||||
@ -214,7 +215,12 @@ namespace Emby.Server.Implementations.Images
|
|||||||
|
|
||||||
if (imageType == ImageType.Primary)
|
if (imageType == ImageType.Primary)
|
||||||
{
|
{
|
||||||
if (item is UserView || item is Playlist || item is MusicGenre || item is Genre || item is PhotoAlbum)
|
if (item is UserView
|
||||||
|
|| item is Playlist
|
||||||
|
|| item is MusicGenre
|
||||||
|
|| item is Genre
|
||||||
|
|| item is PhotoAlbum
|
||||||
|
|| item is MusicArtist)
|
||||||
{
|
{
|
||||||
return CreateSquareCollage(item, itemsWithImages, outputPath);
|
return CreateSquareCollage(item, itemsWithImages, outputPath);
|
||||||
}
|
}
|
||||||
@ -225,7 +231,7 @@ namespace Emby.Server.Implementations.Images
|
|||||||
throw new ArgumentException("Unexpected image type", nameof(imageType));
|
throw new ArgumentException("Unexpected image type", nameof(imageType));
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool HasChanged(BaseItem item, IDirectoryService directoryServicee)
|
public bool HasChanged(BaseItem item, IDirectoryService directoryService)
|
||||||
{
|
{
|
||||||
if (!Supports(item))
|
if (!Supports(item))
|
||||||
{
|
{
|
||||||
@ -236,6 +242,7 @@ namespace Emby.Server.Implementations.Images
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SupportedImages.Contains(ImageType.Thumb) && HasChanged(item, ImageType.Thumb))
|
if (SupportedImages.Contains(ImageType.Thumb) && HasChanged(item, ImageType.Thumb))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
@ -13,7 +13,7 @@ using MediaBrowser.Model.Entities;
|
|||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.UserViews
|
namespace Emby.Server.Implementations.Images
|
||||||
{
|
{
|
||||||
public class CollectionFolderImageProvider : BaseDynamicImageProvider<CollectionFolder>
|
public class CollectionFolderImageProvider : BaseDynamicImageProvider<CollectionFolder>
|
||||||
{
|
{
|
@ -16,7 +16,7 @@ using MediaBrowser.Controller.Providers;
|
|||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.UserViews
|
namespace Emby.Server.Implementations.Images
|
||||||
{
|
{
|
||||||
public class DynamicImageProvider : BaseDynamicImageProvider<UserView>
|
public class DynamicImageProvider : BaseDynamicImageProvider<UserView>
|
||||||
{
|
{
|
@ -13,7 +13,7 @@ using MediaBrowser.Model.Entities;
|
|||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.UserViews
|
namespace Emby.Server.Implementations.Images
|
||||||
{
|
{
|
||||||
public abstract class BaseFolderImageProvider<T> : BaseDynamicImageProvider<T>
|
public abstract class BaseFolderImageProvider<T> : BaseDynamicImageProvider<T>
|
||||||
where T : Folder, new()
|
where T : Folder, new()
|
||||||
@ -77,16 +77,12 @@ namespace Emby.Server.Implementations.UserViews
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item is Folder folder)
|
if (item is Folder && item.IsTopParent)
|
||||||
{
|
|
||||||
if (folder.IsTopParent)
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
//return item.SourceType == SourceType.Library;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,4 @@
|
|||||||
#pragma warning disable CS1591
|
using System;
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Emby.Server.Implementations.Images;
|
using Emby.Server.Implementations.Images;
|
||||||
@ -17,56 +16,8 @@ using MediaBrowser.Model.Entities;
|
|||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
|
|
||||||
namespace Emby.Server.Implementations.Playlists
|
namespace Emby.Server.Implementations.Images
|
||||||
{
|
{
|
||||||
public class PlaylistImageProvider : BaseDynamicImageProvider<Playlist>
|
|
||||||
{
|
|
||||||
public PlaylistImageProvider(IFileSystem fileSystem, IProviderManager providerManager, IApplicationPaths applicationPaths, IImageProcessor imageProcessor) : base(fileSystem, providerManager, applicationPaths, imageProcessor)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override IReadOnlyList<BaseItem> GetItemsWithImages(BaseItem item)
|
|
||||||
{
|
|
||||||
var playlist = (Playlist)item;
|
|
||||||
|
|
||||||
return playlist.GetManageableItems()
|
|
||||||
.Select(i =>
|
|
||||||
{
|
|
||||||
var subItem = i.Item2;
|
|
||||||
|
|
||||||
if (subItem is Episode episode)
|
|
||||||
{
|
|
||||||
var series = episode.Series;
|
|
||||||
if (series != null && series.HasImage(ImageType.Primary))
|
|
||||||
{
|
|
||||||
return series;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (subItem.HasImage(ImageType.Primary))
|
|
||||||
{
|
|
||||||
return subItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
var parent = subItem.GetOwner() ?? subItem.GetParent();
|
|
||||||
|
|
||||||
if (parent != null && parent.HasImage(ImageType.Primary))
|
|
||||||
{
|
|
||||||
if (parent is MusicAlbum)
|
|
||||||
{
|
|
||||||
return parent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
})
|
|
||||||
.Where(i => i != null)
|
|
||||||
.GroupBy(x => x.Id)
|
|
||||||
.Select(x => x.First())
|
|
||||||
.ToList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class MusicGenreImageProvider : BaseDynamicImageProvider<MusicGenre>
|
public class MusicGenreImageProvider : BaseDynamicImageProvider<MusicGenre>
|
||||||
{
|
{
|
||||||
private readonly ILibraryManager _libraryManager;
|
private readonly ILibraryManager _libraryManager;
|
66
Emby.Server.Implementations/Images/PlaylistImageProvider.cs
Normal file
66
Emby.Server.Implementations/Images/PlaylistImageProvider.cs
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
#pragma warning disable CS1591
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using MediaBrowser.Common.Configuration;
|
||||||
|
using MediaBrowser.Controller.Drawing;
|
||||||
|
using MediaBrowser.Controller.Entities;
|
||||||
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
|
using MediaBrowser.Controller.Entities.TV;
|
||||||
|
using MediaBrowser.Controller.Playlists;
|
||||||
|
using MediaBrowser.Controller.Providers;
|
||||||
|
using MediaBrowser.Model.Entities;
|
||||||
|
using MediaBrowser.Model.IO;
|
||||||
|
|
||||||
|
namespace Emby.Server.Implementations.Images
|
||||||
|
{
|
||||||
|
public class PlaylistImageProvider : BaseDynamicImageProvider<Playlist>
|
||||||
|
{
|
||||||
|
public PlaylistImageProvider(IFileSystem fileSystem, IProviderManager providerManager, IApplicationPaths applicationPaths, IImageProcessor imageProcessor) : base(fileSystem, providerManager, applicationPaths, imageProcessor)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override IReadOnlyList<BaseItem> GetItemsWithImages(BaseItem item)
|
||||||
|
{
|
||||||
|
var playlist = (Playlist)item;
|
||||||
|
|
||||||
|
return playlist.GetManageableItems()
|
||||||
|
.Select(i =>
|
||||||
|
{
|
||||||
|
var subItem = i.Item2;
|
||||||
|
|
||||||
|
var episode = subItem as Episode;
|
||||||
|
|
||||||
|
if (episode != null)
|
||||||
|
{
|
||||||
|
var series = episode.Series;
|
||||||
|
if (series != null && series.HasImage(ImageType.Primary))
|
||||||
|
{
|
||||||
|
return series;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (subItem.HasImage(ImageType.Primary))
|
||||||
|
{
|
||||||
|
return subItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
var parent = subItem.GetOwner() ?? subItem.GetParent();
|
||||||
|
|
||||||
|
if (parent != null && parent.HasImage(ImageType.Primary))
|
||||||
|
{
|
||||||
|
if (parent is MusicAlbum)
|
||||||
|
{
|
||||||
|
return parent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
})
|
||||||
|
.Where(i => i != null)
|
||||||
|
.GroupBy(x => x.Id)
|
||||||
|
.Select(x => x.First())
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -101,5 +101,18 @@
|
|||||||
"TaskRefreshLibrary": "Skann mediebibliotek",
|
"TaskRefreshLibrary": "Skann mediebibliotek",
|
||||||
"TaskRefreshChapterImagesDescription": "Lager forhåndsvisningsbilder for videoer som har kapitler.",
|
"TaskRefreshChapterImagesDescription": "Lager forhåndsvisningsbilder for videoer som har kapitler.",
|
||||||
"TaskRefreshChapterImages": "Trekk ut Kapittelbilder",
|
"TaskRefreshChapterImages": "Trekk ut Kapittelbilder",
|
||||||
"TaskCleanCacheDescription": "Sletter mellomlagrede filer som ikke lengre trengs av systemet."
|
"TaskCleanCacheDescription": "Sletter mellomlagrede filer som ikke lengre trengs av systemet.",
|
||||||
|
"TaskDownloadMissingSubtitlesDescription": "Søker etter manglende underteksting på nett basert på metadatakonfigurasjon.",
|
||||||
|
"TaskDownloadMissingSubtitles": "Last ned manglende underteksting",
|
||||||
|
"TaskRefreshChannelsDescription": "Frisker opp internettkanalinformasjon.",
|
||||||
|
"TaskRefreshChannels": "Oppfrisk kanaler",
|
||||||
|
"TaskCleanTranscodeDescription": "Sletter omkodede filer som er mer enn én dag gamle.",
|
||||||
|
"TaskCleanTranscode": "Tøm transkodingmappe",
|
||||||
|
"TaskUpdatePluginsDescription": "Laster ned og installerer oppdateringer for utvidelser som er stilt inn til å oppdatere automatisk.",
|
||||||
|
"TaskUpdatePlugins": "Oppdater utvidelser",
|
||||||
|
"TaskRefreshPeopleDescription": "Oppdaterer metadata for skuespillere og regissører i mediebiblioteket ditt.",
|
||||||
|
"TaskRefreshPeople": "Oppfrisk personer",
|
||||||
|
"TaskCleanLogsDescription": "Sletter loggfiler som er eldre enn {0} dager gamle.",
|
||||||
|
"TaskCleanLogs": "Tøm loggmappe",
|
||||||
|
"TaskRefreshLibraryDescription": "Skanner mediebibliotekene dine for nye filer og oppdaterer metadata."
|
||||||
}
|
}
|
||||||
|
@ -113,5 +113,6 @@
|
|||||||
"TasksChannelsCategory": "Spletni kanali",
|
"TasksChannelsCategory": "Spletni kanali",
|
||||||
"TasksApplicationCategory": "Aplikacija",
|
"TasksApplicationCategory": "Aplikacija",
|
||||||
"TasksLibraryCategory": "Knjižnica",
|
"TasksLibraryCategory": "Knjižnica",
|
||||||
"TasksMaintenanceCategory": "Vzdrževanje"
|
"TasksMaintenanceCategory": "Vzdrževanje",
|
||||||
|
"TaskDownloadMissingSubtitlesDescription": "Na podlagi nastavitev metapodatkov poišče manjkajoče podnapise na internetu."
|
||||||
}
|
}
|
||||||
|
@ -82,11 +82,11 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|||||||
}
|
}
|
||||||
catch (HttpException ex)
|
catch (HttpException ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "Error downloading {0}", package.name);
|
_logger.LogError(ex, "Error downloading {0}", package.Name);
|
||||||
}
|
}
|
||||||
catch (IOException ex)
|
catch (IOException ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "Error updating {0}", package.name);
|
_logger.LogError(ex, "Error updating {0}", package.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update progress
|
// Update progress
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#pragma warning disable CS1591
|
#pragma warning disable CS1591
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
@ -97,25 +98,25 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public event EventHandler<InstallationEventArgs> PackageInstalling;
|
public event EventHandler<InstallationInfo> PackageInstalling;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public event EventHandler<InstallationEventArgs> PackageInstallationCompleted;
|
public event EventHandler<InstallationInfo> PackageInstallationCompleted;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public event EventHandler<InstallationFailedEventArgs> PackageInstallationFailed;
|
public event EventHandler<InstallationFailedEventArgs> PackageInstallationFailed;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public event EventHandler<InstallationEventArgs> PackageInstallationCancelled;
|
public event EventHandler<InstallationInfo> PackageInstallationCancelled;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public event EventHandler<GenericEventArgs<IPlugin>> PluginUninstalled;
|
public event EventHandler<IPlugin> PluginUninstalled;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public event EventHandler<GenericEventArgs<(IPlugin, VersionInfo)>> PluginUpdated;
|
public event EventHandler<InstallationInfo> PluginUpdated;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public event EventHandler<GenericEventArgs<VersionInfo>> PluginInstalled;
|
public event EventHandler<InstallationInfo> PluginInstalled;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public IEnumerable<InstallationInfo> CompletedInstallations => _completedInstallationsInternal;
|
public IEnumerable<InstallationInfo> CompletedInstallations => _completedInstallationsInternal;
|
||||||
@ -183,24 +184,7 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public IEnumerable<VersionInfo> GetCompatibleVersions(
|
public IEnumerable<InstallationInfo> GetCompatibleVersions(
|
||||||
IEnumerable<VersionInfo> availableVersions,
|
|
||||||
Version minVersion = null)
|
|
||||||
{
|
|
||||||
var appVer = _applicationHost.ApplicationVersion;
|
|
||||||
availableVersions = availableVersions
|
|
||||||
.Where(x => Version.Parse(x.targetAbi) <= appVer);
|
|
||||||
|
|
||||||
if (minVersion != null)
|
|
||||||
{
|
|
||||||
availableVersions = availableVersions.Where(x => x.version >= minVersion);
|
|
||||||
}
|
|
||||||
|
|
||||||
return availableVersions.OrderByDescending(x => x.version);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public IEnumerable<VersionInfo> GetCompatibleVersions(
|
|
||||||
IEnumerable<PackageInfo> availablePackages,
|
IEnumerable<PackageInfo> availablePackages,
|
||||||
string name = null,
|
string name = null,
|
||||||
Guid guid = default,
|
Guid guid = default,
|
||||||
@ -211,28 +195,46 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
// Package not found in repository
|
// Package not found in repository
|
||||||
if (package == null)
|
if (package == null)
|
||||||
{
|
{
|
||||||
return Enumerable.Empty<VersionInfo>();
|
yield break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return GetCompatibleVersions(
|
var appVer = _applicationHost.ApplicationVersion;
|
||||||
package.versions,
|
var availableVersions = package.versions
|
||||||
minVersion);
|
.Where(x => Version.Parse(x.targetAbi) <= appVer);
|
||||||
|
|
||||||
|
if (minVersion != null)
|
||||||
|
{
|
||||||
|
availableVersions = availableVersions.Where(x => new Version(x.version) >= minVersion);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var v in availableVersions.OrderByDescending(x => x.version))
|
||||||
|
{
|
||||||
|
yield return new InstallationInfo
|
||||||
|
{
|
||||||
|
Changelog = v.changelog,
|
||||||
|
Guid = new Guid(package.guid),
|
||||||
|
Name = package.name,
|
||||||
|
Version = new Version(v.version),
|
||||||
|
SourceUrl = v.sourceUrl,
|
||||||
|
Checksum = v.checksum
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public async Task<IEnumerable<VersionInfo>> GetAvailablePluginUpdates(CancellationToken cancellationToken = default)
|
public async Task<IEnumerable<InstallationInfo>> GetAvailablePluginUpdates(CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
var catalog = await GetAvailablePackages(cancellationToken).ConfigureAwait(false);
|
var catalog = await GetAvailablePackages(cancellationToken).ConfigureAwait(false);
|
||||||
return GetAvailablePluginUpdates(catalog);
|
return GetAvailablePluginUpdates(catalog);
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerable<VersionInfo> GetAvailablePluginUpdates(IReadOnlyList<PackageInfo> pluginCatalog)
|
private IEnumerable<InstallationInfo> GetAvailablePluginUpdates(IReadOnlyList<PackageInfo> pluginCatalog)
|
||||||
{
|
{
|
||||||
foreach (var plugin in _applicationHost.Plugins)
|
foreach (var plugin in _applicationHost.Plugins)
|
||||||
{
|
{
|
||||||
var compatibleversions = GetCompatibleVersions(pluginCatalog, plugin.Name, plugin.Id, plugin.Version);
|
var compatibleversions = GetCompatibleVersions(pluginCatalog, plugin.Name, plugin.Id, plugin.Version);
|
||||||
var version = compatibleversions.FirstOrDefault(y => y.version > plugin.Version);
|
var version = compatibleversions.FirstOrDefault(y => y.Version > plugin.Version);
|
||||||
if (version != null && !CompletedInstallations.Any(x => string.Equals(x.Guid, version.guid, StringComparison.OrdinalIgnoreCase)))
|
if (version != null && CompletedInstallations.All(x => x.Guid != version.Guid))
|
||||||
{
|
{
|
||||||
yield return version;
|
yield return version;
|
||||||
}
|
}
|
||||||
@ -240,23 +242,16 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public async Task InstallPackage(VersionInfo package, CancellationToken cancellationToken)
|
public async Task InstallPackage(InstallationInfo package, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
if (package == null)
|
if (package == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(package));
|
throw new ArgumentNullException(nameof(package));
|
||||||
}
|
}
|
||||||
|
|
||||||
var installationInfo = new InstallationInfo
|
|
||||||
{
|
|
||||||
Guid = package.guid,
|
|
||||||
Name = package.name,
|
|
||||||
Version = package.version.ToString()
|
|
||||||
};
|
|
||||||
|
|
||||||
var innerCancellationTokenSource = new CancellationTokenSource();
|
var innerCancellationTokenSource = new CancellationTokenSource();
|
||||||
|
|
||||||
var tuple = (installationInfo, innerCancellationTokenSource);
|
var tuple = (package, innerCancellationTokenSource);
|
||||||
|
|
||||||
// Add it to the in-progress list
|
// Add it to the in-progress list
|
||||||
lock (_currentInstallationsLock)
|
lock (_currentInstallationsLock)
|
||||||
@ -266,13 +261,7 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
|
|
||||||
var linkedToken = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, innerCancellationTokenSource.Token).Token;
|
var linkedToken = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, innerCancellationTokenSource.Token).Token;
|
||||||
|
|
||||||
var installationEventArgs = new InstallationEventArgs
|
PackageInstalling?.Invoke(this, package);
|
||||||
{
|
|
||||||
InstallationInfo = installationInfo,
|
|
||||||
VersionInfo = package
|
|
||||||
};
|
|
||||||
|
|
||||||
PackageInstalling?.Invoke(this, installationEventArgs);
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -283,9 +272,9 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
_currentInstallations.Remove(tuple);
|
_currentInstallations.Remove(tuple);
|
||||||
}
|
}
|
||||||
|
|
||||||
_completedInstallationsInternal.Add(installationInfo);
|
_completedInstallationsInternal.Add(package);
|
||||||
|
|
||||||
PackageInstallationCompleted?.Invoke(this, installationEventArgs);
|
PackageInstallationCompleted?.Invoke(this, package);
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException)
|
catch (OperationCanceledException)
|
||||||
{
|
{
|
||||||
@ -294,9 +283,9 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
_currentInstallations.Remove(tuple);
|
_currentInstallations.Remove(tuple);
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.LogInformation("Package installation cancelled: {0} {1}", package.name, package.version);
|
_logger.LogInformation("Package installation cancelled: {0} {1}", package.Name, package.Version);
|
||||||
|
|
||||||
PackageInstallationCancelled?.Invoke(this, installationEventArgs);
|
PackageInstallationCancelled?.Invoke(this, package);
|
||||||
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
@ -311,7 +300,7 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
|
|
||||||
PackageInstallationFailed?.Invoke(this, new InstallationFailedEventArgs
|
PackageInstallationFailed?.Invoke(this, new InstallationFailedEventArgs
|
||||||
{
|
{
|
||||||
InstallationInfo = installationInfo,
|
InstallationInfo = package,
|
||||||
Exception = ex
|
Exception = ex
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -330,11 +319,11 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
/// <param name="package">The package.</param>
|
/// <param name="package">The package.</param>
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
/// <returns><see cref="Task" />.</returns>
|
/// <returns><see cref="Task" />.</returns>
|
||||||
private async Task InstallPackageInternal(VersionInfo package, CancellationToken cancellationToken)
|
private async Task InstallPackageInternal(InstallationInfo package, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
// Set last update time if we were installed before
|
// Set last update time if we were installed before
|
||||||
IPlugin plugin = _applicationHost.Plugins.FirstOrDefault(p => string.Equals(p.Id.ToString(), package.guid, StringComparison.OrdinalIgnoreCase))
|
IPlugin plugin = _applicationHost.Plugins.FirstOrDefault(p => p.Id == package.Guid)
|
||||||
?? _applicationHost.Plugins.FirstOrDefault(p => p.Name.Equals(package.name, StringComparison.OrdinalIgnoreCase));
|
?? _applicationHost.Plugins.FirstOrDefault(p => p.Name.Equals(package.Name, StringComparison.OrdinalIgnoreCase));
|
||||||
|
|
||||||
// Do the install
|
// Do the install
|
||||||
await PerformPackageInstallation(package, cancellationToken).ConfigureAwait(false);
|
await PerformPackageInstallation(package, cancellationToken).ConfigureAwait(false);
|
||||||
@ -342,38 +331,38 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
// Do plugin-specific processing
|
// Do plugin-specific processing
|
||||||
if (plugin == null)
|
if (plugin == null)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("New plugin installed: {0} {1} {2}", package.name, package.version);
|
_logger.LogInformation("New plugin installed: {0} {1}", package.Name, package.Version);
|
||||||
|
|
||||||
PluginInstalled?.Invoke(this, new GenericEventArgs<VersionInfo>(package));
|
PluginInstalled?.Invoke(this, package);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_logger.LogInformation("Plugin updated: {0} {1} {2}", package.name, package.version);
|
_logger.LogInformation("Plugin updated: {0} {1}", package.Name, package.Version);
|
||||||
|
|
||||||
PluginUpdated?.Invoke(this, new GenericEventArgs<(IPlugin, VersionInfo)>((plugin, package)));
|
PluginUpdated?.Invoke(this, package);
|
||||||
}
|
}
|
||||||
|
|
||||||
_applicationHost.NotifyPendingRestart();
|
_applicationHost.NotifyPendingRestart();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task PerformPackageInstallation(VersionInfo package, CancellationToken cancellationToken)
|
private async Task PerformPackageInstallation(InstallationInfo package, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var extension = Path.GetExtension(package.filename);
|
var extension = Path.GetExtension(package.SourceUrl);
|
||||||
if (!string.Equals(extension, ".zip", StringComparison.OrdinalIgnoreCase))
|
if (!string.Equals(extension, ".zip", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
_logger.LogError("Only zip packages are supported. {Filename} is not a zip archive.", package.filename);
|
_logger.LogError("Only zip packages are supported. {SourceUrl} is not a zip archive.", package.SourceUrl);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Always override the passed-in target (which is a file) and figure it out again
|
// Always override the passed-in target (which is a file) and figure it out again
|
||||||
string targetDir = Path.Combine(_appPaths.PluginsPath, package.name);
|
string targetDir = Path.Combine(_appPaths.PluginsPath, package.Name);
|
||||||
|
|
||||||
// CA5351: Do Not Use Broken Cryptographic Algorithms
|
// CA5351: Do Not Use Broken Cryptographic Algorithms
|
||||||
#pragma warning disable CA5351
|
#pragma warning disable CA5351
|
||||||
using (var res = await _httpClient.SendAsync(
|
using (var res = await _httpClient.SendAsync(
|
||||||
new HttpRequestOptions
|
new HttpRequestOptions
|
||||||
{
|
{
|
||||||
Url = package.sourceUrl,
|
Url = package.SourceUrl,
|
||||||
CancellationToken = cancellationToken,
|
CancellationToken = cancellationToken,
|
||||||
// We need it to be buffered for setting the position
|
// We need it to be buffered for setting the position
|
||||||
BufferContent = true
|
BufferContent = true
|
||||||
@ -385,12 +374,12 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
var hash = Hex.Encode(md5.ComputeHash(stream));
|
var hash = Hex.Encode(md5.ComputeHash(stream));
|
||||||
if (!string.Equals(package.checksum, hash, StringComparison.OrdinalIgnoreCase))
|
if (!string.Equals(package.Checksum, hash, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
_logger.LogError(
|
_logger.LogError(
|
||||||
"The checksums didn't match while installing {Package}, expected: {Expected}, got: {Received}",
|
"The checksums didn't match while installing {Package}, expected: {Expected}, got: {Received}",
|
||||||
package.name,
|
package.Name,
|
||||||
package.checksum,
|
package.Checksum,
|
||||||
hash);
|
hash);
|
||||||
throw new InvalidDataException("The checksum of the received data doesn't match.");
|
throw new InvalidDataException("The checksum of the received data doesn't match.");
|
||||||
}
|
}
|
||||||
@ -456,7 +445,7 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
_config.SaveConfiguration();
|
_config.SaveConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginUninstalled?.Invoke(this, new GenericEventArgs<IPlugin>(plugin));
|
PluginUninstalled?.Invoke(this, plugin);
|
||||||
|
|
||||||
_applicationHost.NotifyPendingRestart();
|
_applicationHost.NotifyPendingRestart();
|
||||||
}
|
}
|
||||||
@ -466,7 +455,7 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
{
|
{
|
||||||
lock (_currentInstallationsLock)
|
lock (_currentInstallationsLock)
|
||||||
{
|
{
|
||||||
var install = _currentInstallations.Find(x => x.info.Guid == id.ToString());
|
var install = _currentInstallations.Find(x => x.info.Guid == id);
|
||||||
if (install == default((InstallationInfo, CancellationTokenSource)))
|
if (install == default((InstallationInfo, CancellationTokenSource)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -486,9 +475,9 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Releases unmanaged and - optionally - managed resources.
|
/// Releases unmanaged and optionally managed resources.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dispose"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
|
/// <param name="dispose"><c>true</c> to release both managed and unmanaged resources or <c>false</c> to release only unmanaged resources.</param>
|
||||||
protected virtual void Dispose(bool dispose)
|
protected virtual void Dispose(bool dispose)
|
||||||
{
|
{
|
||||||
if (dispose)
|
if (dispose)
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
<TargetFramework>netstandard2.1</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#nullable disable
|
||||||
|
|
||||||
namespace Jellyfin.Api.Models.StartupDtos
|
namespace Jellyfin.Api.Models.StartupDtos
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#nullable disable
|
||||||
|
|
||||||
namespace Jellyfin.Api.Models.StartupDtos
|
namespace Jellyfin.Api.Models.StartupDtos
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
|
<TreatWarningsAsErrors Condition=" '$(Configuration)' == 'Release' ">true</TreatWarningsAsErrors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
|
@ -53,9 +53,7 @@ namespace Jellyfin.Drawing.Skia
|
|||||||
"jpeg",
|
"jpeg",
|
||||||
"jpg",
|
"jpg",
|
||||||
"png",
|
"png",
|
||||||
|
|
||||||
"dng",
|
"dng",
|
||||||
|
|
||||||
"webp",
|
"webp",
|
||||||
"gif",
|
"gif",
|
||||||
"bmp",
|
"bmp",
|
||||||
@ -64,10 +62,8 @@ namespace Jellyfin.Drawing.Skia
|
|||||||
"ktx",
|
"ktx",
|
||||||
"pkm",
|
"pkm",
|
||||||
"wbmp",
|
"wbmp",
|
||||||
|
// TODO: check if these are supported on multiple platforms
|
||||||
// TODO
|
// https://github.com/google/skia/blob/master/infra/bots/recipes/test.py#L454
|
||||||
// Are all of these supported? https://github.com/google/skia/blob/master/infra/bots/recipes/test.py#L454
|
|
||||||
|
|
||||||
// working on windows at least
|
// working on windows at least
|
||||||
"cr2",
|
"cr2",
|
||||||
"nef",
|
"nef",
|
||||||
@ -272,7 +268,7 @@ namespace Jellyfin.Drawing.Skia
|
|||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
var tempPath = Path.Combine(_appPaths.TempDirectory, Guid.NewGuid() + Path.GetExtension(path) ?? string.Empty);
|
var tempPath = Path.Combine(_appPaths.TempDirectory, Guid.NewGuid() + Path.GetExtension(path));
|
||||||
|
|
||||||
Directory.CreateDirectory(Path.GetDirectoryName(tempPath));
|
Directory.CreateDirectory(Path.GetDirectoryName(tempPath));
|
||||||
File.Copy(path, tempPath, true);
|
File.Copy(path, tempPath, true);
|
||||||
|
20
MediaBrowser.Common/Configuration/ConfigurationStore.cs
Normal file
20
MediaBrowser.Common/Configuration/ConfigurationStore.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace MediaBrowser.Common.Configuration
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Describes a single entry in the application configuration.
|
||||||
|
/// </summary>
|
||||||
|
public class ConfigurationStore
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the unique identifier for the configuration.
|
||||||
|
/// </summary>
|
||||||
|
public string Key { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the type used to store the data for this configuration entry.
|
||||||
|
/// </summary>
|
||||||
|
public Type ConfigurationType { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -3,12 +3,12 @@ using MediaBrowser.Model.Configuration;
|
|||||||
namespace MediaBrowser.Common.Configuration
|
namespace MediaBrowser.Common.Configuration
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interface IApplicationPaths
|
/// Interface IApplicationPaths.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IApplicationPaths
|
public interface IApplicationPaths
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the path to the program data folder
|
/// Gets the path to the program data folder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The program data path.</value>
|
/// <value>The program data path.</value>
|
||||||
string ProgramDataPath { get; }
|
string ProgramDataPath { get; }
|
||||||
@ -23,13 +23,13 @@ namespace MediaBrowser.Common.Configuration
|
|||||||
string WebPath { get; }
|
string WebPath { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the path to the program system folder
|
/// Gets the path to the program system folder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The program data path.</value>
|
/// <value>The program data path.</value>
|
||||||
string ProgramSystemPath { get; }
|
string ProgramSystemPath { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the folder path to the data directory
|
/// Gets the folder path to the data directory.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The data directory.</value>
|
/// <value>The data directory.</value>
|
||||||
string DataPath { get; }
|
string DataPath { get; }
|
||||||
@ -41,43 +41,43 @@ namespace MediaBrowser.Common.Configuration
|
|||||||
string ImageCachePath { get; }
|
string ImageCachePath { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the path to the plugin directory
|
/// Gets the path to the plugin directory.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The plugins path.</value>
|
/// <value>The plugins path.</value>
|
||||||
string PluginsPath { get; }
|
string PluginsPath { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the path to the plugin configurations directory
|
/// Gets the path to the plugin configurations directory.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The plugin configurations path.</value>
|
/// <value>The plugin configurations path.</value>
|
||||||
string PluginConfigurationsPath { get; }
|
string PluginConfigurationsPath { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the path to the log directory
|
/// Gets the path to the log directory.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The log directory path.</value>
|
/// <value>The log directory path.</value>
|
||||||
string LogDirectoryPath { get; }
|
string LogDirectoryPath { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the path to the application configuration root directory
|
/// Gets the path to the application configuration root directory.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The configuration directory path.</value>
|
/// <value>The configuration directory path.</value>
|
||||||
string ConfigurationDirectoryPath { get; }
|
string ConfigurationDirectoryPath { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the path to the system configuration file
|
/// Gets the path to the system configuration file.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The system configuration file path.</value>
|
/// <value>The system configuration file path.</value>
|
||||||
string SystemConfigurationFilePath { get; }
|
string SystemConfigurationFilePath { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the folder path to the cache directory
|
/// Gets the folder path to the cache directory.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The cache directory.</value>
|
/// <value>The cache directory.</value>
|
||||||
string CachePath { get; }
|
string CachePath { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the folder path to the temp directory within the cache folder
|
/// Gets the folder path to the temp directory within the cache folder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The temp directory.</value>
|
/// <value>The temp directory.</value>
|
||||||
string TempDirectory { get; }
|
string TempDirectory { get; }
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace MediaBrowser.Common.Configuration
|
namespace MediaBrowser.Common.Configuration
|
||||||
@ -15,33 +14,4 @@ namespace MediaBrowser.Common.Configuration
|
|||||||
/// <returns>The configuration store.</returns>
|
/// <returns>The configuration store.</returns>
|
||||||
IEnumerable<ConfigurationStore> GetConfigurations();
|
IEnumerable<ConfigurationStore> GetConfigurations();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Describes a single entry in the application configuration.
|
|
||||||
/// </summary>
|
|
||||||
public class ConfigurationStore
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the unique identifier for the configuration.
|
|
||||||
/// </summary>
|
|
||||||
public string Key { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the type used to store the data for this configuration entry.
|
|
||||||
/// </summary>
|
|
||||||
public Type ConfigurationType { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A configuration store that can be validated.
|
|
||||||
/// </summary>
|
|
||||||
public interface IValidatingConfiguration
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Validation method to be invoked before saving the configuration.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="oldConfig">The old configuration.</param>
|
|
||||||
/// <param name="newConfig">The new configuration.</param>
|
|
||||||
void Validate(object oldConfig, object newConfig);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ namespace MediaBrowser.Common.Configuration
|
|||||||
event EventHandler<ConfigurationUpdateEventArgs> NamedConfigurationUpdated;
|
event EventHandler<ConfigurationUpdateEventArgs> NamedConfigurationUpdated;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the application paths.
|
/// Gets the application paths.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The application paths.</value>
|
/// <value>The application paths.</value>
|
||||||
IApplicationPaths CommonApplicationPaths { get; }
|
IApplicationPaths CommonApplicationPaths { get; }
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
namespace MediaBrowser.Common.Configuration
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A configuration store that can be validated.
|
||||||
|
/// </summary>
|
||||||
|
public interface IValidatingConfiguration
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Validation method to be invoked before saving the configuration.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oldConfig">The old configuration.</param>
|
||||||
|
/// <param name="newConfig">The new configuration.</param>
|
||||||
|
void Validate(object oldConfig, object newConfig);
|
||||||
|
}
|
||||||
|
}
|
@ -37,7 +37,7 @@
|
|||||||
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
|
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8" PrivateAssets="All" />
|
||||||
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" PrivateAssets="All" />
|
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" PrivateAssets="All" />
|
||||||
<!-- <PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" /> -->
|
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
|
||||||
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" PrivateAssets="All" />
|
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
11
MediaBrowser.Common/Net/CacheMode.cs
Normal file
11
MediaBrowser.Common/Net/CacheMode.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#pragma warning disable CS1591
|
||||||
|
#pragma warning disable SA1602
|
||||||
|
|
||||||
|
namespace MediaBrowser.Common.Net
|
||||||
|
{
|
||||||
|
public enum CacheMode
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
Unconditional = 1
|
||||||
|
}
|
||||||
|
}
|
15
MediaBrowser.Common/Net/CompressionMethods.cs
Normal file
15
MediaBrowser.Common/Net/CompressionMethods.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#pragma warning disable CS1591
|
||||||
|
#pragma warning disable SA1602
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace MediaBrowser.Common.Net
|
||||||
|
{
|
||||||
|
[Flags]
|
||||||
|
public enum CompressionMethods
|
||||||
|
{
|
||||||
|
None = 0b00000001,
|
||||||
|
Deflate = 0b00000010,
|
||||||
|
Gzip = 0b00000100
|
||||||
|
}
|
||||||
|
}
|
@ -102,18 +102,4 @@ namespace MediaBrowser.Common.Net
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum CacheMode
|
|
||||||
{
|
|
||||||
None = 0,
|
|
||||||
Unconditional = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
[Flags]
|
|
||||||
public enum CompressionMethods
|
|
||||||
{
|
|
||||||
None = 0b00000001,
|
|
||||||
Deflate = 0b00000010,
|
|
||||||
Gzip = 0b00000100
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -5,15 +5,16 @@ using System;
|
|||||||
namespace MediaBrowser.Common.Progress
|
namespace MediaBrowser.Common.Progress
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class ActionableProgress
|
/// Class ActionableProgress.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="T"></typeparam>
|
/// <typeparam name="T">The type for the action parameter.</typeparam>
|
||||||
public class ActionableProgress<T> : IProgress<T>
|
public class ActionableProgress<T> : IProgress<T>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The _actions
|
/// The _actions.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private Action<T> _action;
|
private Action<T> _action;
|
||||||
|
|
||||||
public event EventHandler<T> ProgressChanged;
|
public event EventHandler<T> ProgressChanged;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -32,14 +33,4 @@ namespace MediaBrowser.Common.Progress
|
|||||||
_action?.Invoke(value);
|
_action?.Invoke(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SimpleProgress<T> : IProgress<T>
|
|
||||||
{
|
|
||||||
public event EventHandler<T> ProgressChanged;
|
|
||||||
|
|
||||||
public void Report(T value)
|
|
||||||
{
|
|
||||||
ProgressChanged?.Invoke(this, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
16
MediaBrowser.Common/Progress/SimpleProgress.cs
Normal file
16
MediaBrowser.Common/Progress/SimpleProgress.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#pragma warning disable CS1591
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace MediaBrowser.Common.Progress
|
||||||
|
{
|
||||||
|
public class SimpleProgress<T> : IProgress<T>
|
||||||
|
{
|
||||||
|
public event EventHandler<T> ProgressChanged;
|
||||||
|
|
||||||
|
public void Report(T value)
|
||||||
|
{
|
||||||
|
ProgressChanged?.Invoke(this, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -12,28 +12,28 @@ namespace MediaBrowser.Common.Updates
|
|||||||
{
|
{
|
||||||
public interface IInstallationManager : IDisposable
|
public interface IInstallationManager : IDisposable
|
||||||
{
|
{
|
||||||
event EventHandler<InstallationEventArgs> PackageInstalling;
|
event EventHandler<InstallationInfo> PackageInstalling;
|
||||||
|
|
||||||
event EventHandler<InstallationEventArgs> PackageInstallationCompleted;
|
event EventHandler<InstallationInfo> PackageInstallationCompleted;
|
||||||
|
|
||||||
event EventHandler<InstallationFailedEventArgs> PackageInstallationFailed;
|
event EventHandler<InstallationFailedEventArgs> PackageInstallationFailed;
|
||||||
|
|
||||||
event EventHandler<InstallationEventArgs> PackageInstallationCancelled;
|
event EventHandler<InstallationInfo> PackageInstallationCancelled;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Occurs when a plugin is uninstalled.
|
/// Occurs when a plugin is uninstalled.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
event EventHandler<GenericEventArgs<IPlugin>> PluginUninstalled;
|
event EventHandler<IPlugin> PluginUninstalled;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Occurs when a plugin is updated.
|
/// Occurs when a plugin is updated.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
event EventHandler<GenericEventArgs<(IPlugin, VersionInfo)>> PluginUpdated;
|
event EventHandler<InstallationInfo> PluginUpdated;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Occurs when a plugin is installed.
|
/// Occurs when a plugin is installed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
event EventHandler<GenericEventArgs<VersionInfo>> PluginInstalled;
|
event EventHandler<InstallationInfo> PluginInstalled;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the completed installations.
|
/// Gets the completed installations.
|
||||||
@ -59,16 +59,6 @@ namespace MediaBrowser.Common.Updates
|
|||||||
string name = null,
|
string name = null,
|
||||||
Guid guid = default);
|
Guid guid = default);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns all compatible versions ordered from newest to oldest.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="availableVersions">The available version of the plugin.</param>
|
|
||||||
/// <param name="minVersion">The minimum required version of the plugin.</param>
|
|
||||||
/// <returns>All compatible versions ordered from newest to oldest.</returns>
|
|
||||||
IEnumerable<VersionInfo> GetCompatibleVersions(
|
|
||||||
IEnumerable<VersionInfo> availableVersions,
|
|
||||||
Version minVersion = null);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns all compatible versions ordered from newest to oldest.
|
/// Returns all compatible versions ordered from newest to oldest.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -77,7 +67,7 @@ namespace MediaBrowser.Common.Updates
|
|||||||
/// <param name="guid">The guid of the plugin.</param>
|
/// <param name="guid">The guid of the plugin.</param>
|
||||||
/// <param name="minVersion">The minimum required version of the plugin.</param>
|
/// <param name="minVersion">The minimum required version of the plugin.</param>
|
||||||
/// <returns>All compatible versions ordered from newest to oldest.</returns>
|
/// <returns>All compatible versions ordered from newest to oldest.</returns>
|
||||||
IEnumerable<VersionInfo> GetCompatibleVersions(
|
IEnumerable<InstallationInfo> GetCompatibleVersions(
|
||||||
IEnumerable<PackageInfo> availablePackages,
|
IEnumerable<PackageInfo> availablePackages,
|
||||||
string name = null,
|
string name = null,
|
||||||
Guid guid = default,
|
Guid guid = default,
|
||||||
@ -88,7 +78,7 @@ namespace MediaBrowser.Common.Updates
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
/// <returns>The available plugin updates.</returns>
|
/// <returns>The available plugin updates.</returns>
|
||||||
Task<IEnumerable<VersionInfo>> GetAvailablePluginUpdates(CancellationToken cancellationToken = default);
|
Task<IEnumerable<InstallationInfo>> GetAvailablePluginUpdates(CancellationToken cancellationToken = default);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Installs the package.
|
/// Installs the package.
|
||||||
@ -96,7 +86,7 @@ namespace MediaBrowser.Common.Updates
|
|||||||
/// <param name="package">The package.</param>
|
/// <param name="package">The package.</param>
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
/// <returns><see cref="Task" />.</returns>
|
/// <returns><see cref="Task" />.</returns>
|
||||||
Task InstallPackage(VersionInfo package, CancellationToken cancellationToken = default);
|
Task InstallPackage(InstallationInfo package, CancellationToken cancellationToken = default);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Uninstalls a plugin.
|
/// Uninstalls a plugin.
|
||||||
|
@ -12,7 +12,7 @@ namespace MediaBrowser.Model.Updates
|
|||||||
/// Gets or sets the guid.
|
/// Gets or sets the guid.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The guid.</value>
|
/// <value>The guid.</value>
|
||||||
public string Guid { get; set; }
|
public Guid Guid { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name.
|
/// Gets or sets the name.
|
||||||
@ -24,6 +24,24 @@ namespace MediaBrowser.Model.Updates
|
|||||||
/// Gets or sets the version.
|
/// Gets or sets the version.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The version.</value>
|
/// <value>The version.</value>
|
||||||
public string Version { get; set; }
|
public Version Version { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the changelog for this version.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The changelog.</value>
|
||||||
|
public string Changelog { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the source URL.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The source URL.</value>
|
||||||
|
public string SourceUrl { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a checksum for the binary.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The checksum.</value>
|
||||||
|
public string Checksum { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,23 +9,11 @@ namespace MediaBrowser.Model.Updates
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class VersionInfo
|
public class VersionInfo
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the name.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
public string name { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the guid.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The guid.</value>
|
|
||||||
public string guid { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the version.
|
/// Gets or sets the version.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The version.</value>
|
/// <value>The version.</value>
|
||||||
public Version version { get; set; }
|
public string version { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the changelog for this version.
|
/// Gets or sets the changelog for this version.
|
||||||
@ -52,9 +40,9 @@ namespace MediaBrowser.Model.Updates
|
|||||||
public string checksum { get; set; }
|
public string checksum { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the target filename for the downloaded binary.
|
/// Gets or sets a timestamp of when the binary was built.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The target filename.</value>
|
/// <value>The timestamp.</value>
|
||||||
public string filename { get; set; }
|
public string timestamp { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.1</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user