Merge remote-tracking branch 'upstream/master'

pull/2099/head
Petr Janda 5 years ago
commit 1cec41baf8

@ -30,6 +30,7 @@ assignees: ''
- OS: [e.g. Docker, Debian, Windows] - OS: [e.g. Docker, Debian, Windows]
- Browser: [e.g. Firefox, Chrome, Safari] - Browser: [e.g. Firefox, Chrome, Safari]
- Jellyfin Version: [e.g. 10.0.1] - Jellyfin Version: [e.g. 10.0.1]
- Installed Plugins: [e.g. none, Fanart, Anime, etc.]
- Reverse proxy: [e.g. no, nginx, apache, etc.] - Reverse proxy: [e.g. no, nginx, apache, etc.]
**Additional context** **Additional context**

@ -314,7 +314,7 @@ namespace Emby.Naming.Common
// This isn't a Kodi naming rule, but the expression below causes false positives, // This isn't a Kodi naming rule, but the expression below causes false positives,
// so we make sure this one gets tested first. // so we make sure this one gets tested first.
// "Foo Bar 889" // "Foo Bar 889"
new EpisodeExpression(@".*[\\\/](?![Ee]pisode)(?<seriesname>(\w+\s*?)*)\s(?<epnumber>\d{1,3})(-(?<endingepnumber>\d{2,3}))*[^\\\/]*$") new EpisodeExpression(@".*[\\\/](?![Ee]pisode)(?<seriesname>[\w\s]+?)\s(?<epnumber>\d{1,3})(-(?<endingepnumber>\d{2,3}))*[^\\\/]*$")
{ {
IsNamed = true IsNamed = true
}, },
@ -337,7 +337,7 @@ namespace Emby.Naming.Common
// *** End Kodi Standard Naming // *** End Kodi Standard Naming
                // [bar] Foo - 1 [baz]                 // [bar] Foo - 1 [baz]
new EpisodeExpression(@".*?(\[.*?\])+.*?(?<seriesname>(\w+\s*?)+?)[-\s_]+(?<epnumber>\d+).*$") new EpisodeExpression(@".*?(\[.*?\])+.*?(?<seriesname>[\w\s]+?)[-\s_]+(?<epnumber>\d+).*$")
{ {
IsNamed = true IsNamed = true
}, },

