diff --git a/refs/Readme.md b/refs/Readme.md new file mode 100644 index 0000000..377ec2a --- /dev/null +++ b/refs/Readme.md @@ -0,0 +1,8 @@ +# This project uses submodules, please run commands below to get submodules. + +# 此项目使用了子模块,请运行以下命令获取子模块。 + +``` +git submodule init +git submodule update +``` \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/.github/workflows/nuget-push.yml b/src/HyPlayer.PlayCore/.github/workflows/nuget-push.yml deleted file mode 100644 index c3d2ea0..0000000 --- a/src/HyPlayer.PlayCore/.github/workflows/nuget-push.yml +++ /dev/null @@ -1,47 +0,0 @@ -# This workflow will build a .NET project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net - -name: NuGet Publish - -on: - push: - branches: [ "main" ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 7.0.x - - name: Restore dependencies - run: dotnet restore - - name: Build - run: dotnet build --no-restore - - name: Test - run: dotnet test --no-build --verbosity normal - - name: Build NuGet Packages - run: | - dotnet pack HyPlayer.PlayCore/HyPlayer.PlayCore.csproj -c Release -o Packages/ - dotnet pack HyPlayer.PlayCore.Abstraction/HyPlayer.PlayCore.Abstraction.csproj -c Release -o Packages/ - - - name: Publish Packages to Artifacts - uses: actions/upload-artifact@v3.1.1 - with: - name: packages - path: Packages - - - - - name: Publish To NuGet - run: | - dotnet nuget push "Packages/*.nupkg" -k ${{ secrets.NUGET_APIKEY }} -s 'https://api.nuget.org/v3/index.json' --skip-duplicate - - - name: Publish To Github Package - run: | - dotnet nuget add source --username kengwang --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/HyPlayer/index.json" - dotnet nuget push "Packages/*.nupkg" --source "github" --skip-duplicate \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/.github/workflows/qodana-analyze.yml b/src/HyPlayer.PlayCore/.github/workflows/qodana-analyze.yml deleted file mode 100644 index 05904ac..0000000 --- a/src/HyPlayer.PlayCore/.github/workflows/qodana-analyze.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Qodana -on: - workflow_dispatch: - pull_request: - push: - branches: - - main - - develop - -jobs: - qodana: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: "Qodana Scan" - uses: JetBrains/qodana-action@v2023.2.1 - env: - QODANA_TOKEN: ${{secrets.QODANA_TOKEN}} diff --git a/src/HyPlayer.PlayCore/.gitignore b/src/HyPlayer.PlayCore/.gitignore deleted file mode 100644 index 9d7aa13..0000000 --- a/src/HyPlayer.PlayCore/.gitignore +++ /dev/null @@ -1,684 +0,0 @@ -# Created by https://www.toptal.com/developers/gitignore/api/rider,csharp,dotnetcore,visualstudio -# Edit at https://www.toptal.com/developers/gitignore?templates=rider,csharp,dotnetcore,visualstudio - -### Csharp ### -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml - -### DotnetCore ### -# .NET Core build folders -bin/ -obj/ - -# Common node modules locations -/node_modules -/wwwroot/node_modules - -### Rider ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/**/usage.statistics.xml -.idea/**/dictionaries -.idea/**/shelf - -# AWS User-specific -.idea/**/aws.xml - -# Generated files -.idea/**/contentModel.xml - -# Sensitive or high-churn files -.idea/**/dataSources/ -.idea/**/dataSources.ids -.idea/**/dataSources.local.xml -.idea/**/sqlDataSources.xml -.idea/**/dynamic.xml -.idea/**/uiDesigner.xml -.idea/**/dbnavigator.xml - -# Gradle -.idea/**/gradle.xml -.idea/**/libraries - -# Gradle and Maven with auto-import -# When using Gradle or Maven with auto-import, you should exclude module files, -# since they will be recreated, and may cause churn. Uncomment if using -# auto-import. -# .idea/artifacts -# .idea/compiler.xml -# .idea/jarRepositories.xml -# .idea/modules.xml -# .idea/*.iml -# .idea/modules -# *.iml -# *.ipr - -# CMake -cmake-build-*/ - -# Mongo Explorer plugin -.idea/**/mongoSettings.xml - -# File-based project format -*.iws - -# IntelliJ -out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Cursive Clojure plugin -.idea/replstate.xml - -# SonarLint plugin -.idea/sonarlint/ - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -# Editor-based Rest Client -.idea/httpRequests - -# Android studio 3.1+ serialized cache file -.idea/caches/build_file_checksums.ser - -### VisualStudio ### - -# User-specific files - -# User-specific files (MonoDevelop/Xamarin Studio) - -# Mono auto generated files - -# Build results - -# Visual Studio 2015/2017 cache/options directory -# Uncomment if you have tasks that create the project's static files in wwwroot - -# Visual Studio 2017 auto generated files - -# MSTest test Results - -# NUnit - -# Build Results of an ATL Project - -# Benchmark Results - -# .NET Core - -# ASP.NET Scaffolding - -# StyleCop - -# Files built by Visual Studio - -# Chutzpah Test files - -# Visual C++ cache files - -# Visual Studio profiler - -# Visual Studio Trace Files - -# TFS 2012 Local Workspace - -# Guidance Automation Toolkit - -# ReSharper is a .NET coding add-in - -# TeamCity is a build add-in - -# DotCover is a Code Coverage Tool - -# AxoCover is a Code Coverage Tool - -# Coverlet is a free, cross platform Code Coverage Tool - -# Visual Studio code coverage results - -# NCrunch - -# MightyMoose - -# Web workbench (sass) - -# Installshield output folder - -# DocProject is a documentation generator add-in - -# Click-Once directory - -# Publish Web Output -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted - -# NuGet Packages -# NuGet Symbol Packages -# The packages folder can be ignored because of Package Restore -# except build/, which is used as an MSBuild target. -# Uncomment if necessary however generally it will be regenerated when needed -# NuGet v3's project.json files produces more ignorable files - -# Microsoft Azure Build Output - -# Microsoft Azure Emulator - -# Windows Store app package directories and files - -# Visual Studio cache files -# files ending in .cache can be ignored -# but keep track of directories ending in .cache - -# Others - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) - -# RIA/Silverlight projects - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) - -# SQL Server files - -# Business Intelligence projects - -# Microsoft Fakes - -# GhostDoc plugin setting file - -# Node.js Tools for Visual Studio - -# Visual Studio 6 build log - -# Visual Studio 6 workspace options file - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) - -# Visual Studio 6 technical files - -# Visual Studio LightSwitch build output - -# Paket dependency manager - -# FAKE - F# Make - -# CodeRush personal settings - -# Python Tools for Visual Studio (PTVS) - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio - -# Telerik's JustMock configuration file - -# BizTalk build output - -# OpenCover UI analysis results - -# Azure Stream Analytics local run output - -# MSBuild Binary and Structured Log - -# NVidia Nsight GPU debugger configuration file - -# MFractors (Xamarin productivity tool) working folder - -# Local History for Visual Studio - -# Visual Studio History (VSHistory) files - -# BeatPulse healthcheck temp database - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 - -# Ionide (cross platform F# VS Code tools) working folder - -# Fody - auto-generated XML schema - -# VS Code files for those working on multiple tools - -# Local History for Visual Studio Code - -# Windows Installer files from build outputs - -# JetBrains Rider -# 默认忽略的文件 -/shelf/ -/workspace.xml -# Rider 忽略的文件 -/modules.xml -/.idea.HyPlayer.PlayCore.iml -/projectSettingsUpdater.xml -/contentModel.xml -# 基于编辑器的 HTTP 客户端请求 -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml - -### VisualStudio Patch ### -# Additional files built by Visual Studio - -# End of https://www.toptal.com/developers/gitignore/api/rider,csharp,dotnetcore,visualstudio \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/AudioServiceBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/AudioServiceBase.cs deleted file mode 100644 index f3a1f5a..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/AudioServiceBase.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Collections.ObjectModel; -using HyPlayer.PlayCore.Abstraction.Models.AudioServiceComponents; -using HyPlayer.PlayCore.Abstraction.Models.Resources; - -namespace HyPlayer.PlayCore.Abstraction; - -public abstract class AudioServiceBase : IAudioService -{ - public abstract string Id { get; } - public abstract string Name { get; } - public abstract Task GetAudioTicketAsync(MusicResourceBase musicResource, CancellationToken ctk = new()); - public abstract Task DisposeAudioTicketAsync(AudioTicketBase audioTicket, CancellationToken ctk = new()); - public abstract Task> GetCreatedAudioTicketsAsync(CancellationToken ctk = new()); -} - -public interface IAudioService { } \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Extensions/RoslynExtension/CompilerFeatureRequiredAttribute.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Extensions/RoslynExtension/CompilerFeatureRequiredAttribute.cs deleted file mode 100644 index 0a4425c..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Extensions/RoslynExtension/CompilerFeatureRequiredAttribute.cs +++ /dev/null @@ -1,46 +0,0 @@ -// -#pragma warning disable -#nullable enable annotations - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Runtime.CompilerServices -{ - /// - /// Indicates that compiler support for a particular feature is required for the location where this attribute is applied. - /// - [global::System.AttributeUsage(global::System.AttributeTargets.All, AllowMultiple = true, Inherited = false)] - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - internal sealed class CompilerFeatureRequiredAttribute : global::System.Attribute - { - /// - /// Creates a new instance of the type. - /// - /// The name of the feature to indicate. - public CompilerFeatureRequiredAttribute(string featureName) - { - FeatureName = featureName; - } - - /// - /// The name of the compiler feature. - /// - public string FeatureName { get; } - - /// - /// If true, the compiler can choose to allow access to the location where this attribute is applied if it does not understand . - /// - public bool IsOptional { get; set; } - - /// - /// The used for the ref structs C# feature. - /// - public const string RefStructs = nameof(RefStructs); - - /// - /// The used for the required members C# feature. - /// - public const string RequiredMembers = nameof(RequiredMembers); - } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Extensions/RoslynExtension/ExternalInitAttribute.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Extensions/RoslynExtension/ExternalInitAttribute.cs deleted file mode 100644 index 649c060..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Extensions/RoslynExtension/ExternalInitAttribute.cs +++ /dev/null @@ -1,22 +0,0 @@ -#if NETSTANDARD -// -#pragma warning disable -#nullable enable annotations - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -// ReSharper disable once CheckNamespace -namespace System.Runtime.CompilerServices -{ - /// - /// Reserved to be used by the compiler for tracking metadata. - /// This class should not be used by developers in source code. - /// - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public static class IsExternalInit - { - } -} -#endif \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Extensions/RoslynExtension/RequeiredAttribute.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Extensions/RoslynExtension/RequeiredAttribute.cs deleted file mode 100644 index 37497b2..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Extensions/RoslynExtension/RequeiredAttribute.cs +++ /dev/null @@ -1,27 +0,0 @@ -#if NETSTANDARD2_0 -// -#pragma warning disable -#nullable enable annotations - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -// ReSharper disable once CheckNamespace -namespace System.Runtime.CompilerServices -{ - /// - /// Specifies that a type has required members or that a member is required. - /// - [global::System.AttributeUsage( - global::System.AttributeTargets.Class | - global::System.AttributeTargets.Struct | - global::System.AttributeTargets.Field | - global::System.AttributeTargets.Property, - AllowMultiple = false, - Inherited = false)] - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - public sealed class RequiredMemberAttribute : global::System.Attribute - { - } -} -#endif \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/HyPlayer.PlayCore.Abstraction.csproj b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/HyPlayer.PlayCore.Abstraction.csproj deleted file mode 100644 index b8565ec..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/HyPlayer.PlayCore.Abstraction.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - netstandard2.0 - enable - enable - default - 0.1.3 - HyPlayer.PlayCore.Abstraction - HyPlayer Team - The Abstraction of HyPlayer.PlayCore - 0.0.13 - 0.0.13 - - - - - - diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IAudioTicketListProvidable.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IAudioTicketListProvidable.cs deleted file mode 100644 index 335619b..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IAudioTicketListProvidable.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Collections.ObjectModel; -using HyPlayer.PlayCore.Abstraction.Models.AudioServiceComponents; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.AudioServices; - -public interface IAudioTicketListProvidable : IAudioService -{ - public abstract Task> GetAudioTicketListAsync(CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IAudioTicketSeekable.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IAudioTicketSeekable.cs deleted file mode 100644 index 5445d20..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IAudioTicketSeekable.cs +++ /dev/null @@ -1,11 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.AudioServiceComponents; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.AudioServices; - -/// -/// 允许进行进度控制 -/// -public interface IAudioTicketSeekableService : IAudioService -{ - public Task SeekAudioTicketAsync(AudioTicketBase audioTicket, long position, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IAudioTicketVolumeChangeable.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IAudioTicketVolumeChangeable.cs deleted file mode 100644 index c8b333f..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IAudioTicketVolumeChangeable.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.AudioServiceComponents; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.AudioServices; - -public interface IAudioTicketVolumeChangeable : IAudioService -{ - public Task ChangeVolumeAsync(AudioTicketBase ticket, double volume, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IOutgoingVolumeChangeable.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IOutgoingVolumeChangeable.cs deleted file mode 100644 index 589e9e8..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IOutgoingVolumeChangeable.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Interfaces.AudioServices; - -public interface IOutgoingVolumeChangeable : IAudioService -{ - public Task ChangeOutgoingVolumeAsync(double volume, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IOutputDeviceService.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IOutputDeviceService.cs deleted file mode 100644 index 113b373..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IOutputDeviceService.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Interfaces.AudioServices; - -/// -/// 可以更改输出设备 -/// -public interface IOutputDeviceChangeableService : IAudioService -{ - /// - /// 获取可输出设备列表 - /// - /// - public Task> GetOutputDevicesAsync( CancellationToken ctk = new()); - - /// - /// 设置输出设备 - /// - /// 设备信息 - /// - public Task SetOutputDevicesAsync(OutputDeviceBase device, CancellationToken ctk = new()); -} - -public abstract class OutputDeviceBase -{ - public required string Name { get; set; } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IPauseAudioTicketService.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IPauseAudioTicketService.cs deleted file mode 100644 index 746eb0c..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IPauseAudioTicketService.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.AudioServiceComponents; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.AudioServices; - -public interface IPauseAudioTicketService : IAudioService -{ - public Task PauseAudioTicketAsync(AudioTicketBase ticket, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IPlayAudioTicketService.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IPlayAudioTicketService.cs deleted file mode 100644 index 04a6f08..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IPlayAudioTicketService.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.AudioServiceComponents; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.AudioServices; - -public interface IPlayAudioTicketService : IAudioService -{ - public Task PlayAudioTicketAsync(AudioTicketBase ticket, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IPlaybackSpeedChangeable.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IPlaybackSpeedChangeable.cs deleted file mode 100644 index 2f89c2f..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IPlaybackSpeedChangeable.cs +++ /dev/null @@ -1,20 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.AudioServiceComponents; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.AudioServices; - -public interface IPlaybackSpeedChangeable : IAudioService -{ - /// - /// 允许更改播放更改播放倍速 (x1.0) - /// - public interface IPlaybackRateChangeableService - { - /// - /// 更改 AudioService 播放倍速 - /// - /// 音频票 - /// 目标速度(x1.0) - /// - public Task ChangePlaybackSpeedAsync(AudioTicketBase ticket, double playbackSpeed, CancellationToken ctk = new()); - } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IStopAudioTicketService.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IStopAudioTicketService.cs deleted file mode 100644 index b28c007..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/AudioServices/IStopAudioTicketService.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.AudioServiceComponents; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.AudioServices; - -public interface IStopAudioTicketService : IAudioService -{ - public Task StopTicketAsync(AudioTicketBase ticket, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricCommentary.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricCommentary.cs deleted file mode 100644 index 0fe4675..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricCommentary.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.Lyric; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.Lyric; - -public interface ILyricCommentary : ILyricLine -{ - public string? Commentary { get; set; } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricFurigana.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricFurigana.cs deleted file mode 100644 index 8d1651b..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricFurigana.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.Lyric; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.Lyric; - -public interface ILyricFurigana : ILyricLine -{ - public string? Furigana { get; set; } // TODO: Need to define format of furigana -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricProcessor.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricProcessor.cs deleted file mode 100644 index fadd44d..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricProcessor.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Collections.ObjectModel; -using HyPlayer.PlayCore.Abstraction.Models.Lyric; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.Lyric; - -public interface ILyricProcessor : ILyricLine -{ - public Task> ProcessLyric(string lrcText, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricRomaji.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricRomaji.cs deleted file mode 100644 index 09f0a8f..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricRomaji.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.Lyric; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.Lyric; - -public interface ILyricRomaji : ILyricLine -{ - public string? Romaji { get; set; } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricSoramimi.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricSoramimi.cs deleted file mode 100644 index a53487e..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricSoramimi.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.Lyric; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.Lyric; - -public interface ILyricSoramimi : ILyricLine -{ - public string? Soramimi { get; set; } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricTranslation.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricTranslation.cs deleted file mode 100644 index 65ac662..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Lyric/ILyricTranslation.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.Lyric; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.Lyric; - -public interface ILyricTranslation : ILyricLine -{ - public string? Translation { get; set; } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayCore/IPlayCore.PlayPositionModification.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayCore/IPlayCore.PlayPositionModification.cs deleted file mode 100644 index c7a8058..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayCore/IPlayCore.PlayPositionModification.cs +++ /dev/null @@ -1,10 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.PlayCore; - -public interface IPlayCorePlayPositionModification : IPlayCore -{ - public Task MovePointerToAsync(SingleSongBase song, CancellationToken ctk = new()); - public Task MoveNextAsync( CancellationToken ctk = new()); - public Task MovePreviousAsync( CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayCore/IPlayCore.PlayerModification.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayCore/IPlayCore.PlayerModification.cs deleted file mode 100644 index 2e262f1..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayCore/IPlayCore.PlayerModification.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Interfaces.PlayCore; - -public interface IPlayCorePlayerModification : IPlayCore -{ - public Task SeekAsync(long position, CancellationToken ctk = new()); - public Task PlayAsync(CancellationToken ctk = new()); - public Task PauseAsync(CancellationToken ctk = new()); - public Task StopAsync(CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayCore/IPlayCore.PlaylistModification.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayCore/IPlayCore.PlaylistModification.cs deleted file mode 100644 index 1cca50b..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayCore/IPlayCore.PlaylistModification.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.ObjectModel; -using HyPlayer.PlayCore.Abstraction.Models; -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.PlayCore; - -public interface IPlayCorePlaylistModification : IPlayCore -{ - public Task ChangeSongContainerAsync(ContainerBase? container, CancellationToken ctk = new()); - public Task InsertSongAsync(SingleSongBase item, int index = -1, CancellationToken ctk = new()); - public Task InsertSongRangeAsync(List items, int index = -1, CancellationToken ctk = new()); - public Task RemoveSongAsync(SingleSongBase item, CancellationToken ctk = new()); - public Task RemoveSongRangeAsync(List item, CancellationToken ctk = new()); - public Task RemoveAllSongAsync(CancellationToken ctk = new()); - public Task SetRandomAsync(bool isRandom, CancellationToken ctk = new()); - public Task ReRandomAsync(CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayCore/IPlayCore.Services.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayCore/IPlayCore.Services.cs deleted file mode 100644 index 425b157..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayCore/IPlayCore.Services.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.ObjectModel; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.PlayCore; - -public interface IPlayCoreService : IPlayCore -{ - public Task RegisterAudioServiceAsync(Type serviceType, CancellationToken ctk = new()); - public Task RegisterMusicProviderAsync(Type serviceType, CancellationToken ctk = new()); - public Task RegisterPlayListControllerAsync(Type serviceType, CancellationToken ctk = new()); - - public Task UnregisterAudioServiceAsync(Type serviceType, CancellationToken ctk = new()); - public Task UnregisterMusicProviderAsync(Type serviceType, CancellationToken ctk = new()); - public Task UnregisterPlayListControllerAsync(Type serviceType, CancellationToken ctk = new()); - - public Task FocusAudioServiceAsync(Type serviceType, CancellationToken ctk = new()); - public Task FocusPlayListControllerAsync(Type serviceType, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListContainer/IProgressiveLoadingContainer.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListContainer/IProgressiveLoadingContainer.cs deleted file mode 100644 index 299fdf2..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListContainer/IProgressiveLoadingContainer.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Collections.ObjectModel; -using HyPlayer.PlayCore.Abstraction.Models; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.PlayListContainer; - -public interface IProgressiveLoadingContainer : IContainer -{ - public int MaxProgressiveCount { get; } - public Task<(bool, List)> GetProgressiveItemsListAsync(int start, int count, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListController/IIndexedPlayListController.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListController/IIndexedPlayListController.cs deleted file mode 100644 index cb7f90c..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListController/IIndexedPlayListController.cs +++ /dev/null @@ -1,9 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.PlayListController; - -public interface IIndexedPlayListController : IPlaylistController -{ - public Task GetCurrentIndexAsync( CancellationToken ctk = new()); - public Task GetSongAtAsync(int index, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListController/INavigateSongPlayListController.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListController/INavigateSongPlayListController.cs deleted file mode 100644 index 8568e01..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListController/INavigateSongPlayListController.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.PlayListController; - -public interface INavigateSongPlayListController : IPlaylistController -{ - public abstract Task NavigateSongToAsync(SingleSongBase song, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListController/IPlayListGettablePlaylistController.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListController/IPlayListGettablePlaylistController.cs deleted file mode 100644 index e1f0089..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListController/IPlayListGettablePlaylistController.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Collections.ObjectModel; -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.PlayListController; - -public interface IPlayListGettablePlaylistController : IPlaylistController -{ - public Task> GetOrderedPlayListAsync( CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListController/IRandomizablePlayListController.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListController/IRandomizablePlayListController.cs deleted file mode 100644 index d72b384..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListController/IRandomizablePlayListController.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Collections.ObjectModel; -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.PlayListController; - -public interface IRandomizablePlayListController : IPlaylistController -{ - public Task RandomizeAsync(int seed = -1, CancellationToken ctk = new()); - public Task> GetOriginalListAsync(CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListController/IReversiblePlayListController.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListController/IReversiblePlayListController.cs deleted file mode 100644 index d503fdc..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/PlayListController/IReversiblePlayListController.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Interfaces.PlayListController; - -public interface IReversiblePlayListController : IPlaylistController -{ - public Task Reverse(CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/ProvidableItem/IHasCover.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/ProvidableItem/IHasCover.cs deleted file mode 100644 index af12d51..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/ProvidableItem/IHasCover.cs +++ /dev/null @@ -1,9 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models; -using HyPlayer.PlayCore.Abstraction.Models.Resources; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.ProvidableItem; - -public interface IHasCover : IProvidableItem -{ - public Task GetCoverAsync( CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/ProvidableItem/IHasCreators.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/ProvidableItem/IHasCreators.cs deleted file mode 100644 index 32737e6..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/ProvidableItem/IHasCreators.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Collections.ObjectModel; -using HyPlayer.PlayCore.Abstraction.Models; -using HyPlayer.PlayCore.Abstraction.Models.Containers; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.ProvidableItem; - -public interface IHasCreators : IProvidableItem -{ - public List? CreatorList { get; init; } - public Task?> GetCreatorsAsync( CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/ProvidableItem/IHasDescription.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/ProvidableItem/IHasDescription.cs deleted file mode 100644 index 05e0526..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/ProvidableItem/IHasDescription.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.ProvidableItem; - -public interface IHasDescription : IProvidableItem -{ - public string? Description { get; set; } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/ProvidableItem/IHasTag.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/ProvidableItem/IHasTag.cs deleted file mode 100644 index a9a6ebc..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/ProvidableItem/IHasTag.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Collections.ObjectModel; -using HyPlayer.PlayCore.Abstraction.Models; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.ProvidableItem; - -public interface IHasTag : IProvidableItem -{ - public List Tags { get; set; } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/ProvidableItem/IHasTranslation.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/ProvidableItem/IHasTranslation.cs deleted file mode 100644 index d9ad92b..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/ProvidableItem/IHasTranslation.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.ProvidableItem; - -public interface IHasTranslation : IProvidableItem -{ - public string? Translation { get; set; } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/ICommentProvidable.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/ICommentProvidable.cs deleted file mode 100644 index 2e616e6..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/ICommentProvidable.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.Provider; - -public interface ICommentProvidable : IProvider -{ - public Task GetCommentContainerAsync( CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/ILyricProvidable.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/ILyricProvidable.cs deleted file mode 100644 index 5cae22c..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/ILyricProvidable.cs +++ /dev/null @@ -1,9 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.Lyric; -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.Provider; - -public interface ILyricProvidable : IProvider -{ - public Task> GetLyricInfoAsync(SingleSongBase song, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IMusicResourceProvidable.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IMusicResourceProvidable.cs deleted file mode 100644 index 74733bf..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IMusicResourceProvidable.cs +++ /dev/null @@ -1,9 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.Resources; -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.Provider; - -public interface IMusicResourceProvidable : IProvider -{ - public Task GetMusicResourceAsync(SingleSongBase song, ResourceQualityTag qualityTag, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IProvableItemLikable.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IProvableItemLikable.cs deleted file mode 100644 index 96bdb9a..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IProvableItemLikable.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Collections.ObjectModel; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.Provider; - -public interface IProvableItemLikable : IProvider -{ - public Task LikeProvidableItemAsync(string inProviderId, string? targetId, CancellationToken ctk = new()); - public Task UnlikeProvidableItemAsync(string inProviderId, string? targetId, CancellationToken ctk = new()); - public Task> GetLikedProvidableIdsAsync(string typeId, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IProvidableItemProvidable.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IProvidableItemProvidable.cs deleted file mode 100644 index d7889c9..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IProvidableItemProvidable.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.Provider; - -public interface IProvidableItemProvidable : IProvider -{ - public Task GetProvidableItemByIdAsync(string inProviderId, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IProvidableItemRangeProvidable.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IProvidableItemRangeProvidable.cs deleted file mode 100644 index 09c6299..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IProvidableItemRangeProvidable.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Collections.ObjectModel; -using HyPlayer.PlayCore.Abstraction.Models; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.Provider; - -public interface IProvidableItemRangeProvidable : IProvider -{ - public Task> GetProvidableItemsRangeAsync(List inProviderIds, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IRecommendationProvidable.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IRecommendationProvidable.cs deleted file mode 100644 index 9e4283b..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/IRecommendationProvidable.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.Provider; - -public interface IRecommendationProvidable : IProvider -{ - public Task GetRecommendationAsync(string? typeId = null, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/ISearchableProvider.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/ISearchableProvider.cs deleted file mode 100644 index 22bca16..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Interfaces/Provider/ISearchableProvider.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models; - -namespace HyPlayer.PlayCore.Abstraction.Interfaces.Provider; - -public interface ISearchableProvider : IProvider -{ - public Task SearchProvidableItemsAsync(string keyword,string typeId, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/AudioServiceComponents/AudioTicketBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/AudioServiceComponents/AudioTicketBase.cs deleted file mode 100644 index 0298373..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/AudioServiceComponents/AudioTicketBase.cs +++ /dev/null @@ -1,20 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.Resources; - -namespace HyPlayer.PlayCore.Abstraction.Models.AudioServiceComponents; - -public abstract class AudioTicketBase -{ - public required AudioTicketStatus Status { get; set; } = AudioTicketStatus.None; - public required string AudioServiceId { get; init; } - public required MusicResourceBase MusicResource { get; init; } -} - -public enum AudioTicketStatus -{ - None, - Buffering, - Playing, - Paused, - Stopped, - Failed, -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/ContainerBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/ContainerBase.cs deleted file mode 100644 index 2764dc5..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/ContainerBase.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Models; - -public abstract class ContainerBase : ProvidableItemBase, IContainer { } - -public interface IContainer { } \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/AlbumBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/AlbumBase.cs deleted file mode 100644 index b6fbacd..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/AlbumBase.cs +++ /dev/null @@ -1,3 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Models.Containers; - -public abstract class AlbumBase : ContainerBase { } \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/ArtistBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/ArtistBase.cs deleted file mode 100644 index 3a71a56..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/ArtistBase.cs +++ /dev/null @@ -1,3 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Models.Containers; - -public abstract class ArtistBase : PersonBase { } \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/ContainersContainer.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/ContainersContainer.cs deleted file mode 100644 index 9bf3db1..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/ContainersContainer.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Collections.ObjectModel; - -namespace HyPlayer.PlayCore.Abstraction.Models.Containers; - -public abstract class ContainersContainer : ContainerBase -{ - public abstract Task> GetSubContainerAsync(CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/LinerContainerBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/LinerContainerBase.cs deleted file mode 100644 index 80efcb2..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/LinerContainerBase.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Collections.ObjectModel; - -namespace HyPlayer.PlayCore.Abstraction.Models.Containers; - -public abstract class LinerContainerBase : ContainerBase -{ - public abstract Task> GetAllItemsAsync(CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/PersonBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/PersonBase.cs deleted file mode 100644 index 95cf203..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/PersonBase.cs +++ /dev/null @@ -1,3 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Models.Containers; - -public abstract class PersonBase : ContainersContainer { } \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/UndeterminedContainerBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/UndeterminedContainerBase.cs deleted file mode 100644 index 02292b1..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Containers/UndeterminedContainerBase.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Models.Containers; - -public abstract class UndeterminedContainerBase : ContainerBase -{ - public abstract Task> GetNextItemsRangeAsync(CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Lyric/LyricWord.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Lyric/LyricWord.cs deleted file mode 100644 index 7e7574a..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Lyric/LyricWord.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Models.Lyric; - -public class LyricWord -{ - public string? Word { get; set; } - public required long StartTime { get; set; } - public required long EndTime { get; set; } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Lyric/ProcessedLyricLine.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Lyric/ProcessedLyricLine.cs deleted file mode 100644 index 14d9be2..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Lyric/ProcessedLyricLine.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Models.Lyric; - -public class ProcessedLyricLine : ILyricLine -{ - public required long StartTime { get; set; } - public required long EndTime { get; set; } - public string? Text { get; set; } -} - -public interface ILyricLine { } \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Lyric/ProcessedWordLyricLine.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Lyric/ProcessedWordLyricLine.cs deleted file mode 100644 index 05ec81e..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Lyric/ProcessedWordLyricLine.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Collections.ObjectModel; - -namespace HyPlayer.PlayCore.Abstraction.Models.Lyric; - -public class ProcessedWordLyricLine : ProcessedLyricLine -{ - public required List Words { get; init; } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Lyric/RawLyricInfo.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Lyric/RawLyricInfo.cs deleted file mode 100644 index 8db4f98..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Lyric/RawLyricInfo.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Models.Lyric; - -public abstract class RawLyricInfo : ResourceBase -{ - public override ResourceType Type => ResourceType.Text; - public abstract LyricType LyricType { get; } -} - -public enum LyricType -{ - Original, - Translation, - Romaji, - Furigana, - Commentary, - Soramimi, // 空耳 -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Lyric/TargetedProcessorRawLyricInfo.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Lyric/TargetedProcessorRawLyricInfo.cs deleted file mode 100644 index e15d0cc..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Lyric/TargetedProcessorRawLyricInfo.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Models.Lyric; - -public abstract class TargetedProcessorRawLyricInfo : RawLyricInfo -{ - public abstract Type TargetedProcessor { get; } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/NotificationBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/NotificationBase.cs deleted file mode 100644 index fb7c2bc..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/NotificationBase.cs +++ /dev/null @@ -1,3 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Models; - -public class NotificationBase { } \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Notifications/CurrentSongChangedNotification.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Notifications/CurrentSongChangedNotification.cs deleted file mode 100644 index f59c0b3..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Notifications/CurrentSongChangedNotification.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore.Abstraction.Models.Notifications; - -public class CurrentSongChangedNotification : NotificationBase -{ - public SingleSongBase? CurrentPlayingSong { get; set; } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Notifications/InnerPlayListChangedNotification.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Notifications/InnerPlayListChangedNotification.cs deleted file mode 100644 index c7f96fe..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Notifications/InnerPlayListChangedNotification.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Collections.ObjectModel; -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore.Abstraction.Models.Notifications; - -public class InnerPlayListChangedNotification : NotificationBase -{ - -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Notifications/InnerPlayListProgressiveAddedNotification.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Notifications/InnerPlayListProgressiveAddedNotification.cs deleted file mode 100644 index defeb6e..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Notifications/InnerPlayListProgressiveAddedNotification.cs +++ /dev/null @@ -1,8 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore.Abstraction.Models.Notifications; - -public class InnerPlayListProgressiveAddedNotification : NotificationBase -{ - public required List AddedSongs { get; init; } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Notifications/OrderedPlaylistChangedNotification.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Notifications/OrderedPlaylistChangedNotification.cs deleted file mode 100644 index 6e9ca41..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Notifications/OrderedPlaylistChangedNotification.cs +++ /dev/null @@ -1,9 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore.Abstraction.Models.Notifications; - -public class OrderedPlaylistChangedNotification : NotificationBase -{ - public required List OrderedList { get; init; } - public required bool IsRandom { get; set; } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/ProvidableItemBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/ProvidableItemBase.cs deleted file mode 100644 index 5440471..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/ProvidableItemBase.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Models; - -public abstract class ProvidableItemBase -{ - public required string Name { get; set; } - public string ItemId => $"{ProviderId}{TypeId}{ActualId}"; - public abstract string ProviderId { get; } - public abstract string TypeId { get; } - public required string ActualId { get; set; } -} - -public interface IProvidableItem { } \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/ResourceBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/ResourceBase.cs deleted file mode 100644 index cd514a0..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/ResourceBase.cs +++ /dev/null @@ -1,23 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.Resources; - -namespace HyPlayer.PlayCore.Abstraction.Models; - -public abstract class ResourceBase -{ - public string? Url { get; set; } - public string? ResourceName { get; set; } - public bool HasContent { get; set; } - public string? ExtensionName { get; set; } - public abstract ResourceType Type { get; } - public abstract Task GetResourceAsync(ResourceQualityTag? qualityTag = null, Type? awaitingType = null, CancellationToken ctk = new()); -} - -public enum ResourceType -{ - None, - Image, - Text, - Video, - Audio, - Binary, -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Resources/ImageResourceBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Resources/ImageResourceBase.cs deleted file mode 100644 index e9de24b..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Resources/ImageResourceBase.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Models.Resources; - -public abstract class ImageResourceBase : ResourceBase -{ - public override ResourceType Type => ResourceType.Image; -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Resources/ImageResourceQualityTag.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Resources/ImageResourceQualityTag.cs deleted file mode 100644 index ab5c958..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Resources/ImageResourceQualityTag.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Models.Resources; - -public class ImageResourceQualityTag : ResourceQualityTag -{ - public ImageResourceQualityTag(int pixelX, int pixelY) - { - this.PixelX = pixelX; - this.PixelY = pixelY; - } - public int PixelX { get; } - public int PixelY { get; } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Resources/MusicResourceBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Resources/MusicResourceBase.cs deleted file mode 100644 index a9d94d7..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Resources/MusicResourceBase.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Models.Resources; - -public abstract class MusicResourceBase : ResourceBase -{ - public override ResourceType Type => ResourceType.Audio; -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Resources/ResourceQualityTag.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Resources/ResourceQualityTag.cs deleted file mode 100644 index b9e47ee..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/Resources/ResourceQualityTag.cs +++ /dev/null @@ -1,3 +0,0 @@ -namespace HyPlayer.PlayCore.Abstraction.Models.Resources; - -public abstract class ResourceQualityTag { } \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/SingleItems/CommentBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/SingleItems/CommentBase.cs deleted file mode 100644 index 95cb05e..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/SingleItems/CommentBase.cs +++ /dev/null @@ -1,11 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Models.Containers; - -namespace HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -public abstract class CommentBase : ProvidableItemBase -{ - public string? Content { get; set; } - public long SendDate { get; set; } - public PersonBase? Sender { get; set; } - public int LikedCount { get; set; } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/SingleItems/SingleSongBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/SingleItems/SingleSongBase.cs deleted file mode 100644 index 373d30a..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/Models/SingleItems/SingleSongBase.cs +++ /dev/null @@ -1,13 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Interfaces.ProvidableItem; -using HyPlayer.PlayCore.Abstraction.Models.Containers; - -namespace HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -public abstract class SingleSongBase : ProvidableItemBase, IHasCreators -{ - public AlbumBase? Album { get; set; } - public List? CreatorList { get; init; } - public abstract Task?> GetCreatorsAsync(CancellationToken ctk = new()); - public long Duration { get; set; } - public bool Available { get; set; } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/PlayControllerBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/PlayControllerBase.cs deleted file mode 100644 index c4fc2c7..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/PlayControllerBase.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections.ObjectModel; -using HyPlayer.PlayCore.Abstraction.Models; -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore.Abstraction; - -public abstract class PlayControllerBase : IPlaylistController -{ - public abstract Task MoveNextAsync(CancellationToken ctk = new()); - public abstract Task MovePreviousAsync(CancellationToken ctk = new()); - public abstract Task MoveToIndexAsync(int index, CancellationToken ctk = new()); -} - -public interface IPlaylistController { } \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/PlayCoreBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/PlayCoreBase.cs deleted file mode 100644 index ca0b5cb..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/PlayCoreBase.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Collections.ObjectModel; -using HyPlayer.PlayCore.Abstraction.Interfaces.PlayCore; -using HyPlayer.PlayCore.Abstraction.Models; -using HyPlayer.PlayCore.Abstraction.Models.AudioServiceComponents; -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore.Abstraction; - -public abstract class PlayCoreBase : IPlayCoreService, - IPlayCorePlaylistModification, - IPlayCorePlayerModification, - IPlayCorePlayPositionModification - -{ - public virtual List? AudioServices { get; protected set; } = null; - public virtual List? MusicProviders { get; protected set; } = null; - public virtual List? PlayListControllers { get; protected set; } = null; - public virtual AudioServiceBase? CurrentAudioService { get; protected set; } = null; - public virtual PlayControllerBase? CurrentPlayListController { get; protected set; } = null; - - public virtual SingleSongBase? CurrentSong { get; protected set; } - public virtual ContainerBase? CurrentSongContainer { get; protected set; } - public virtual PlayListManagerBase? CurrentPlayList { get; protected set; } - public virtual AudioTicketBase? CurrentPlayingTicket { get; protected set; } - public virtual bool IsRandom { get; protected set; } - - public abstract Task RegisterAudioServiceAsync(Type serviceType, CancellationToken ctk = new()); - public abstract Task RegisterMusicProviderAsync(Type serviceType, CancellationToken ctk = new()); - public abstract Task RegisterPlayListControllerAsync(Type serviceType, CancellationToken ctk = new()); - public abstract Task UnregisterAudioServiceAsync(Type serviceType, CancellationToken ctk = new()); - public abstract Task UnregisterMusicProviderAsync(Type serviceType, CancellationToken ctk = new()); - public abstract Task UnregisterPlayListControllerAsync(Type serviceType, CancellationToken ctk = new()); - public abstract Task FocusAudioServiceAsync(Type serviceType, CancellationToken ctk = new()); - public abstract Task FocusPlayListControllerAsync(Type serviceType, CancellationToken ctk = new()); - public abstract Task ChangeSongContainerAsync(ContainerBase? container, CancellationToken ctk = new()); - public abstract Task InsertSongAsync(SingleSongBase item, int index = -1, CancellationToken ctk = new()); - public abstract Task InsertSongRangeAsync(List items, int index = -1, CancellationToken ctk = new()); - public abstract Task RemoveSongAsync(SingleSongBase item, CancellationToken ctk = new()); - public abstract Task RemoveSongRangeAsync(List item, CancellationToken ctk = new()); - public abstract Task RemoveAllSongAsync(CancellationToken ctk = new()); - public abstract Task SetRandomAsync(bool isRandom, CancellationToken ctk = new()); - public abstract Task ReRandomAsync(CancellationToken ctk = new()); - public abstract Task SeekAsync(long position, CancellationToken ctk = new()); - public abstract Task PlayAsync(CancellationToken ctk = new()); - public abstract Task PauseAsync(CancellationToken ctk = new()); - public abstract Task StopAsync(CancellationToken ctk = new()); - public abstract Task MovePointerToAsync(SingleSongBase song, CancellationToken ctk = new()); - public abstract Task MoveNextAsync(CancellationToken ctk = new()); - public abstract Task MovePreviousAsync(CancellationToken ctk = new()); -} - -public interface IPlayCore { } \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/PlayListManagerBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/PlayListManagerBase.cs deleted file mode 100644 index f2ac5d8..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/PlayListManagerBase.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Runtime.CompilerServices; -using HyPlayer.PlayCore.Abstraction.Models; -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore.Abstraction; - -public abstract class PlayListManagerBase -{ - public abstract Task AddSongContainerAsync(ContainerBase container, CancellationToken ctk = new()); - public abstract Task RemoveSongContainerAsync(ContainerBase container, CancellationToken ctk = new()); - public abstract Task> GetAllSongContainersAsync(CancellationToken ctk = new()); - public abstract Task ClearSongContainersAsync(CancellationToken ctk = new()); - - public abstract Task> GetPlayListAsync(CancellationToken ctk = new()); - public abstract Task AddSongAsync(SingleSongBase song, int index = -1, CancellationToken ctk = new()); - public abstract Task AddSongRangeAsync(List song, int index = -1, CancellationToken ctk = new()); - public abstract Task RemoveSongAsync(SingleSongBase song, CancellationToken ctk = new()); - public abstract Task RemoveSongRangeAsync(List song, CancellationToken ctk = new()); - public abstract Task ClearSongsAsync(CancellationToken ctk = new()); - - public abstract Task SetSongListAsync(List song, CancellationToken ctk = new()); -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/ProviderBase.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/ProviderBase.cs deleted file mode 100644 index cc34b63..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Abstraction/ProviderBase.cs +++ /dev/null @@ -1,14 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Interfaces.Provider; - -namespace HyPlayer.PlayCore.Abstraction; - -public abstract class ProviderBase : IProvider -{ - public abstract string Name { get; } - public abstract string Id { get; } - public abstract List ProvidableTypeIds { get; } -} - -public record ProvidableTypeId(string Id, string Name, bool Observable); - -public interface IProvider { } \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Benchmark/HyPlayer.PlayCore.Benchmark.csproj b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Benchmark/HyPlayer.PlayCore.Benchmark.csproj deleted file mode 100644 index a737e5c..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Benchmark/HyPlayer.PlayCore.Benchmark.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net7.0 - enable - enable - - - - - - - diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Benchmark/Program.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Benchmark/Program.cs deleted file mode 100644 index e5dff12..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Benchmark/Program.cs +++ /dev/null @@ -1,3 +0,0 @@ -// See https://aka.ms/new-console-template for more information - -Console.WriteLine("Hello, World!"); \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Tests/HyPlayer.PlayCore.Tests.csproj b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Tests/HyPlayer.PlayCore.Tests.csproj deleted file mode 100644 index 4f7558d..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Tests/HyPlayer.PlayCore.Tests.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - net7.0 - enable - enable - - false - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Tests/UnitTest1.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Tests/UnitTest1.cs deleted file mode 100644 index 3a06105..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Tests/UnitTest1.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace HyPlayer.PlayCore.Tests; - -public class UnitTest1 -{ - [Fact] - public void Test1() { } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Tests/Usings.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Tests/Usings.cs deleted file mode 100644 index 8c927eb..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.Tests/Usings.cs +++ /dev/null @@ -1 +0,0 @@ -global using Xunit; \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.sln b/src/HyPlayer.PlayCore/HyPlayer.PlayCore.sln deleted file mode 100644 index 18d178b..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore.sln +++ /dev/null @@ -1,34 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HyPlayer.PlayCore", "HyPlayer.PlayCore\HyPlayer.PlayCore.csproj", "{A72855DD-3304-4DC2-BCB7-8EE94C7C8303}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HyPlayer.PlayCore.Abstraction", "HyPlayer.PlayCore.Abstraction\HyPlayer.PlayCore.Abstraction.csproj", "{6B119AF2-67A6-4C2C-9B04-E9E5A32B12C3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HyPlayer.PlayCore.Tests", "HyPlayer.PlayCore.Tests\HyPlayer.PlayCore.Tests.csproj", "{5145D382-5FA6-44F6-B05E-5591B610CD94}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HyPlayer.PlayCore.Benchmark", "HyPlayer.PlayCore.Benchmark\HyPlayer.PlayCore.Benchmark.csproj", "{7D21EAC9-08BD-4E27-AE2E-F7ACC6655A4C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A72855DD-3304-4DC2-BCB7-8EE94C7C8303}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A72855DD-3304-4DC2-BCB7-8EE94C7C8303}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A72855DD-3304-4DC2-BCB7-8EE94C7C8303}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A72855DD-3304-4DC2-BCB7-8EE94C7C8303}.Release|Any CPU.Build.0 = Release|Any CPU - {6B119AF2-67A6-4C2C-9B04-E9E5A32B12C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6B119AF2-67A6-4C2C-9B04-E9E5A32B12C3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6B119AF2-67A6-4C2C-9B04-E9E5A32B12C3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6B119AF2-67A6-4C2C-9B04-E9E5A32B12C3}.Release|Any CPU.Build.0 = Release|Any CPU - {5145D382-5FA6-44F6-B05E-5591B610CD94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5145D382-5FA6-44F6-B05E-5591B610CD94}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5145D382-5FA6-44F6-B05E-5591B610CD94}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5145D382-5FA6-44F6-B05E-5591B610CD94}.Release|Any CPU.Build.0 = Release|Any CPU - {7D21EAC9-08BD-4E27-AE2E-F7ACC6655A4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7D21EAC9-08BD-4E27-AE2E-F7ACC6655A4C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7D21EAC9-08BD-4E27-AE2E-F7ACC6655A4C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7D21EAC9-08BD-4E27-AE2E-F7ACC6655A4C}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/HyPlayer.PlayCore.csproj b/src/HyPlayer.PlayCore/HyPlayer.PlayCore/HyPlayer.PlayCore.csproj deleted file mode 100644 index 548be56..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/HyPlayer.PlayCore.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - netstandard2.0 - enable - enable - default - 0.1.3 - HyPlayer.PlayCore - HyPlayer Team - PlayCore of HyPlayer - 0.0.13 - 0.0.13 - - - - - - - - - - - - diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/HyPlayer.PlayCore.csproj.DotSettings b/src/HyPlayer.PlayCore/HyPlayer.PlayCore/HyPlayer.PlayCore.csproj.DotSettings deleted file mode 100644 index e085de1..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/HyPlayer.PlayCore.csproj.DotSettings +++ /dev/null @@ -1,6 +0,0 @@ - - True \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCore.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCore.cs deleted file mode 100644 index 7c3de45..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCore.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Runtime.CompilerServices; -using AsyncAwaitBestPractices; -using Depository.Abstraction.Interfaces; -using HyPlayer.PlayCore.Abstraction; - -namespace HyPlayer.PlayCore; - -public sealed partial class Chopin : PlayCoreBase -{ - public Chopin( - IEnumerable audioServices, - IEnumerable providers, - IEnumerable playListControllers, - IDepository depository) - { - SafeFireAndForgetExtensions.Initialize(false); - _depository = depository; - AudioServices = - new( - new ObservableCollection(audioServices.ToList())); - MusicProviders = - new( - new ObservableCollection(providers.ToList())); - PlayListControllers = - new( - new ObservableCollection(playListControllers.ToList())); - } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.NotificationReciever.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.NotificationReciever.cs deleted file mode 100644 index 88a8fa9..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.NotificationReciever.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.ObjectModel; -using Depository.Abstraction.Interfaces; -using Depository.Abstraction.Interfaces.NotificationHub; -using HyPlayer.PlayCore.Abstraction.Models.Notifications; - -namespace HyPlayer.PlayCore; - -public sealed partial class Chopin : - INotificationSubscriber -{ - public Task HandleNotificationAsync(CurrentSongChangedNotification notification, CancellationToken ctk = new CancellationToken()) - { - ctk.ThrowIfCancellationRequested(); - CurrentSong = notification.CurrentPlayingSong; - return Task.CompletedTask; - } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.PlayPositionModification.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.PlayPositionModification.cs deleted file mode 100644 index 74f1723..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.PlayPositionModification.cs +++ /dev/null @@ -1,26 +0,0 @@ -using HyPlayer.PlayCore.Abstraction; -using HyPlayer.PlayCore.Abstraction.Interfaces.PlayListController; -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore; - -public sealed partial class Chopin -{ - public override async Task MovePointerToAsync(SingleSongBase song, CancellationToken ctk = new()) - { - if (CurrentPlayListController is INavigateSongPlayListController controller) - await controller.NavigateSongToAsync(song, ctk); - } - - public override async Task MoveNextAsync(CancellationToken ctk = new()) - { - if (CurrentPlayListController is { } controller) - await controller.MoveNextAsync(ctk); - } - - public override async Task MovePreviousAsync(CancellationToken ctk = new()) - { - if (CurrentPlayListController is { } controller) - await controller.MovePreviousAsync(ctk); - } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.PlayerModification.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.PlayerModification.cs deleted file mode 100644 index 549a41a..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.PlayerModification.cs +++ /dev/null @@ -1,45 +0,0 @@ -using HyPlayer.PlayCore.Abstraction.Interfaces.AudioServices; -using HyPlayer.PlayCore.Abstraction.Models.AudioServiceComponents; - -namespace HyPlayer.PlayCore; - -public sealed partial class Chopin -{ - public override AudioTicketBase? CurrentPlayingTicket { get; protected set; } - - public override async Task SeekAsync(long position, CancellationToken ctk = new()) - { - if (CurrentPlayingTicket is null) return; - if (CurrentPlayingTicket?.AudioServiceId == CurrentAudioService?.Id) - // ReSharper disable once SuspiciousTypeConversion.Global - if (CurrentAudioService is IAudioTicketSeekableService seekableService) - await seekableService.SeekAudioTicket(CurrentPlayingTicket!, position, ctk); - } - - public override async Task PlayAsync( CancellationToken ctk = new()) - { - if (CurrentPlayingTicket is null) return; - if (CurrentPlayingTicket?.AudioServiceId == CurrentAudioService?.Id) - // ReSharper disable once SuspiciousTypeConversion.Global - if (CurrentAudioService is IPlayAudioTicketService playableService) - await playableService.PlayAudioTicket(CurrentPlayingTicket!, ctk); - } - - public override async Task PauseAsync( CancellationToken ctk = new()) - { - if (CurrentPlayingTicket is null) return; - if (CurrentPlayingTicket?.AudioServiceId == CurrentAudioService?.Id) - // ReSharper disable once SuspiciousTypeConversion.Global - if (CurrentAudioService is IPauseAudioTicketService pauseService) - await pauseService.PauseAudioTicket(CurrentPlayingTicket!, ctk); - } - - public override async Task StopAsync( CancellationToken ctk = new()) - { - if (CurrentPlayingTicket is null) return; - if (CurrentPlayingTicket?.AudioServiceId == CurrentAudioService?.Id) - // ReSharper disable once SuspiciousTypeConversion.Global - if (CurrentAudioService is IStopAudioTicketService stopService) - await stopService.StopTicket(CurrentPlayingTicket!, ctk); - } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.PlaylistModification.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.PlaylistModification.cs deleted file mode 100644 index f7dbdf7..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.PlaylistModification.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System.Collections.ObjectModel; -using HyPlayer.PlayCore.Abstraction; -using HyPlayer.PlayCore.Abstraction.Interfaces.PlayListController; -using HyPlayer.PlayCore.Abstraction.Models; -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore; - -public sealed partial class Chopin -{ - public override bool IsRandom { get; protected set; } - - public override ContainerBase? CurrentSongContainer { get; protected set; } - - public override PlayListManagerBase? CurrentPlayList { get; protected set; } - - - public override Task ChangeSongContainerAsync(ContainerBase? container, CancellationToken ctk = new()) - { - CurrentSongContainer = container; - return Task.CompletedTask; - } - - public override async Task InsertSongAsync(SingleSongBase item, int index = -1, CancellationToken ctk = new()) - { - await (CurrentPlayList?.AddSongAsync(item, index, ctk) ?? Task.CompletedTask); - } - - public override async Task InsertSongRangeAsync(List items, int index = -1, CancellationToken ctk = new()) - { - await (CurrentPlayList?.AddSongRangeAsync(items, index, ctk) ?? Task.CompletedTask); - } - - public override async Task RemoveSongAsync(SingleSongBase item, CancellationToken ctk = new()) - { - await (CurrentPlayList?.RemoveSongAsync(item, ctk) ?? Task.CompletedTask); - } - - public override async Task RemoveSongRangeAsync(List items, CancellationToken ctk = new()) - { - await (CurrentPlayList?.RemoveSongRangeAsync(items, ctk) ?? Task.CompletedTask); - } - - public override async Task RemoveAllSongAsync( CancellationToken ctk = new()) - { - await (CurrentPlayList?.ClearSongsAsync(ctk) ?? Task.CompletedTask); - } - - public override async Task SetRandomAsync(bool isRandom, CancellationToken ctk = new()) - { - if (CurrentSongContainer is IRandomizablePlayListController randomizablePlayListController) - await randomizablePlayListController.RandomizeAsync(isRandom ? -1 : DateTime.Now.Millisecond, ctk); - } - - public override async Task ReRandomAsync(CancellationToken ctk = new()) - { - if (CurrentPlayListController is IRandomizablePlayListController randomizablePlayListController) - await randomizablePlayListController.RandomizeAsync(DateTime.Now.Millisecond, ctk); - } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.Services.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.Services.cs deleted file mode 100644 index ff7575d..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayCoreComponents/PlayCore.Services.cs +++ /dev/null @@ -1,160 +0,0 @@ -using System.Collections; -using System.Collections.ObjectModel; -using AsyncAwaitBestPractices; -using Depository.Abstraction.Enums; -using Depository.Abstraction.Interfaces; -using Depository.Abstraction.Models; -using HyPlayer.PlayCore.Abstraction; -using HyPlayer.PlayCore.Abstraction.Models; -using HyPlayer.PlayCore.Abstraction.Models.AudioServiceComponents; - -namespace HyPlayer.PlayCore; - -public sealed partial class Chopin : - INotifyDependencyChanged>, - INotifyDependencyChanged>, - INotifyDependencyChanged>, - INotifyDependencyChanged, - INotifyDependencyChanged -{ - public override List? AudioServices { get; protected set; } - - public override List? MusicProviders { get; protected set; } - - public override List? PlayListControllers { get; protected set; } - - public override AudioServiceBase? CurrentAudioService { get; protected set; } - - public override PlayControllerBase? CurrentPlayListController { get; protected set; } - - - private readonly IDepository _depository; - - private static readonly DependencyDescription _audioServiceDescription = - new(typeof(AudioServiceBase), DependencyLifetime.Singleton); - - private static readonly DependencyDescription _providerDescription = - new(typeof(ProviderBase), DependencyLifetime.Singleton); - - private static readonly DependencyDescription _playListControllerDescription = - new(typeof(PlayControllerBase), DependencyLifetime.Singleton); - - public override Task RegisterAudioServiceAsync(Type serviceType, CancellationToken ctk = new()) - { - if (_depository.GetDependency(typeof(AudioServiceBase)) is null) - _depository.AddDependency(_audioServiceDescription); - _depository.AddRelation(_audioServiceDescription, new(serviceType)); - var depDesc = new DependencyDescription(serviceType, DependencyLifetime.Singleton); - _depository.AddDependency(depDesc); - _depository.AddRelation(depDesc, new(serviceType)); - return Task.CompletedTask; - } - - public override Task RegisterMusicProviderAsync(Type serviceType, CancellationToken ctk = new()) - { - if (_depository.GetDependency(typeof(ProviderBase)) is null) - _depository.AddDependency(_providerDescription); - _depository.AddRelation(_providerDescription, new(serviceType)); - var depDesc = new DependencyDescription(serviceType, DependencyLifetime.Singleton); - _depository.AddDependency(depDesc); - _depository.AddRelation(depDesc, new(serviceType)); - return Task.CompletedTask; - } - - public override Task RegisterPlayListControllerAsync(Type serviceType, CancellationToken ctk = new()) - { - if (_depository.GetDependency(typeof(PlayControllerBase)) is null) - _depository.AddDependency(_playListControllerDescription); - _depository.AddRelation(_playListControllerDescription, new(serviceType)); - var depDesc = new DependencyDescription(serviceType, DependencyLifetime.Singleton); - _depository.AddDependency(depDesc); - _depository.AddRelation(depDesc, new(serviceType)); - return Task.CompletedTask; - } - - public override Task UnregisterAudioServiceAsync(Type serviceType, CancellationToken ctk = new()) - { - _depository.DeleteRelation( - _audioServiceDescription, - new(serviceType)); - var depDesc = _depository.GetDependency(serviceType); - if (depDesc is null) return Task.CompletedTask; - _depository.ClearRelations(depDesc); - _depository.DeleteDependency(depDesc); - - return Task.CompletedTask; - } - - public override Task UnregisterMusicProviderAsync(Type serviceType, CancellationToken ctk = new()) - { - _depository.DeleteRelation( - _providerDescription, - new(serviceType)); - var depDesc = _depository.GetDependency(serviceType); - if (depDesc is null) return Task.CompletedTask; - _depository.ClearRelations(depDesc); - _depository.DeleteDependency(depDesc); - return Task.CompletedTask; - } - - public override Task UnregisterPlayListControllerAsync(Type serviceType, CancellationToken ctk = new()) - { - _depository.DeleteRelation( - _providerDescription, - new(serviceType)); - var depDesc = _depository.GetDependency(serviceType); - if (depDesc is null) return Task.CompletedTask; - _depository.ClearRelations(depDesc); - _depository.DeleteDependency(depDesc); - return Task.CompletedTask; - } - - public override Task FocusAudioServiceAsync(Type serviceType, CancellationToken ctk = new()) - { - _depository.ChangeFocusingRelation(_audioServiceDescription, new(serviceType)); - return Task.CompletedTask; - } - - public override Task FocusPlayListControllerAsync(Type serviceType, CancellationToken ctk = new()) - { - _depository.ChangeFocusingRelation(_playListControllerDescription, - new(serviceType)); - return Task.CompletedTask; - } - - public void OnDependencyChanged(IEnumerable? marker) - { - AudioServices = new( - (_depository.ResolveDependencies(typeof(IEnumerable))) - .Select(o => (AudioServiceBase)o) - .ToList()); - } - - public void OnDependencyChanged(IEnumerable? marker) - { - MusicProviders = new( - (_depository.ResolveDependencies(typeof(IEnumerable))) - .Select(o => (ProviderBase)o) - .ToList()); - } - - public void OnDependencyChanged(IEnumerable? marker) - { - PlayListControllers = new( - (_depository.ResolveDependencies(typeof(IEnumerable))) - .Select(o => (PlayControllerBase)o) - .ToList()); - } - - public void OnDependencyChanged(AudioServiceBase? marker) - { - CurrentAudioService - = (AudioServiceBase)_depository.ResolveDependency(typeof(AudioServiceBase)); - } - - public void OnDependencyChanged(PlayControllerBase? marker) - { - CurrentPlayListController - = (PlayControllerBase)_depository.ResolveDependency(typeof(PlayControllerBase)); - } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayListControllers/DefaultPlayListManager.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayListControllers/DefaultPlayListManager.cs deleted file mode 100644 index df7fb2a..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayListControllers/DefaultPlayListManager.cs +++ /dev/null @@ -1,179 +0,0 @@ -using AsyncAwaitBestPractices; -using Depository.Abstraction.Interfaces; -using HyPlayer.PlayCore.Abstraction; -using HyPlayer.PlayCore.Abstraction.Interfaces.PlayListContainer; -using HyPlayer.PlayCore.Abstraction.Models; -using HyPlayer.PlayCore.Abstraction.Models.Containers; -using HyPlayer.PlayCore.Abstraction.Models.Notifications; -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore.PlayListControllers; - -public class DefaultPlayListManager : PlayListManagerBase -{ - private readonly List _list = new(); - private readonly Dictionary> _containerSongsDictionary = new(); - private readonly List _currentSongListContainers = new(); - - private readonly IDepository _depository; - private readonly INotificationHub _notificationHub; - - public DefaultPlayListManager(IDepository depository, INotificationHub notificationHub) - { - _depository = depository; - _notificationHub = notificationHub; - } - - public override async Task AddSongContainerAsync(ContainerBase container, CancellationToken ctk = new()) - { - _currentSongListContainers.RemoveAll(t => t is UndeterminedContainerBase); - if (container is UndeterminedContainerBase) - { - _currentSongListContainers.Clear(); - } - - _currentSongListContainers.Add(container); - var songsList = new List(); - await AppendSongContainerToList(container, songsList, ctk); - _containerSongsDictionary[container] = songsList; - } - - private async Task AppendSongContainerToList( - ContainerBase container, - List list, - CancellationToken ctk = new()) - { - if (container is IProgressiveLoadingContainer progressiveLoadingContainer) - { - var hasMore = true; - var start = 0; - while (hasMore) - { - (hasMore, var progressiveList) = await progressiveLoadingContainer.GetProgressiveItemsListAsync( - start, progressiveLoadingContainer.MaxProgressiveCount, - ctk); - var resultList = progressiveList.OfType().ToList(); - list.AddRange(resultList); - _list.AddRange(resultList); - await _notificationHub.PublishNotificationAsync(new InnerPlayListProgressiveAddedNotification - { - AddedSongs = resultList - }, ctk); - } - - await _notificationHub.PublishNotificationAsync(new InnerPlayListChangedNotification(), ctk); - return; - } - - if (container is LinerContainerBase linerContainer) - { - var resultList = (await linerContainer.GetAllItemsAsync(ctk)).OfType().ToList(); - list.AddRange(resultList); - _list.AddRange(resultList); - await _notificationHub.PublishNotificationAsync(new InnerPlayListChangedNotification(), ctk); - return; - } - - if (container is UndeterminedContainerBase undeterminedContainer) - { - var resultList = (await undeterminedContainer.GetNextItemsRangeAsync(ctk)).OfType() - .ToList(); - list.AddRange(resultList); - _list.AddRange(resultList); - await _notificationHub.PublishNotificationAsync(new InnerPlayListChangedNotification(), ctk); - return; - } - } - - - public override async Task RemoveSongContainerAsync(ContainerBase container, CancellationToken ctk = new()) - { - _currentSongListContainers.Remove(container); - foreach (var singleSongBase in _containerSongsDictionary[container]) - { - _list.Remove(singleSongBase); - } - - _containerSongsDictionary[container].Clear(); - _containerSongsDictionary.Remove(container); - await _notificationHub.PublishNotificationAsync(new InnerPlayListChangedNotification(), ctk); - } - - public override async Task ClearSongContainersAsync(CancellationToken ctk = new()) - { - _currentSongListContainers.Clear(); - foreach (var singleSongBases in _containerSongsDictionary.Values) - { - foreach (var singleSongBase in singleSongBases) - { - _list.Remove(singleSongBase); - } - - singleSongBases.Clear(); - } - - _list.Clear(); - _containerSongsDictionary.Clear(); - await _notificationHub.PublishNotificationAsync(new InnerPlayListChangedNotification(), ctk); - } - - public override Task> GetAllSongContainersAsync(CancellationToken ctk = new()) - { - return Task.FromResult(_currentSongListContainers); - } - - public override Task> GetPlayListAsync(CancellationToken ctk = new()) - { - return Task.FromResult(_list); - } - - public override async Task AddSongAsync(SingleSongBase song, int index = -1, CancellationToken ctk = new()) - { - if (index != -1) - _list.Insert(index, song); - else - _list.Add(song); - await _notificationHub.PublishNotificationAsync(new InnerPlayListChangedNotification(), ctk); - } - - public override async Task AddSongRangeAsync( - List songs, - int index = -1, - CancellationToken ctk = new()) - { - if (index != -1) - _list.InsertRange(index, songs); - else - _list.AddRange(songs); - await _notificationHub.PublishNotificationAsync(new InnerPlayListChangedNotification(), ctk); - } - - public override async Task RemoveSongAsync(SingleSongBase song, CancellationToken ctk = new()) - { - _list.Remove(song); - await _notificationHub.PublishNotificationAsync(new InnerPlayListChangedNotification(), ctk); - } - - public override async Task RemoveSongRangeAsync(List songs, CancellationToken ctk = new()) - { - foreach (var singleSongBase in songs) - { - _list.Remove(singleSongBase); - } - - await _notificationHub.PublishNotificationAsync(new InnerPlayListChangedNotification(), ctk); - } - - public override async Task ClearSongsAsync(CancellationToken ctk = new()) - { - _list.Clear(); - await _notificationHub.PublishNotificationAsync(new InnerPlayListChangedNotification(), ctk); - } - - public override async Task SetSongListAsync(List songs, CancellationToken ctk = new()) - { - _list.Clear(); - _list.AddRange(songs); - await _notificationHub.PublishNotificationAsync(new InnerPlayListChangedNotification(), ctk); - } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayListControllers/OrderedRollPlayController.cs b/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayListControllers/OrderedRollPlayController.cs deleted file mode 100644 index 90eb374..0000000 --- a/src/HyPlayer.PlayCore/HyPlayer.PlayCore/PlayListControllers/OrderedRollPlayController.cs +++ /dev/null @@ -1,119 +0,0 @@ -using System.Collections.ObjectModel; -using AsyncAwaitBestPractices; -using Depository.Abstraction.Interfaces; -using Depository.Abstraction.Interfaces.NotificationHub; -using HyPlayer.PlayCore.Abstraction; -using HyPlayer.PlayCore.Abstraction.Interfaces.PlayListContainer; -using HyPlayer.PlayCore.Abstraction.Interfaces.PlayListController; -using HyPlayer.PlayCore.Abstraction.Models; -using HyPlayer.PlayCore.Abstraction.Models.Containers; -using HyPlayer.PlayCore.Abstraction.Models.Notifications; -using HyPlayer.PlayCore.Abstraction.Models.SingleItems; - -namespace HyPlayer.PlayCore.PlayListControllers; - -public class OrderedRollPlayController : PlayControllerBase, - IReversiblePlayListController, - INavigateSongPlayListController, - IIndexedPlayListController, - IPlayListGettablePlaylistController, - INotifyDependencyChanged, - INotificationSubscriber -{ - private int _index = 0; - private readonly IDepository _depository; - private readonly INotificationHub _notificationHub; - private PlayListManagerBase? _playListManager; - private List _list = new(); - - public OrderedRollPlayController(IDepository depository, PlayListManagerBase? playListManager, INotificationHub notificationHub) - { - _depository = depository; - _playListManager = playListManager; - _notificationHub = notificationHub; - } - - - public override Task MoveNextAsync(CancellationToken ctk = new()) - { - if (_list.Count == 0) return Task.FromResult(null); - if (_list.Count <= _index + 1) - _index = -1; - _index++; - var curSong = _list[_index]; - _notificationHub.PublishNotificationAsync(new CurrentSongChangedNotification() { CurrentPlayingSong = curSong }, - ctk).SafeFireAndForget(); - return Task.FromResult(curSong); - } - - public override Task MovePreviousAsync(CancellationToken ctk = new()) - { - if (_list.Count == 0) return Task.FromResult(null); - if (_index <= 0) - _index = _list.Count; - _index--; - var curSong = _list[_index]; - _notificationHub.PublishNotificationAsync(new CurrentSongChangedNotification() { CurrentPlayingSong = curSong }, - ctk).SafeFireAndForget(); - return Task.FromResult(curSong); - } - - public override Task MoveToIndexAsync(int index, CancellationToken ctk = new()) - { - if (_list.Count >= index || index < 0) return Task.FromResult(null); - _index = index; - var curSong = _list[index]; - _notificationHub.PublishNotificationAsync(new CurrentSongChangedNotification() { CurrentPlayingSong = curSong }, - ctk).SafeFireAndForget(); - return Task.FromResult(_list[index]); - } - - public Task Reverse(CancellationToken ctk = new()) - { - _list.Reverse(); - _index = _list.Count - _index - 1; - _notificationHub.PublishNotificationAsync(new OrderedPlaylistChangedNotification(){ IsRandom = false, OrderedList = _list}, ctk).SafeFireAndForget(); - return Task.CompletedTask; - } - - public Task NavigateSongToAsync(SingleSongBase song, CancellationToken ctk = new()) - { - var indexOfSong = _list.IndexOf(song); - if (indexOfSong >= 0) - _index = indexOfSong; - _notificationHub.PublishNotificationAsync(new CurrentSongChangedNotification() { CurrentPlayingSong = _list[_index] }, - ctk).SafeFireAndForget(); - return Task.CompletedTask; - } - - public Task GetCurrentIndexAsync(CancellationToken ctk = new()) - { - return Task.FromResult(_index); - } - - public Task GetSongAtAsync(int index, CancellationToken ctk = new()) - { - if (_list.Count >= index || index < 0) return Task.FromResult(null); - return Task.FromResult(_list[index]); - } - - public Task> GetOrderedPlayListAsync(CancellationToken ctk = new()) - { - return Task.FromResult(_list); - } - - public async void OnDependencyChanged(PlayListManagerBase? alwaysNullMarker) - { - _playListManager = _depository.ResolveDependency(typeof(PlayListManagerBase)) as PlayListManagerBase; - _list = await (_playListManager?.GetPlayListAsync() ?? Task.FromResult(new List())); - _notificationHub.PublishNotificationAsync(new OrderedPlaylistChangedNotification(){ IsRandom = false, OrderedList = _list}).SafeFireAndForget(); - } - - public async Task HandleNotificationAsync( - InnerPlayListChangedNotification notification, - CancellationToken ctk = new()) - { - _list = await (_playListManager?.GetPlayListAsync(ctk) ?? Task.FromResult(new List())); - _notificationHub.PublishNotificationAsync(new OrderedPlaylistChangedNotification(){ IsRandom = false, OrderedList = _list}, ctk).SafeFireAndForget(); - } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/LICENCE b/src/HyPlayer.PlayCore/LICENCE deleted file mode 100644 index fc7381f..0000000 --- a/src/HyPlayer.PlayCore/LICENCE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 HyPlayer Team - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/global.json b/src/HyPlayer.PlayCore/global.json deleted file mode 100644 index aaac9e0..0000000 --- a/src/HyPlayer.PlayCore/global.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "sdk": { - "version": "7.0.0", - "rollForward": "latestMinor", - "allowPrerelease": false - } -} \ No newline at end of file diff --git a/src/HyPlayer.PlayCore/renovate.json b/src/HyPlayer.PlayCore/renovate.json deleted file mode 100644 index 39a2b6e..0000000 --- a/src/HyPlayer.PlayCore/renovate.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:base" - ] -}