aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-09-12 14:10:09 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-09-12 14:10:09 -0400
commit151d88f20db2d6fbb8ea901d84d25d26ccbb136c (patch)
tree1973b0a257817b0e166005bd8c5e5bc6e0552b06 /MediaBrowser.Controller
parente7124e1ec5cbc28f298b89d8cced58dc0dbb41c2 (diff)
encapsulate path substitution
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs5
-rw-r--r--MediaBrowser.Controller/Library/ILibraryManager.cs2
2 files changed, 3 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index 55aaf04ff..2a49168ed 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -2111,10 +2111,7 @@ namespace MediaBrowser.Controller.Entities
{
if (locationType == LocationType.FileSystem || locationType == LocationType.Offline)
{
- foreach (var map in ConfigurationManager.Configuration.PathSubstitutions)
- {
- path = LibraryManager.SubstitutePath(path, map.From, map.To);
- }
+ return LibraryManager.GetPathAfterNetworkSubstitution(path);
}
return path;
diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs
index 04268bcea..d5c2fcd20 100644
--- a/MediaBrowser.Controller/Library/ILibraryManager.cs
+++ b/MediaBrowser.Controller/Library/ILibraryManager.cs
@@ -506,6 +506,8 @@ namespace MediaBrowser.Controller.Library
/// <returns>QueryResult&lt;BaseItem&gt;.</returns>
QueryResult<BaseItem> QueryItems(InternalItemsQuery query);
+ string GetPathAfterNetworkSubstitution(string path);
+
/// <summary>
/// Substitutes the path.
/// </summary>