mirror of
https://github.com/Royce551/FRESHMusicPlayer-Core.git
synced 2025-01-22 10:51:56 -05:00
cleanup and namespace switcherooing
This commit is contained in:
parent
60f9a63157
commit
12cbb055bd
9 changed files with 2 additions and 107 deletions
|
@ -10,14 +10,6 @@
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Compile Remove="Handlers\Integrations\**" />
|
|
||||||
<EmbeddedResource Remove="Handlers\Integrations\**" />
|
|
||||||
<None Remove="Handlers\Integrations\**" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Remove="Handlers\InternetHandler.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="LiteDB" Version="5.0.9" />
|
<PackageReference Include="LiteDB" Version="5.0.9" />
|
||||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||||
|
|
|
@ -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);*/
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -5,7 +5,7 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace FRESHMusicPlayer.Handlers
|
namespace FRESHMusicPlayer
|
||||||
{
|
{
|
||||||
public class Library
|
public class Library
|
||||||
{
|
{
|
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace FRESHMusicPlayer.Handlers
|
namespace FRESHMusicPlayer
|
||||||
{
|
{
|
||||||
public class PlaybackExceptionEventArgs : EventArgs
|
public class PlaybackExceptionEventArgs : EventArgs
|
||||||
{
|
{
|
|
@ -3,8 +3,6 @@ using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using FRESHMusicPlayer.Handlers;
|
|
||||||
using FRESHMusicPlayer.Utilities;
|
|
||||||
using FRESHMusicPlayer.Backends;
|
using FRESHMusicPlayer.Backends;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
|
@ -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++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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"]}
|
|
|
@ -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; }
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue