some subsonic cleanup
This commit is contained in:
parent
a28277af61
commit
1e73138f6d
|
@ -76,6 +76,7 @@ namespace NzbDrone.Core.Test
|
|||
var sonicRepo = MockLib.GetEmptyRepository();
|
||||
|
||||
var sonicTarget = new SubsonicTarget(sonicRepo);
|
||||
|
||||
LogManager.Configuration.AddTarget("DbLogger", sonicTarget);
|
||||
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", NLog.LogLevel.Info, sonicTarget));
|
||||
LogManager.Configuration.Reload();
|
||||
|
|
|
@ -99,9 +99,14 @@ namespace NzbDrone.Core
|
|||
public static String AppPath
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!String.IsNullOrWhiteSpace(HostingEnvironment.ApplicationPhysicalPath))
|
||||
{
|
||||
return HostingEnvironment.ApplicationPhysicalPath;
|
||||
}
|
||||
return Directory.GetCurrentDirectory();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static string ExecutablePath
|
||||
|
|
|
@ -5,28 +5,36 @@ namespace NzbDrone.Core.Instrumentation
|
|||
{
|
||||
public class Log
|
||||
{
|
||||
public int LogId { get; set; }
|
||||
[SubSonicPrimaryKey]
|
||||
public int LogId { get; protected set; }
|
||||
|
||||
[SubSonicLongString]
|
||||
public string Message { get; set; }
|
||||
|
||||
public DateTime Time { get; set; }
|
||||
|
||||
public string Logger { get; set; }
|
||||
|
||||
[SubSonicNullString]
|
||||
public string Stack { get; set; }
|
||||
|
||||
[SubSonicNullString]
|
||||
[SubSonicLongString]
|
||||
public string ExceptionMessage { get; set; }
|
||||
|
||||
[SubSonicNullString]
|
||||
[SubSonicLongString]
|
||||
public string ExceptionString { get; set; }
|
||||
|
||||
[SubSonicNullString]
|
||||
public string ExceptionType { get; set; }
|
||||
|
||||
public LogLevel Level { get; set; }
|
||||
|
||||
//This is needed for telerik grid binding
|
||||
//This is needed for Telerik grid binding
|
||||
[SubSonicIgnore]
|
||||
public string DisplayLevel{
|
||||
public string DisplayLevel
|
||||
{
|
||||
get { return Level.ToString(); }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using NzbDrone.Core.Repository.Quality;
|
||||
using SubSonic.SqlGeneration.Schema;
|
||||
|
||||
namespace NzbDrone.Core.Model
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace NzbDrone.Core.Repository
|
|||
{
|
||||
public class History
|
||||
{
|
||||
[SubSonicPrimaryKey(true)]
|
||||
[SubSonicPrimaryKey]
|
||||
public virtual int HistoryId { get; set; }
|
||||
public virtual int EpisodeId { get; set; }
|
||||
public virtual int IndexerId { get; set; }
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace NzbDrone.Core.Repository
|
|||
{
|
||||
public class Indexer
|
||||
{
|
||||
[SubSonicPrimaryKey(false)]
|
||||
[SubSonicPrimaryKey]
|
||||
public virtual int IndexerId { get; set; }
|
||||
|
||||
public string IndexerName { get; set; }
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace NzbDrone.Core.Repository.Quality
|
|||
{
|
||||
public class QualityProfile
|
||||
{
|
||||
[SubSonicPrimaryKey(true)]
|
||||
[SubSonicPrimaryKey]
|
||||
public virtual int QualityProfileId { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "A Name is Required")]
|
||||
|
|
|
@ -8,6 +8,7 @@ namespace NzbDrone.Core.Repository
|
|||
{
|
||||
public class RootDir
|
||||
{
|
||||
[SubSonicPrimaryKey]
|
||||
public virtual int Id { get; set; }
|
||||
|
||||
public string Path { get; set; }
|
||||
|
|
Loading…
Reference in New Issue