diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-09-12 14:10:09 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-09-12 14:10:09 -0400 |
| commit | 151d88f20db2d6fbb8ea901d84d25d26ccbb136c (patch) | |
| tree | 1973b0a257817b0e166005bd8c5e5bc6e0552b06 /MediaBrowser.Controller | |
| parent | e7124e1ec5cbc28f298b89d8cced58dc0dbb41c2 (diff) | |
encapsulate path substitution
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Entities/BaseItem.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Library/ILibraryManager.cs | 2 |
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<BaseItem>.</returns> QueryResult<BaseItem> QueryItems(InternalItemsQuery query); + string GetPathAfterNetworkSubstitution(string path); + /// <summary> /// Substitutes the path. /// </summary> |
