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.Server.Implementations/Library/LibraryManager.cs | |
| parent | e7124e1ec5cbc28f298b89d8cced58dc0dbb41c2 (diff) | |
encapsulate path substitution
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/LibraryManager.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index 442e2ebe5..bd408c9d3 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -2527,6 +2527,16 @@ namespace MediaBrowser.Server.Implementations.Library }).OrderBy(i => i.Path).ToList(); } + public string GetPathAfterNetworkSubstitution(string path) + { + foreach (var map in ConfigurationManager.Configuration.PathSubstitutions) + { + path = SubstitutePath(path, map.From, map.To); + } + + return path; + } + public string SubstitutePath(string path, string from, string to) { if (string.IsNullOrWhiteSpace(path)) |
