Browse Source

Allow StaticFileHandler Path to be changed

LukePulverenti Luke Pulverenti luke pulverenti 13 years ago
parent
commit
692d9dc331
1 changed files with 10 additions and 0 deletions
  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
     public class StaticFileHandler : BaseHandler
     {
     {
+        private string _Path;
         public virtual string Path
         public virtual string Path
         {
         {
             get
             get
             {
             {
+                if (!string.IsNullOrWhiteSpace(_Path))
+                {
+                    return _Path;
+                }
+
                 return QueryString["path"];
                 return QueryString["path"];
             }
             }
+            set
+            {
+                _Path = value;
+            }
         }
         }
 
 
         private bool FileStreamDiscovered = false;
         private bool FileStreamDiscovered = false;