37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using System;
|
|
using MediaBrowser.Controller.Configuration;
|
|
using MediaBrowser.Controller.Library;
|
|
using MediaBrowser.Model.IO;
|
|
|
|
namespace CinemaJellyfin;
|
|
|
|
/// <summary>
|
|
/// Global services that are resolved at startup and are
|
|
/// otherwise inaccessible to some classes (mostly folders).
|
|
/// </summary>
|
|
static class CinemaGlobals
|
|
{
|
|
#pragma warning disable CS8618
|
|
private static ILibraryManager _libraryManager;
|
|
private static IServerConfigurationManager _config;
|
|
private static IFileSystem _fileSystem;
|
|
#pragma warning restore CS8618
|
|
|
|
internal static void Initialize(ILibraryManager libraryManager, IServerConfigurationManager config, IFileSystem fileSystem)
|
|
{
|
|
_libraryManager = libraryManager;
|
|
_config = config;
|
|
_fileSystem = fileSystem;
|
|
}
|
|
|
|
public static ILibraryManager LibraryManager => _libraryManager;
|
|
|
|
public static IFileSystem FileSystem => _fileSystem;
|
|
|
|
public static string InternalMetadataPath => _config.ApplicationPaths.InternalMetadataPath;
|
|
|
|
public static string PreferredCulture => _config.Configuration.PreferredMetadataLanguage;
|
|
|
|
public static string FallbackCulture => "en";
|
|
}
|