cleanup and namespace switcherooing

This commit is contained in:
Royce551 2021-08-27 20:49:26 -05:00
parent 60f9a63157
commit 12cbb055bd
9 changed files with 2 additions and 107 deletions

View file

@ -10,14 +10,6 @@
<Optimize>true</Optimize>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Handlers\Integrations\**" />
<EmbeddedResource Remove="Handlers\Integrations\**" />
<None Remove="Handlers\Integrations\**" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Handlers\InternetHandler.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="LiteDB" Version="5.0.9" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />

View file

@ -1,40 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
namespace FRESHMusicPlayer.Handlers.Integrations
{
class IntegrationData
{
public string Title { get; set; }
public string Artist { get; set; }
public string Album { get; set; }
public string Genre { get; set; }
public int Year { get; set; }
public int TrackNumber { get; set; }
public int DiscNumber { get; set; }
public int Bitrate { get; set; }
//public Image AlbumArt { get; set; }
}
class IntegrationQuery
{
public string Title { get; set; }
public string AltTitle { get; set; }
public string Album { get; set; }
public int TrackNumber { get; set; }
}
abstract class Integration
{
/*abstract public (string type, string label)[] Options { get; }
/// <summary>
/// Fetches metadata from the integration.
/// </summary>
/// <param name="query">The query for the integration to use (usually the song title)</param>
/// <returns></returns>
abstract public List<IntegrationData> FetchMetadata(IntegrationQuery query);*/
}
}

View file

@ -1,19 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace FRESHMusicPlayer.Handlers
{
public static class InternetHandler
{
public static HttpClient HttpClient;
static InternetHandler()
{
HttpClient = new HttpClient();
HttpClient.DefaultRequestHeaders.UserAgent.ParseAdd($"FRESHMusicPlayer/8.0.0 (https://github.com/Royce551/FRESHMusicPlayer)"); // hi i'm FMP
}
}
}

View file

@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FRESHMusicPlayer.Handlers
namespace FRESHMusicPlayer
{
public class Library
{

View file

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FRESHMusicPlayer.Handlers
namespace FRESHMusicPlayer
{
public class PlaybackExceptionEventArgs : EventArgs
{

View file

@ -3,8 +3,6 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using FRESHMusicPlayer.Handlers;
using FRESHMusicPlayer.Utilities;
using FRESHMusicPlayer.Backends;
using System.Threading.Tasks;

View file

@ -1,24 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FRESHMusicPlayer;
namespace FRESHMusicPlayer.Utilities
{
static class PlayerUtils
{
private static readonly Random rng = new Random();
public static string TruncateBytes(string str, int bytes)
{
if (Encoding.UTF8.GetByteCount(str) <= bytes) return str;
int i = 0;
while (true)
{
if (Encoding.UTF8.GetByteCount(str.Substring(0, i)) > bytes) return str.Substring(0, i);
i++;
}
}
}
}

View file

@ -1 +0,0 @@
{"Version":1,"Songs":["C:\\Users\\poohw\\OneDrive\\Music\\Nanahira\\08 - Zennihon Ofuroka Keikaku.mp3","C:\\Users\\poohw\\OneDrive\\Music\\Nanahira\\shutter.mp3","C:\\Users\\poohw\\OneDrive\\Music\\Nanahira\\audio.mp3"]}

View file

@ -1,11 +0,0 @@
using LiteDB;
using System.Collections.Generic;
namespace FRESHMusicPlayer.Utilities
{
public class DatabaseFormat
{
public int Version { get; set; }
public List<string> Songs { get; set; }
}
}