Rename to jellyfin plugin naming conventions

This commit is contained in:
Claus Vium 2019-02-06 11:01:55 +01:00
parent f06b2b2dda
commit b37d905681
7 changed files with 49 additions and 6 deletions

View File

@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.136
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TMDbBoxSets", "TMDbBoxSets\TMDbBoxSets.csproj", "{A6C0029B-F304-4577-92D3-32153DCE1FDC}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Jellyfin.Plugin.TMDbBoxSets", "Jellyfin.Plugin.TMDbBoxSets\Jellyfin.Plugin.TMDbBoxSets.csproj", "{A6C0029B-F304-4577-92D3-32153DCE1FDC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@ -2,7 +2,7 @@ using System;
using MediaBrowser.Model.Services;
using Microsoft.Extensions.Logging;
namespace TMDbBoxSets.Api
namespace Jellyfin.Plugin.TMDbBoxSets.Api
{
[Route("/TMDbCollections/Refresh", "POST", Summary = "Refreshes collection metadata for all movies")]
public class RefreshMetadataRequest : IReturnVoid

View File

@ -1,6 +1,6 @@
using MediaBrowser.Model.Plugins;
namespace TMDbBoxSets.Configuration
namespace Jellyfin.Plugin.TMDbBoxSets.Configuration
{
public class PluginConfiguration : BasePluginConfiguration
{

View File

@ -1,12 +1,12 @@
using System;
using System.Collections.Generic;
using Jellyfin.Plugin.TMDbBoxSets.Configuration;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Model.Plugins;
using MediaBrowser.Model.Serialization;
using TMDbBoxSets.Configuration;
namespace TMDbBoxSets
namespace Jellyfin.Plugin.TMDbBoxSets
{
public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
{

View File

@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Controller.Collections;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Plugin.TMDbBoxSets.ScheduledTasks
{
public class RefreshLibraryTask : IScheduledTask
{
private readonly ILogger _logger;
private readonly TMDbBoxSetManager _tmDbBoxSetManager;
public RefreshLibraryTask(ILibraryManager libraryManager, ICollectionManager collectionManager, ILogger logger)
{
_logger = logger;
_tmDbBoxSetManager = new TMDbBoxSetManager(libraryManager, collectionManager, logger);
}
public Task Execute(CancellationToken cancellationToken, IProgress<double> progress)
{
_logger.LogInformation("Starting TMDbBoxSets refresh library task");
_tmDbBoxSetManager.ScanLibrary(progress);
_logger.LogInformation("TMDbBoxSets refresh library task finished");
return Task.CompletedTask;
}
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
{
// Run this task every 24 hours
return new[] {
new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks}
};
}
public string Name => "Scan library for new box sets";
public string Key => "TMDbBoxSetsRefreshLibraryTask";
public string Description => "Scans all libraries for movies and adds them to box sets if the conditions are met";
public string Category => "TMDb";
}
}

View File

@ -12,7 +12,7 @@ using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Querying;
using Microsoft.Extensions.Logging;
namespace TMDbBoxSets
namespace Jellyfin.Plugin.TMDbBoxSets
{
public class TMDbBoxSetManager : IServerEntryPoint
{