mirror of
https://github.com/JuLi0n21/pwa-player.git
synced 2026-04-19 23:40:05 +00:00
localstorage upgrage, custome colors, fixed broken files (encoding issues)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using OsuParsers.Database.Objects;
|
||||
using OsuParsers.Enums.Database;
|
||||
using OsuParsers.Enums;
|
||||
using OsuParsers.Enums;
|
||||
using System.Data.SQLite;
|
||||
using System.CodeDom;
|
||||
|
||||
public class Song{
|
||||
public string hash {get; set;}
|
||||
@@ -15,13 +17,27 @@ public class Song{
|
||||
this.hash = hash; this.name = name; this.artist = artist; this.length = length; this.url = url; this.previewimage = previewimage; this.mapper = mapper;
|
||||
}
|
||||
|
||||
public Song(SQLiteDataReader reader) {
|
||||
string folder = reader.GetString(reader.GetOrdinal("FolderName"));
|
||||
string file = reader.GetString(reader.GetOrdinal("FileName"));
|
||||
string audio = reader.GetString(reader.GetOrdinal("AudioFileName"));
|
||||
|
||||
this.hash = reader.GetString(reader.GetOrdinal("MD5Hash"));
|
||||
this.name = reader.GetString(reader.GetOrdinal("Title"));
|
||||
this.artist = reader.GetString(reader.GetOrdinal("Artist"));
|
||||
this.length = reader.GetInt32(reader.GetOrdinal("TotalTime"));
|
||||
this.url = Uri.EscapeDataString($"{folder}/{audio}");
|
||||
this.previewimage = Osudb.getBG(folder, file);
|
||||
this.mapper = reader.GetString(reader.GetOrdinal("Creator"));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class CollectionPreview{
|
||||
public int index { get; set;}
|
||||
public string name {get; set;}
|
||||
public string? name {get; set;}
|
||||
public int length {get; set;}
|
||||
public string previewimage {get; set;}
|
||||
public string? previewimage {get; set;}
|
||||
|
||||
private CollectionPreview() { }
|
||||
|
||||
@@ -31,9 +47,9 @@ public class CollectionPreview{
|
||||
|
||||
}
|
||||
public class Collection{
|
||||
public string name {get; set;}
|
||||
public string? name {get; set;}
|
||||
public int length {get; set;}
|
||||
public List<Song> songs { get; set;}
|
||||
public List<Song> songs { get; set;} = new List<Song>();
|
||||
|
||||
private Collection() { }
|
||||
|
||||
@@ -50,31 +66,31 @@ public class ActiveSearch{
|
||||
|
||||
public class Beatmap
|
||||
{
|
||||
public string Artist { get; set; }
|
||||
public string ArtistUnicode { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string TitleUnicode { get; set; }
|
||||
public string Creator { get; set; }
|
||||
public string Difficulty { get; set; }
|
||||
public string AudioFileName { get; set; }
|
||||
public string MD5Hash { get; set; }
|
||||
public string FileName { get; set; }
|
||||
public string? Artist { get; set; }
|
||||
public string? ArtistUnicode { get; set; }
|
||||
public string? Title { get; set; }
|
||||
public string? TitleUnicode { get; set; }
|
||||
public string? Creator { get; set; }
|
||||
public string? Difficulty { get; set; }
|
||||
public string? AudioFileName { get; set; }
|
||||
public string? MD5Hash { get; set; }
|
||||
public string? FileName { get; set; }
|
||||
public RankedStatus RankedStatus { get; set; }
|
||||
public DateTime LastModifiedTime { get; set; }
|
||||
public int TotalTime { get; set; }
|
||||
public int AudioPreviewTime { get; set; }
|
||||
public int BeatmapId { get; set; }
|
||||
public int BeatmapSetId { get; set; }
|
||||
public string Source { get; set; }
|
||||
public string Tags { get; set; }
|
||||
public string? Source { get; set; }
|
||||
public string? Tags { get; set; }
|
||||
public DateTime LastPlayed { get; set; }
|
||||
public string FolderName { get; set; }
|
||||
public string? FolderName { get; set; }
|
||||
}
|
||||
|
||||
public class BeatmapSet {
|
||||
public int BeatmapSetId { get; set; }
|
||||
public string FolderName { get; set; }
|
||||
public string Creator { get; set; }
|
||||
public string? FolderName { get; set; }
|
||||
public string? Creator { get; set; }
|
||||
public DateTime LastModifiedTime { get; set; }
|
||||
public List<Beatmap> Beatmaps { get; private set; } = new List<Beatmap>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user