From 036b2e7f4f9f5823d82ee6b6e3317b221e0ddbd3 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Thu, 23 Sep 2010 19:19:55 -0700 Subject: [PATCH] updated the apppath logic and db location --- NzbDrone.Core/Main.cs | 12 +- NzbDrone.Core/NzbDrone.Core.csproj | 4 +- NzbDrone.Core/app.config | 3 - NzbDrone.Web/Bin/NzbDrone.Core.dll | Bin 13824 -> 14336 bytes NzbDrone.Web/Bin/NzbDrone.Core.pdb | Bin 28160 -> 34304 bytes NzbDrone.Web/Bin/NzbDrone.Web.dll | Bin 22528 -> 22528 bytes NzbDrone.Web/Bin/NzbDrone.Web.pdb | Bin 34304 -> 38400 bytes NzbDrone.Web/Global.asax.cs | 2 +- NzbDrone.Web/NzbDrone.Web.csproj | 3 +- NzbDrone.Web/Web.config | 182 ++++++++++++++++++++++++----- NzbDrone.sln | 14 +++ 11 files changed, 178 insertions(+), 42 deletions(-) delete mode 100644 NzbDrone.Core/app.config diff --git a/NzbDrone.Core/Main.cs b/NzbDrone.Core/Main.cs index 1580612f5..9150069d5 100644 --- a/NzbDrone.Core/Main.cs +++ b/NzbDrone.Core/Main.cs @@ -1,4 +1,6 @@ using System; +using System.IO; +using System.Web; using log4net; using Ninject; using NzbDrone.Core.Controllers; @@ -12,8 +14,8 @@ public static class Main public static void BindKernel(IKernel kernel) { - var provider = ProviderFactory.GetProvider("Data Source=filename;Version=3;", "System.Data.SQLite"); - + string connectionString = String.Format("Data Source={0};Version=3;",Path.Combine(AppPath, "nzbdrone.db")) ; + var provider = ProviderFactory.GetProvider(connectionString, "System.Data.SQLite"); kernel.Bind().To(); kernel.Bind().To(); @@ -24,11 +26,11 @@ public static void BindKernel(IKernel kernel) } + private static string _appPath; + public static String AppPath { - get { throw new ApplicationException(); } - + get { return new DirectoryInfo(HttpContext.Current.Server.MapPath("\\")).Parent.FullName; } } - } } diff --git a/NzbDrone.Core/NzbDrone.Core.csproj b/NzbDrone.Core/NzbDrone.Core.csproj index 9182f7709..82585837e 100644 --- a/NzbDrone.Core/NzbDrone.Core.csproj +++ b/NzbDrone.Core/NzbDrone.Core.csproj @@ -129,6 +129,7 @@ + @@ -146,9 +147,6 @@ - - - False diff --git a/NzbDrone.Core/app.config b/NzbDrone.Core/app.config deleted file mode 100644 index e59af44de..000000000 --- a/NzbDrone.Core/app.config +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/NzbDrone.Web/Bin/NzbDrone.Core.dll b/NzbDrone.Web/Bin/NzbDrone.Core.dll index 23670fb256078b5523ef1fa189a539cf0229c45b..5fa89af4c5d968505d8b7586e3fbdcb5dd7be7ed 100644 GIT binary patch delta 2253 zcma);e{fXQ7018lzTNkGH*pg-yCINl;*iArq)l{?9}YiCA|YvFh>%eX3v7`RvT=9I zAP{#kT3g6y;+xt(s?=gr2XzLV^%n!Er83hDbhKKAX|*WU&M?zi~PC)EhB&QEC2jL)WOx`?o#orl&cy2)Hi2m{;c@ z6%iP&xtZ-$m$b?`tfr4)8+z(HQn_6wD)U;Mo3l~Q-B48gmA;V2r|)D(PD*vSPj<=m zEX)(h5Kw1)r7w|V?qVr9Aa&e;qGkbJFo>r|%?9a;Gg4zbO>!e!YSA^Dq@#sl*FnF5 z$1m$$wTw8*d)+BpG93V_?gQ=)0&hsWHoaS zKf~ufzgOzci+1p70XH6vCERZ0=I6G_>vyZj^hVr7mh?-09TCM=#WjlC6~C|eGsWYI z|J2XwI@et?Y{=Lq#Q|fru?=a1i-Cj2{f3T{iXSk8h?@UmWu;k6Iy#tPtXJHeHE;3h zNSc-GX!K2)A-rprixB*lWQ}4UQ^x^o%5?CmB`5fkB@*?b#&TtLF;Vk z&9NQEe&wB1-d`&3Y32RQo-)HIanpug50(+PqlW&21HYC0N z;Ne;O`J((N#Uf}_hyvaze%>Z?3Lc5B@R#!=H0};)I-au(F2f6!%WU&rE10BKFHzV_ zt@)#c)uQAL`NZKdv(rC^TJgIYc{YKp_gSbmJLrB}lQ*9b=lg$|Ti6yDVrm#s`q&i;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pxEr zLp4x=a5nhSJh{E*ZeTkJUF7@3O84i+iyXhTm$96KxQw`l*iU?bI6!=qxSY6?SSIcv zt{}cd93;L@93m!SB6Beh%MiK=2@DLpD%O(5tF6V;1MQlk>gQ*vU6(<>P$f_;MY1Zf z`7e6M$DqGkR{~wQXS|x$6XU_A=M-sY|G#GiJ7_j=TZ^^D$XbqRiK{ZtbxAw|{5UG{ zT98d%452*HD+ky;-g~kk8dR>QpX9MG-H2aJbjW2aZK*dbb#Xn98xwEKex{b1Va!>w z9k=ouR~qozcwClP4$J`Xdt&1eC-XpayJuJ&CWyOUoCHH$C z!EmE!FOo!iV-aBlmj16~VI@2cfj^J`;pQKEFLCWY$HH%L& z`~BI`2&H(%@&X$h!O+w`VKj@KQzwOC1!t$u`Ny+sRM4mVEHZ%=_Zt6BbpdF2LJgMk zd2`@^x*wMCW3}DiXzhDMd-H@|hCittxVAfl;ptYyI={((OrOGRxZM0(obJH)FGk#6 z8VmkP+zN@aAin&a8{*{;g+g)$N-HU42uo*LU<+Gk!nJeM#aVivDEV{r8oa431U{H{ zly(KMuFSTVMwj^ryhVJJodl7<$9)&UP4Hl0CV)NBH$4&hY9jEQhqS~aXr=!@MfeXq CxgIzG diff --git a/NzbDrone.Web/Bin/NzbDrone.Web.dll b/NzbDrone.Web/Bin/NzbDrone.Web.dll index 92a31ecacf24421f556977bfef043765b5bbcaeb..5f3719d1844c304e0b5efc50d592e6970f73b168 100644 GIT binary patch delta 50 zcmZqJz}T>XaY6@E3)jZ3GDzB=Zt{p>2g*&3^VeeJ*xcz~ G&H(@|P87lb delta 50 zcmZqJz}T>XaY6@^F3ZNQGqEhdy-oi1cB|CO!=6LlBWYOc`Sjd#qY?55@RBN$NioMezq8 z_}%mSbI$MF-|rL_l){R#81it&*wY{<6-ZLF)U9*p#qO5s!cT%LKXALLd?U3jUaZrd z0ah;C;cF`huHNQLvr5sG(lr}nw=~999gOXSb>lw9h%5e~Fh2H6cOb*+KpZ4MFX#hL zfqviujld5O&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KRLknRD1~`PtIQvt*G1}`+lh^RG%N-b&FO9~A_mco zxy|1>*z^Qsrgk&1j#Lw=(O?X%G0|ihBEJ0)8#*PV5I!Ma z#5h}ewmWpD8p$%#psgS*w5rI~{7%72*4SY|>&Adm;hWMm6IyOI7zOf2@evZk6iVQU zuUQ(-7Sf1+kD?+L{34cO-=#BW`(}796kxJ z$c}|w9e6V+mG$GlRGJK|Y6Hzg87+W{iK-s_Kg5AJ5q2=D5O(d3AV-m7NDY#Vq##Cw zO;m^I5d*RpVIxRF*r3cvDq=ybh=8OaHh5>aY%0T5DN>G9AeCX)V_J)cHm>;#{viH8 diff --git a/NzbDrone.Web/Global.asax.cs b/NzbDrone.Web/Global.asax.cs index 72071c47b..1ad8cebef 100644 --- a/NzbDrone.Web/Global.asax.cs +++ b/NzbDrone.Web/Global.asax.cs @@ -34,7 +34,7 @@ protected override void OnApplicationStarted() AreaRegistration.RegisterAllAreas(); RegisterRoutes(RouteTable.Routes); base.OnApplicationStarted(); - } + } protected override IKernel CreateKernel() { diff --git a/NzbDrone.Web/NzbDrone.Web.csproj b/NzbDrone.Web/NzbDrone.Web.csproj index 4e9e79a28..112d4dd24 100644 --- a/NzbDrone.Web/NzbDrone.Web.csproj +++ b/NzbDrone.Web/NzbDrone.Web.csproj @@ -141,8 +141,7 @@ True 21704 / - - + http://localhost/NzbDrone False False diff --git a/NzbDrone.Web/Web.config b/NzbDrone.Web/Web.config index 68f619e42..a2f139995 100644 --- a/NzbDrone.Web/Web.config +++ b/NzbDrone.Web/Web.config @@ -1,27 +1,61 @@  - - + + + + + +
+ +
+
+
+
+ + + + + + + - + - + + + - - - - + + + + + + + + + @@ -29,50 +63,142 @@ - + - + - - - + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + - - + + + diff --git a/NzbDrone.sln b/NzbDrone.sln index def44a117..67cb4f774 100644 --- a/NzbDrone.sln +++ b/NzbDrone.sln @@ -13,6 +13,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NzbDrone", "NzbDrone\NzbDro EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{57A04B72-8088-4F75-A582-1158CF8291F7}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcApplication1", "MvcApplication1\MvcApplication1.csproj", "{23650B89-93C1-4512-8133-55AFF80AEC73}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -89,6 +91,18 @@ Global {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Release|x64.ActiveCfg = Release|x86 {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Release|x86.ActiveCfg = Release|x86 {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Release|x86.Build.0 = Release|x86 + {23650B89-93C1-4512-8133-55AFF80AEC73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {23650B89-93C1-4512-8133-55AFF80AEC73}.Debug|Any CPU.Build.0 = Debug|Any CPU + {23650B89-93C1-4512-8133-55AFF80AEC73}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {23650B89-93C1-4512-8133-55AFF80AEC73}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {23650B89-93C1-4512-8133-55AFF80AEC73}.Debug|x64.ActiveCfg = Debug|Any CPU + {23650B89-93C1-4512-8133-55AFF80AEC73}.Debug|x86.ActiveCfg = Debug|Any CPU + {23650B89-93C1-4512-8133-55AFF80AEC73}.Release|Any CPU.ActiveCfg = Release|Any CPU + {23650B89-93C1-4512-8133-55AFF80AEC73}.Release|Any CPU.Build.0 = Release|Any CPU + {23650B89-93C1-4512-8133-55AFF80AEC73}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {23650B89-93C1-4512-8133-55AFF80AEC73}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {23650B89-93C1-4512-8133-55AFF80AEC73}.Release|x64.ActiveCfg = Release|Any CPU + {23650B89-93C1-4512-8133-55AFF80AEC73}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE