Explorar o código

Allow StaticFileHandler Path to be changed

LukePulverenti Luke Pulverenti luke pulverenti %!s(int64=13) %!d(string=hai) anos
pai
achega
692d9dc331
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      MediaBrowser.Common/Net/Handlers/StaticFileHandler.cs

+ 10 - 0
MediaBrowser.Common/Net/Handlers/StaticFileHandler.cs

@@ -10,12 +10,22 @@ namespace MediaBrowser.Common.Net.Handlers
 {
     public class StaticFileHandler : BaseHandler
     {
+        private string _Path;
         public virtual string Path
         {
             get
             {
+                if (!string.IsNullOrWhiteSpace(_Path))
+                {
+                    return _Path;
+                }
+
                 return QueryString["path"];
             }
+            set
+            {
+                _Path = value;
+            }
         }
 
         private bool FileStreamDiscovered = false;