mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
commit
ee3212d39d
@ -60,22 +60,29 @@ namespace MediaBrowser.Controller.IO
|
|||||||
|
|
||||||
if (resolveShortcuts && fileSystem.IsShortcut(fullName))
|
if (resolveShortcuts && fileSystem.IsShortcut(fullName))
|
||||||
{
|
{
|
||||||
var newPath = fileSystem.ResolveShortcut(fullName);
|
try
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(newPath))
|
|
||||||
{
|
{
|
||||||
//invalid shortcut - could be old or target could just be unavailable
|
var newPath = fileSystem.ResolveShortcut(fullName);
|
||||||
logger.Warn("Encountered invalid shortcut: " + fullName);
|
|
||||||
continue;
|
if (string.IsNullOrWhiteSpace(newPath))
|
||||||
|
{
|
||||||
|
//invalid shortcut - could be old or target could just be unavailable
|
||||||
|
logger.Warn("Encountered invalid shortcut: " + fullName);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Don't check if it exists here because that could return false for network shares.
|
||||||
|
var data = fileSystem.GetDirectoryInfo(newPath);
|
||||||
|
|
||||||
|
// add to our physical locations
|
||||||
|
args.AddAdditionalLocation(newPath);
|
||||||
|
|
||||||
|
dict[newPath] = data;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
logger.ErrorException("Error resolving shortcut from {0}", ex, fullName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't check if it exists here because that could return false for network shares.
|
|
||||||
var data = fileSystem.GetDirectoryInfo(newPath);
|
|
||||||
|
|
||||||
// add to our physical locations
|
|
||||||
args.AddAdditionalLocation(newPath);
|
|
||||||
|
|
||||||
dict[newPath] = data;
|
|
||||||
}
|
}
|
||||||
else if (flattenFolderDepth > 0 && isDirectory)
|
else if (flattenFolderDepth > 0 && isDirectory)
|
||||||
{
|
{
|
||||||
|
@ -101,7 +101,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
result.Item = new Series();
|
result.Item = new Series();
|
||||||
result.HasMetadata = true;
|
result.HasMetadata = true;
|
||||||
|
|
||||||
FetchSeriesData(result, itemId.ProviderIds, cancellationToken);
|
FetchSeriesData(result, itemId.MetadataLanguage, itemId.ProviderIds, cancellationToken);
|
||||||
await FindAnimeSeriesIndex(result.Item, itemId).ConfigureAwait(false);
|
await FindAnimeSeriesIndex(result.Item, itemId).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,10 +140,11 @@ namespace MediaBrowser.Providers.TV
|
|||||||
/// Fetches the series data.
|
/// Fetches the series data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="result">The result.</param>
|
/// <param name="result">The result.</param>
|
||||||
|
/// <param name="metadataLanguage">The metadata language.</param>
|
||||||
/// <param name="seriesProviderIds">The series provider ids.</param>
|
/// <param name="seriesProviderIds">The series provider ids.</param>
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
/// <returns>Task{System.Boolean}.</returns>
|
/// <returns>Task{System.Boolean}.</returns>
|
||||||
private void FetchSeriesData(MetadataResult<Series> result, Dictionary<string, string> seriesProviderIds, CancellationToken cancellationToken)
|
private void FetchSeriesData(MetadataResult<Series> result, string metadataLanguage, Dictionary<string, string> seriesProviderIds, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var series = result.Item;
|
var series = result.Item;
|
||||||
|
|
||||||
@ -160,7 +161,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
|
|
||||||
var seriesDataPath = GetSeriesDataPath(_config.ApplicationPaths, seriesProviderIds);
|
var seriesDataPath = GetSeriesDataPath(_config.ApplicationPaths, seriesProviderIds);
|
||||||
|
|
||||||
var seriesXmlFilename = series.GetPreferredMetadataLanguage().ToLower() + ".xml";
|
var seriesXmlFilename = metadataLanguage.ToLower() + ".xml";
|
||||||
|
|
||||||
var seriesXmlPath = Path.Combine(seriesDataPath, seriesXmlFilename);
|
var seriesXmlPath = Path.Combine(seriesDataPath, seriesXmlFilename);
|
||||||
var actorsXmlPath = Path.Combine(seriesDataPath, "actors.xml");
|
var actorsXmlPath = Path.Combine(seriesDataPath, "actors.xml");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user