@ -84,6 +84,7 @@ namespace Emby.Server.Implementations.AppBase
/// </summary> /// </summary>
/// <value>The logger.</value> /// <value>The logger.</value>
protected ILogger Logger { get; private set; } protected ILogger Logger { get; private set; }
/// <summary> /// <summary>
/// Gets the XML serializer. /// Gets the XML serializer.
/// </summary> /// </summary>
@ -97,7 +98,7 @@ namespace Emby.Server.Implementations.AppBase
public IApplicationPaths CommonApplicationPaths { get; private set; } public IApplicationPaths CommonApplicationPaths { get; private set; }
/// <summary> /// <summary>
/// Gets the system configuration. /// Gets or sets the system configuration.
/// </summary> /// </summary>
/// <value>The configuration.</value> /// <value>The configuration.</value>
public BaseApplicationConfiguration CommonConfiguration public BaseApplicationConfiguration CommonConfiguration
@ -123,6 +124,7 @@ namespace Emby.Server.Implementations.AppBase
return _configuration; return _configuration;
} }
} }
protected set protected set
{ {
_configuration = value; _configuration = value;
@ -215,7 +217,7 @@ namespace Emby.Server.Implementations.AppBase
cachePath = CommonConfiguration.CachePath; cachePath = CommonConfiguration.CachePath;
} }
Logger.LogInformation("Setting cache path to " + cachePath); Logger.LogInformation("Setting cache path: {Path}", cachePath);
((BaseApplicationPaths)CommonApplicationPaths).CachePath = cachePath; ((BaseApplicationPaths)CommonApplicationPaths).CachePath = cachePath;
} }
@ -223,7 +225,7 @@ namespace Emby.Server.Implementations.AppBase
/// Replaces the cache path. /// Replaces the cache path.
/// </summary> /// </summary>
/// <param name="newConfig">The new configuration.</param> /// <param name="newConfig">The new configuration.</param>
/// <exception cref="DirectoryNotFoundException"></exception> /// <exception cref="DirectoryNotFoundException">The new cache path doesn't exist.</exception>
private void ValidateCachePath(BaseApplicationConfiguration newConfig) private void ValidateCachePath(BaseApplicationConfiguration newConfig)
{ {
var newPath = newConfig.CachePath; var newPath = newConfig.CachePath;
@ -234,7 +236,7 @@ namespace Emby.Server.Implementations.AppBase
// Validate // Validate
if (!Directory.Exists(newPath)) if (!Directory.Exists(newPath))
{ {
throw new FileNotFoundException( throw new DirectoryNotFoundException(
string.Format( string.Format(
CultureInfo.InvariantCulture, CultureInfo.InvariantCulture,
"{0} does not exist.", "{0} does not exist.",

@ -9,13 +9,13 @@
"Channels": "Canali", "Channels": "Canali",
"ChapterNameValue": "Capitolo {0}", "ChapterNameValue": "Capitolo {0}",
"Collections": "Collezioni", "Collections": "Collezioni",
"DeviceOfflineWithName": "{0} è stato disconnesso", "DeviceOfflineWithName": "{0} ha disconnesso",
"DeviceOnlineWithName": "{0} è connesso", "DeviceOnlineWithName": "{0} è connesso",
"FailedLoginAttemptWithUserName": "Tentativo di accesso fallito da {0}", "FailedLoginAttemptWithUserName": "Tentativo di accesso fallito da {0}",
"Favorites": "Preferiti", "Favorites": "Preferiti",
"Folders": "Cartelle", "Folders": "Cartelle",
"Genres": "Generi", "Genres": "Generi",
"HeaderAlbumArtists": "Artisti Album", "HeaderAlbumArtists": "Artisti dell' Album",
"HeaderCameraUploads": "Caricamenti Fotocamera", "HeaderCameraUploads": "Caricamenti Fotocamera",
"HeaderContinueWatching": "Continua a guardare", "HeaderContinueWatching": "Continua a guardare",
"HeaderFavoriteAlbums": "Album preferiti", "HeaderFavoriteAlbums": "Album preferiti",
@ -32,7 +32,7 @@
"ItemRemovedWithName": "{0} è stato rimosso dalla libreria", "ItemRemovedWithName": "{0} è stato rimosso dalla libreria",
"LabelIpAddressValue": "Indirizzo IP: {0}", "LabelIpAddressValue": "Indirizzo IP: {0}",
"LabelRunningTimeValue": "Durata: {0}", "LabelRunningTimeValue": "Durata: {0}",
"Latest": "Più recenti", "Latest": "Novità",
"MessageApplicationUpdated": "Il Server Jellyfin è stato aggiornato", "MessageApplicationUpdated": "Il Server Jellyfin è stato aggiornato",
"MessageApplicationUpdatedTo": "Jellyfin Server è stato aggiornato a {0}", "MessageApplicationUpdatedTo": "Jellyfin Server è stato aggiornato a {0}",
"MessageNamedServerConfigurationUpdatedWithValue": "La sezione {0} della configurazione server è stata aggiornata", "MessageNamedServerConfigurationUpdatedWithValue": "La sezione {0} della configurazione server è stata aggiornata",
@ -43,7 +43,7 @@
"MusicVideos": "Video musicali", "MusicVideos": "Video musicali",
"NameInstallFailed": "{0} installazione fallita", "NameInstallFailed": "{0} installazione fallita",
"NameSeasonNumber": "Stagione {0}", "NameSeasonNumber": "Stagione {0}",
"NameSeasonUnknown": "Stagione sconosciuto", "NameSeasonUnknown": "Stagione sconosciuta",
"NewVersionIsAvailable": "Una nuova versione di Jellyfin Server è disponibile per il download.", "NewVersionIsAvailable": "Una nuova versione di Jellyfin Server è disponibile per il download.",
"NotificationOptionApplicationUpdateAvailable": "Aggiornamento dell'applicazione disponibile", "NotificationOptionApplicationUpdateAvailable": "Aggiornamento dell'applicazione disponibile",
"NotificationOptionApplicationUpdateInstalled": "Aggiornamento dell'applicazione installato", "NotificationOptionApplicationUpdateInstalled": "Aggiornamento dell'applicazione installato",
@ -88,9 +88,9 @@
"UserOfflineFromDevice": "{0} è stato disconnesso da {1}", "UserOfflineFromDevice": "{0} è stato disconnesso da {1}",
"UserOnlineFromDevice": "{0} è online da {1}", "UserOnlineFromDevice": "{0} è online da {1}",
"UserPasswordChangedWithName": "La password è stata cambiata per l'utente {0}", "UserPasswordChangedWithName": "La password è stata cambiata per l'utente {0}",
"UserPolicyUpdatedWithName": "La politica dell'utente è stata aggiornata per {0}", "UserPolicyUpdatedWithName": "La policy dell'utente è stata aggiornata per {0}",
"UserStartedPlayingItemWithValues": "{0} ha avviato la riproduzione di {1}", "UserStartedPlayingItemWithValues": "{0} ha avviato la riproduzione di {1} su {2}",
"UserStoppedPlayingItemWithValues": "{0} ha interrotto la riproduzione di {1}", "UserStoppedPlayingItemWithValues": "{0} ha interrotto la riproduzione di {1} su {2}",
"ValueHasBeenAddedToLibrary": "{0} è stato aggiunto alla tua libreria multimediale", "ValueHasBeenAddedToLibrary": "{0} è stato aggiunto alla tua libreria multimediale",
"ValueSpecialEpisodeName": "Speciale - {0}", "ValueSpecialEpisodeName": "Speciale - {0}",
"VersionNumber": "Versione {0}" "VersionNumber": "Versione {0}"

@ -1,4 +1,3 @@
using System;
using System.IO; using System.IO;
using Emby.Server.Implementations.AppBase; using Emby.Server.Implementations.AppBase;
using MediaBrowser.Controller; using MediaBrowser.Controller;
@ -10,8 +9,6 @@ namespace Emby.Server.Implementations
/// </summary> /// </summary>
public class ServerApplicationPaths : BaseApplicationPaths, IServerApplicationPaths public class ServerApplicationPaths : BaseApplicationPaths, IServerApplicationPaths
{ {
private string _defaultTranscodePath;
private string _transcodePath;
private string _internalMetadataPath; private string _internalMetadataPath;
/// <summary> /// <summary>
@ -23,7 +20,8 @@ namespace Emby.Server.Implementations
string configurationDirectoryPath, string configurationDirectoryPath,
string cacheDirectoryPath, string cacheDirectoryPath,
string webDirectoryPath) string webDirectoryPath)
: base(programDataPath, : base(
programDataPath,
logDirectoryPath, logDirectoryPath,
configurationDirectoryPath, configurationDirectoryPath,
cacheDirectoryPath, cacheDirectoryPath,
@ -31,8 +29,6 @@ namespace Emby.Server.Implementations
{ {
} }
public string ApplicationResourcesPath { get; } = AppContext.BaseDirectory;
/// <summary> /// <summary>
/// Gets the path to the base root media directory. /// Gets the path to the base root media directory.
/// </summary> /// </summary>
@ -45,18 +41,13 @@ namespace Emby.Server.Implementations
/// <value>The default user views path.</value> /// <value>The default user views path.</value>
public string DefaultUserViewsPath => Path.Combine(RootFolderPath, "default"); public string DefaultUserViewsPath => Path.Combine(RootFolderPath, "default");
/// <summary>
/// Gets the path to localization data.
/// </summary>
/// <value>The localization path.</value>
public string LocalizationPath => Path.Combine(ProgramDataPath, "localization");
/// <summary> /// <summary>
/// Gets the path to the People directory. /// Gets the path to the People directory.
/// </summary> /// </summary>
/// <value>The people path.</value> /// <value>The people path.</value>
public string PeoplePath => Path.Combine(InternalMetadataPath, "People"); public string PeoplePath => Path.Combine(InternalMetadataPath, "People");
/// <inheritdoc />
public string ArtistsPath => Path.Combine(InternalMetadataPath, "artists"); public string ArtistsPath => Path.Combine(InternalMetadataPath, "artists");
/// <summary> /// <summary>
@ -107,12 +98,14 @@ namespace Emby.Server.Implementations
/// <value>The user configuration directory path.</value> /// <value>The user configuration directory path.</value>
public string UserConfigurationDirectoryPath => Path.Combine(ConfigurationDirectoryPath, "users"); public string UserConfigurationDirectoryPath => Path.Combine(ConfigurationDirectoryPath, "users");
/// <inheritdoc />
public string InternalMetadataPath public string InternalMetadataPath
{ {
get => _internalMetadataPath ?? (_internalMetadataPath = Path.Combine(DataPath, "metadata")); get => _internalMetadataPath ?? (_internalMetadataPath = Path.Combine(DataPath, "metadata"));
set => _internalMetadataPath = value; set => _internalMetadataPath = value;
} }
/// <inheritdoc />
public string VirtualInternalMetadataPath { get; } = "%MetadataPath%"; public string VirtualInternalMetadataPath { get; } = "%MetadataPath%";
} }
} }

@ -22,7 +22,14 @@ namespace MediaBrowser.Common.Configuration
/// <param name="configurationManager">The Configuration manager.</param> /// <param name="configurationManager">The Configuration manager.</param>
/// <returns>The transcoding temp path.</returns> /// <returns>The transcoding temp path.</returns>
public static string GetTranscodePath(this IConfigurationManager configurationManager) public static string GetTranscodePath(this IConfigurationManager configurationManager)
=> configurationManager.GetEncodingOptions().TranscodingTempPath {
?? Path.Combine(configurationManager.CommonApplicationPaths.ProgramDataPath, "transcodes"); var transcodingTempPath = configurationManager.GetEncodingOptions().TranscodingTempPath;
if (string.IsNullOrEmpty(transcodingTempPath))
{
return Path.Combine(configurationManager.CommonApplicationPaths.ProgramDataPath, "transcodes");
}
return transcodingTempPath;
}
} }
} }

@ -10,24 +10,12 @@ namespace MediaBrowser.Controller
/// <value>The root folder path.</value> /// <value>The root folder path.</value>
string RootFolderPath { get; } string RootFolderPath { get; }
/// <summary>
/// Gets the application resources path. This is the path to the folder containing resources that are deployed as part of the application
/// </summary>
/// <value>The application resources path.</value>
string ApplicationResourcesPath { get; }
/// <summary> /// <summary>
/// Gets the path to the default user view directory. Used if no specific user view is defined. /// Gets the path to the default user view directory. Used if no specific user view is defined.
/// </summary> /// </summary>
/// <value>The default user views path.</value> /// <value>The default user views path.</value>
string DefaultUserViewsPath { get; } string DefaultUserViewsPath { get; }
/// <summary>
/// Gets the path to localization data.
/// </summary>
/// <value>The localization path.</value>
string LocalizationPath { get; }
/// <summary> /// <summary>
/// Gets the path to the People directory /// Gets the path to the People directory
/// </summary> /// </summary>
@ -87,8 +75,13 @@ namespace MediaBrowser.Controller
/// </summary> /// </summary>
/// <value>The internal metadata path.</value> /// <value>The internal metadata path.</value>
string InternalMetadataPath { get; } string InternalMetadataPath { get; }
string VirtualInternalMetadataPath { get; } string VirtualInternalMetadataPath { get; }
/// <summary>
/// Gets the path to the artists directory.
/// </summary>
/// <value>The artists path.</value>
string ArtistsPath { get; } string ArtistsPath { get; }
} }
} }

Loading…
Cancel
Save