mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-12 10:40:24 +01:00
add channel downloading settings
This commit is contained in:
@@ -846,16 +846,7 @@ namespace MediaBrowser.Server.Implementations.Dto
|
||||
|
||||
if (fields.Contains(ItemFields.Path))
|
||||
{
|
||||
var locationType = item.LocationType;
|
||||
|
||||
if (locationType != LocationType.Remote && locationType != LocationType.Virtual)
|
||||
{
|
||||
dto.Path = GetMappedPath(item.Path);
|
||||
}
|
||||
else
|
||||
{
|
||||
dto.Path = item.Path;
|
||||
}
|
||||
dto.Path = GetMappedPath(item);
|
||||
}
|
||||
|
||||
dto.PremiereDate = item.PremiereDate;
|
||||
@@ -1315,14 +1306,12 @@ namespace MediaBrowser.Server.Implementations.Dto
|
||||
|
||||
var locationType = item.LocationType;
|
||||
|
||||
if (locationType != LocationType.FileSystem && locationType != LocationType.Offline)
|
||||
if (locationType == LocationType.FileSystem || locationType == LocationType.Offline)
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
foreach (var map in _config.Configuration.PathSubstitutions)
|
||||
{
|
||||
path = _fileSystem.SubstitutePath(path, map.From, map.To);
|
||||
foreach (var map in _config.Configuration.PathSubstitutions)
|
||||
{
|
||||
path = _fileSystem.SubstitutePath(path, map.From, map.To);
|
||||
}
|
||||
}
|
||||
|
||||
return path;
|
||||
@@ -1418,16 +1407,6 @@ namespace MediaBrowser.Server.Implementations.Dto
|
||||
return string.Join("/", terms.ToArray());
|
||||
}
|
||||
|
||||
private string GetMappedPath(string path)
|
||||
{
|
||||
foreach (var map in _config.Configuration.PathSubstitutions)
|
||||
{
|
||||
path = _fileSystem.SubstitutePath(path, map.From, map.To);
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
private void SetProductionLocations(BaseItem item, BaseItemDto dto)
|
||||
{
|
||||
var hasProductionLocations = item as IHasProductionLocations;
|
||||
|
||||
Reference in New Issue
Block a user