diff --git a/Roadie.Api.Library.Tests/Roadie.Library.Tests.csproj b/Roadie.Api.Library.Tests/Roadie.Library.Tests.csproj
index fd8c493..d8fb547 100644
--- a/Roadie.Api.Library.Tests/Roadie.Library.Tests.csproj
+++ b/Roadie.Api.Library.Tests/Roadie.Library.Tests.csproj
@@ -25,7 +25,6 @@
-
all
diff --git a/Roadie.Api.Library.Tests/TokenHelperTests.cs b/Roadie.Api.Library.Tests/TokenHelperTests.cs
index eea1664..01cfd21 100644
--- a/Roadie.Api.Library.Tests/TokenHelperTests.cs
+++ b/Roadie.Api.Library.Tests/TokenHelperTests.cs
@@ -18,7 +18,7 @@ namespace Roadie.Library.Tests
{
var sw = Stopwatch.StartNew();
- var token = ServiceBase.TrackPlayToken(new ApplicationUser
+ var token = ServiceBase.TrackPlayToken(new User
{
Id = 1,
CreatedDate = DateTime.UtcNow
diff --git a/Roadie.Api.Library/Configuration/DbContexts.cs b/Roadie.Api.Library/Configuration/DbContexts.cs
index 5dbb81f..1ade496 100644
--- a/Roadie.Api.Library/Configuration/DbContexts.cs
+++ b/Roadie.Api.Library/Configuration/DbContexts.cs
@@ -1,12 +1,10 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Roadie.Library.Configuration
+namespace Roadie.Library.Configuration
{
public enum DbContexts : short
{
- MySQL = 1,
- File = 2
+ Unknown = 0,
+ SQLite = 1,
+ File = 2,
+ MySQL = 3
}
-}
+}
\ No newline at end of file
diff --git a/Roadie.Api.Library/Configuration/FileDatabaseOptions.cs b/Roadie.Api.Library/Configuration/FileDatabaseOptions.cs
index 28775ea..7d0c6ac 100644
--- a/Roadie.Api.Library/Configuration/FileDatabaseOptions.cs
+++ b/Roadie.Api.Library/Configuration/FileDatabaseOptions.cs
@@ -19,7 +19,7 @@ namespace Roadie.Library.Configuration
{
DatabaseFormat = FileDatabaseFormat.BSON;
DatabaseName = "roadie";
- DatabaseFolder = @"M:\db";
+ DatabaseFolder = "data/db";
}
}
}
diff --git a/Roadie.Api.Library/Configuration/Integrations.cs b/Roadie.Api.Library/Configuration/Integrations.cs
index d601d1f..1c6fe05 100644
--- a/Roadie.Api.Library/Configuration/Integrations.cs
+++ b/Roadie.Api.Library/Configuration/Integrations.cs
@@ -19,8 +19,7 @@ namespace Roadie.Library.Configuration
var keySetting = ApiKeys.FirstOrDefault(x => x.ApiName == "DiscogsConsumerKey");
if (keySetting != null)
return keySetting.Key;
- Trace.WriteLine(
- "Unable To Find Api Key with Key Name of 'DiscogsConsumerKey', Discogs Integration Disabled");
+ Trace.WriteLine("Unable To Find Api Key with Key Name of 'DiscogsConsumerKey', Discogs Integration Disabled", "Warning");
return null;
}
}
@@ -32,8 +31,7 @@ namespace Roadie.Library.Configuration
var keySetting = ApiKeys.FirstOrDefault(x => x.ApiName == "DiscogsConsumerKey");
if (keySetting != null)
return keySetting.KeySecret;
- Trace.WriteLine(
- "Unable To Find Api Key with Key Name of 'DiscogsConsumerKey', Discogs Integration Disabled");
+ Trace.WriteLine("Unable To Find Api Key with Key Name of 'DiscogsConsumerKey', Discogs Integration Disabled", "Warning");
return null;
}
}
@@ -77,7 +75,7 @@ namespace Roadie.Library.Configuration
var keySetting = ApiKeys.FirstOrDefault(x => x.ApiName == "LastFMApiKey");
if (keySetting != null)
return keySetting.Key;
- Trace.WriteLine("Unable To Find Api Key with Key Name of 'LastFMApiKey', Last FM Integration Disabled");
+ Trace.WriteLine("Unable To Find Api Key with Key Name of 'LastFMApiKey', Last FM Integration Disabled", "Warning");
return null;
}
}
@@ -89,7 +87,7 @@ namespace Roadie.Library.Configuration
var keySetting = ApiKeys.FirstOrDefault(x => x.ApiName == "LastFMApiKey");
if (keySetting != null)
return keySetting.KeySecret;
- Trace.WriteLine("Unable To Find Api Key with Key Name of 'LastFMApiKey', Last FM Integration Disabled");
+ Trace.WriteLine("Unable To Find Api Key with Key Name of 'LastFMApiKey', Last FM Integration Disabled", "Warning");
return null;
}
}
diff --git a/Roadie.Api.Library/Configuration/RoadieSettings.cs b/Roadie.Api.Library/Configuration/RoadieSettings.cs
index f892a95..31f6c1a 100644
--- a/Roadie.Api.Library/Configuration/RoadieSettings.cs
+++ b/Roadie.Api.Library/Configuration/RoadieSettings.cs
@@ -9,7 +9,7 @@ namespace Roadie.Library.Configuration
{
public static string RoadieImageFolder = "__roadie_images";
- public DbContexts DbContextToUse { get; set; }
+ public DbContexts DbContextToUse { get; set; } = DbContexts.SQLite;
///
/// If the artist name is found in the values then use the key.
@@ -81,7 +81,6 @@ namespace Roadie.Library.Configuration
}
public ImageSize LargeImageSize { get; set; }
-
public string LibraryFolder { get; set; }
public string ListenAddress { get; set; }
@@ -151,7 +150,7 @@ namespace Roadie.Library.Configuration
public RoadieSettings()
{
- DbContextToUse = DbContexts.MySQL;
+ DbContextToUse = DbContexts.SQLite;
ArtistNameReplace = new Dictionary>
{
{ "AC/DC", new List{ "AC; DC", "AC;DC", "AC/ DC", "AC DC" }},
@@ -159,10 +158,10 @@ namespace Roadie.Library.Configuration
};
DefaultTimeZone = "US / Central";
DontDoMetaDataProvidersSearchArtists = new List { "Various Artists", "Sound Tracks" };
- FileExtensionsToDelete = new List { ".accurip", ".bmp", ".cue", ".dat", ".db", ".exe", ".gif", ".htm", ".html", ".ini", ".log", ".jpg", ".jpeg", ".par", ".par2", ".pdf", ".png", ".md5", ".mht", ".mpg", ".m3u", ".nfo", ".nzb", ".pls", ".sfv", ".srr", ".txt", ".url" };
- InboundFolder = "M:/inbound";
+ FileExtensionsToDelete = new List { ".accurip", ".cue", ".dat", ".db", ".exe", ".htm", ".html", ".ini", ".log", ".par", ".par2", ".pdf", ".md5", ".mht", ".mpg", ".m3u", ".nfo", ".nzb", ".pls", ".sfv", ".srr", ".txt", ".url" };
+ InboundFolder = "data/inbound";
LargeImageSize = new ImageSize { Width = 500, Height = 500 };
- LibraryFolder = "M:/library";
+ LibraryFolder = "data/library";
MaximumImageSize = new ImageSize { Width = 2048, Height = 2048 };
MediumImageSize = new ImageSize { Width = 320, Height = 320 };
RecordNoResultSearches = true;
@@ -174,7 +173,6 @@ namespace Roadie.Library.Configuration
SmtpFromAddress = "noreply@roadie.rocks";
SmtpPort = 587;
SmtpUsername = "roadie";
- SmtpHost = "smtp.roadie.rocks";
SmtpUseSSl = true;
Inspector = new Inspector();
diff --git a/Roadie.Api.Library/Data/Artist.cs b/Roadie.Api.Library/Data/Artist.cs
index d9910ad..9b250b4 100644
--- a/Roadie.Api.Library/Data/Artist.cs
+++ b/Roadie.Api.Library/Data/Artist.cs
@@ -1,5 +1,4 @@
using Roadie.Library.Enums;
-using Roadie.Library.Imaging;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
@@ -10,12 +9,18 @@ namespace Roadie.Library.Data
[Table("artist")]
public partial class Artist : BeginAndEndNamedEntityBase
{
- [Column("amgId")] [MaxLength(100)] public string AmgId { get; set; }
+ [Column("amgId")]
+ [MaxLength(100)]
+ public string AmgId { get; set; }
[Column("artistType", TypeName = "enum")]
public string ArtistType { get; set; }
- [InverseProperty("Artist")] public ICollection AssociatedArtists { get; set; }
+ ///
+ /// Artists who this Artist is Associated To
+ ///
+ [InverseProperty("Artist")]
+ public virtual ICollection AssociatedArtists { get; set; }
[Column("bandStatus", TypeName = "enum")]
public BandStatus? BandStatus { get; set; }
@@ -27,46 +32,77 @@ namespace Roadie.Library.Data
[Column("birthDate", TypeName = "date")]
public DateTime? BirthDate { get; set; }
- public ICollection Comments { get; set; }
+ [InverseProperty("Artist")]
+ public virtual ICollection Comments { get; set; }
- [Column("discogsId")] [MaxLength(50)] public string DiscogsId { get; set; }
+ [InverseProperty("Artist")]
+ public virtual ICollection Credits { get; set; }
- public ICollection Genres { get; set; }
+ [Column("discogsId")]
+ [MaxLength(50)]
+ public string DiscogsId { get; set; }
+
+ [InverseProperty("Artist")]
+ public virtual ICollection Genres { get; set; }
+
+ ///
+ /// Where the Artist is the Artist on the Track not on an Artist Release
+ ///
+ [InverseProperty("TrackArtist")]
+ public virtual ICollection