#103: Remove WAV support (#105)

* #103: Adding checks to prevent .wav files from being uploaded:

* #103: Added method to create song and moving some code around

* #103: Fixed build issue

* tsk-103: Cleanup of temporary files

* tsk-103: Formatting changes

* tsk-103: Minor changes

* tsk-103: Fixing build issue

* tsk-103: Refactored enum

* CORE-23734: Refactoring

* tsk-103: Confirmed functionality is working

* Removed commented code

* Removed commented code
This commit was merged in pull request #105.
This commit is contained in:
KD
2025-02-16 17:24:50 -05:00
committed by GitHub
parent a89580ac70
commit fd3ce9f96a
33 changed files with 242 additions and 99 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ public class AlbumContext : DbContext
public AlbumContext(string connString) : base(new DbContextOptionsBuilder<AlbumContext>()
.UseMySQL(connString).Options)
{
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
+2 -2
View File
@@ -8,11 +8,11 @@ public class ArtistContext : DbContext
{
public DbSet<Artist> Artists { get; set; }
public ArtistContext(DbContextOptions<ArtistContext> options) : base (options) { }
public ArtistContext(DbContextOptions<ArtistContext> options) : base(options) { }
public ArtistContext(string connString) : base(new DbContextOptionsBuilder<ArtistContext>()
.UseMySQL(connString).Options)
{
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
+2 -2
View File
@@ -14,8 +14,8 @@ public class CoverArtContext : DbContext
public CoverArtContext(string connString) : base(new DbContextOptionsBuilder<CoverArtContext>()
.UseMySQL(connString).Options)
{
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<CoverArt>()
+1 -1
View File
@@ -14,7 +14,7 @@ public class GenreContext : DbContext
public GenreContext(string connString) : base(new DbContextOptionsBuilder<GenreContext>()
.UseMySQL(connString).Options)
{
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
+2 -2
View File
@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore;
using Icarus.Models;
namespace Icarus.Database.Contexts;
public class SongContext : DbContext
@@ -11,7 +11,7 @@ public class SongContext : DbContext
public SongContext(string connString) : base(new DbContextOptionsBuilder<SongContext>()
.UseMySQL(connString).Options)
{
}
}
public SongContext(DbContextOptions<SongContext> options) : base(options) { }
+3 -3
View File
@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore;
using Icarus.Models;
namespace Icarus.Database.Contexts;
public class UserContext : DbContext
@@ -15,7 +15,7 @@ public class UserContext : DbContext
public UserContext(string connString) : base(new DbContextOptionsBuilder<UserContext>()
.UseMySQL(connString).Options)
{
}
}
#endregion
@@ -29,7 +29,7 @@ public class UserContext : DbContext
.Property(u => u.DateCreated).HasDefaultValue(DateTime.Now);
}
public User RetrieveRecord(User user)
{
return Users.FirstOrDefault(usr => usr.Id == user.Id)!;