1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-25 02:30:20 +02:00

Banners folder moved to root.

This commit is contained in:
kay.one 2011-12-01 23:07:18 -08:00
parent bb460163c2
commit 76608fc440
5 changed files with 22 additions and 23 deletions

1
.gitignore vendored
View File

@ -43,3 +43,4 @@ NzbDrone.zip
NzbDrone.sln.DotSettings.user*
config.xml
UpdateLogs/
NzbDrone.Web/MediaCover

View File

@ -85,9 +85,19 @@ public static string GetLogDbFileDbFile(this EnviromentProvider enviromentProvid
return Path.Combine(enviromentProvider.GetAppDataPath(), LOG_DB_FILE);
}
public static string GetMediaCoverPath(this EnviromentProvider enviromentProvider)
{
return Path.Combine(enviromentProvider.GetWebRoot(), "MediaCover");
}
public static string GetBannerPath(this EnviromentProvider enviromentProvider)
{
return Path.Combine(enviromentProvider.GetWebRoot(), "Content", "Images", "Banners");
return Path.Combine(enviromentProvider.GetMediaCoverPath(), "Banner");
}
public static string GetFanArthPath(this EnviromentProvider enviromentProvider)
{
return Path.Combine(enviromentProvider.GetMediaCoverPath(), "Fanart");
}
public static string GetCacheFolder(this EnviromentProvider enviromentProvider)

View File

@ -1,9 +1,7 @@
using System;
using System.Configuration;
using System.Data.Common;
using System.Data.EntityClient;
using System.Data.SqlServerCe;
using MvcMiniProfiler;
using NzbDrone.Common;
using NzbDrone.Core.Instrumentation;
using PetaPoco;
@ -14,9 +12,9 @@ public class Connection
{
private readonly EnviromentProvider _enviromentProvider;
public static void InitiFacotry()
static Connection()
{
Database.Mapper = new CustomeMapper();
var dataSet = ConfigurationManager.GetSection("system.data") as System.Data.DataSet;
dataSet.Tables[0].Rows.Add("Microsoft SQL Server Compact Data Provider 4.0"
@ -30,12 +28,6 @@ public Connection(EnviromentProvider enviromentProvider)
_enviromentProvider = enviromentProvider;
}
static Connection()
{
Database.Mapper = new CustomeMapper();
InitiFacotry();
}
public String MainConnectionString
{
get
@ -54,7 +46,6 @@ public String LogConnectionString
public static string GetConnectionString(string path)
{
//return String.Format("Data Source={0};Version=3;Cache Size=30000;Pooling=true;Default Timeout=2", path);
return String.Format("Data Source={0}", path);
}
@ -73,8 +64,6 @@ public LogDbContext GetLogEfContext()
return GetLogDbContext(LogConnectionString);
}
public static IDatabase GetPetaPocoDb(string connectionString, Boolean profiled = true)
{
MigrationsHelper.Run(connectionString, true);

View File

@ -7,7 +7,6 @@
using NzbDrone.Core.Model.Notification;
using NzbDrone.Core.Providers;
using NzbDrone.Core.Providers.Core;
using NzbDrone.Core.Providers.Jobs;
using NzbDrone.Core.Repository;
namespace NzbDrone.Core.Jobs

View File

@ -78,7 +78,7 @@
if(Model.HasBanner)
{
bannerUrl = "../../Content/Images/Banners/" + Model.SeriesId + ".jpg";
bannerUrl = "../../MediaCover/Banner/" + Model.SeriesId + ".jpg";
}
}
<img src="@bannerUrl" alt="Banner"/>