aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Dto
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-06-02 15:32:41 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-06-02 15:32:41 -0400
commit858c37b8607ff0698a94b9e7bfff6190d3bca56d (patch)
treeec673c5ebe7ffe813b6a16340471ac472a5dbf5b /MediaBrowser.Server.Implementations/Dto
parent36648d27082c1ee50c1483e17f14ba1ae838a00e (diff)
add channel downloading settings
Diffstat (limited to 'MediaBrowser.Server.Implementations/Dto')
-rw-r--r--MediaBrowser.Server.Implementations/Dto/DtoService.cs33
1 files changed, 6 insertions, 27 deletions
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
index 88bf902db9..520ffd417d 100644
--- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs
+++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs
@@ -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)
- {
- return path;
- }
-
- foreach (var map in _config.Configuration.PathSubstitutions)
+ if (locationType == LocationType.FileSystem || locationType == LocationType.Offline)
{
- 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;