├── BiliMusic ├── Assets │ ├── Placeholde.png │ ├── Login │ │ ├── ic_22.png │ │ ├── ic_33.png │ │ ├── ic_22_hide.png │ │ └── ic_33_hide.png │ ├── Placeholde300W300H.png │ ├── StoreLogo.backup.png │ ├── LargeTile.scale-100.png │ ├── LargeTile.scale-125.png │ ├── LargeTile.scale-150.png │ ├── LargeTile.scale-200.png │ ├── LargeTile.scale-400.png │ ├── Placeholde1020W300H.png │ ├── SmallTile.scale-100.png │ ├── SmallTile.scale-125.png │ ├── SmallTile.scale-150.png │ ├── SmallTile.scale-200.png │ ├── SmallTile.scale-400.png │ ├── StoreLogo.scale-100.png │ ├── StoreLogo.scale-125.png │ ├── StoreLogo.scale-150.png │ ├── StoreLogo.scale-200.png │ ├── StoreLogo.scale-400.png │ ├── SplashScreen.scale-100.png │ ├── SplashScreen.scale-125.png │ ├── SplashScreen.scale-150.png │ ├── SplashScreen.scale-200.png │ ├── SplashScreen.scale-400.png │ ├── LockScreenLogo.scale-200.png │ ├── Square44x44Logo.scale-100.png │ ├── Square44x44Logo.scale-125.png │ ├── Square44x44Logo.scale-150.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.scale-400.png │ ├── Wide310x150Logo.scale-100.png │ ├── Wide310x150Logo.scale-125.png │ ├── Wide310x150Logo.scale-150.png │ ├── Wide310x150Logo.scale-200.png │ ├── Wide310x150Logo.scale-400.png │ ├── Fonts │ │ └── MaterialIcons-Regular.ttf │ ├── Square150x150Logo.scale-100.png │ ├── Square150x150Logo.scale-125.png │ ├── Square150x150Logo.scale-150.png │ ├── Square150x150Logo.scale-200.png │ ├── Square150x150Logo.scale-400.png │ ├── Square44x44Logo.targetsize-16.png │ ├── Square44x44Logo.targetsize-24.png │ ├── Square44x44Logo.targetsize-256.png │ ├── Square44x44Logo.targetsize-32.png │ ├── Square44x44Logo.targetsize-48.png │ ├── Square44x44Logo.altform-unplated_targetsize-16.png │ ├── Square44x44Logo.altform-unplated_targetsize-256.png │ ├── Square44x44Logo.altform-unplated_targetsize-32.png │ ├── Square44x44Logo.altform-unplated_targetsize-48.png │ └── Square44x44Logo.targetsize-24_altform-unplated.png ├── Models │ ├── HomeTabModel.cs │ ├── ApiParseModel.cs │ ├── QualitiesModel.cs │ ├── RankModels.cs │ ├── SongsUrlModel.cs │ ├── MyCollectionMenuModel.cs │ ├── MyCreateMenuModels.cs │ ├── UserModels.cs │ ├── SearchModels.cs │ ├── PlayModel.cs │ ├── MainModels.cs │ ├── TabDetailModels.cs │ ├── SonglistDetailModels.cs │ └── SongsDetailModels.cs ├── Views │ ├── SingerPage.xaml │ ├── WebPage.xaml │ ├── UserPage.xaml │ ├── DesktopLyricsPage.xaml │ ├── SingerPage.xaml.cs │ ├── DesktopLyricsPage.xaml.cs │ ├── UserPage.xaml.cs │ ├── WebPage.xaml.cs │ ├── RankPage.xaml.cs │ ├── RankPage.xaml │ ├── SearchPage.xaml.cs │ ├── SongDetailsPage.xaml.cs │ ├── HomePage.xaml.cs │ └── SettingPage.xaml.cs ├── Controls │ ├── MyDialog.xaml │ ├── MyUICommand.cs │ ├── MyDialog.xaml.cs │ ├── HomeGrid.cs │ ├── MessageToast.xaml │ ├── CollectionsDialog.xaml │ ├── LoginDialog.xaml │ ├── MessageToast.xaml.cs │ ├── CollectionsDialog.xaml.cs │ └── LoginDialog.xaml.cs ├── Converters │ ├── DurationToTimeConvert.cs │ ├── ProgressToTimeConverter.cs │ ├── PlaylistStyleSelector.cs │ ├── NumberToStringConvert.cs │ ├── ImageCompressionConvert.cs │ ├── MusicPlayModeConvert.cs │ ├── HomeItemDataTemplateSelector.cs │ ├── HomeItemNarrowStyleSelector.cs │ └── HomeItemStyleSelector.cs ├── Helpers │ ├── UserHelper.cs │ ├── SystemHelper.cs │ ├── SettingHelper.cs │ ├── MessageCenter.cs │ ├── LogHelper.cs │ └── ApiHelper.cs ├── Properties │ ├── Default.rd.xml │ └── AssemblyInfo.cs ├── Package.appxmanifest ├── Modules │ ├── Ranks.cs │ ├── SongDetail.cs │ ├── TabDetail.cs │ ├── Account.cs │ ├── SongFlyoutMenu.cs │ └── MenuDetail.cs ├── Utils.cs └── App.xaml.cs ├── BiliMusic.Migrations.Startup ├── Program.cs └── BiliMusic.Migrations.Startup.csproj ├── README.md ├── BiliMusic.SqliteModel ├── BiliMusic.SqliteModel.csproj ├── BiliMusicContext.cs └── Migrations │ ├── 20190315063840_InitialCreate.cs │ ├── BiliMusicContextModelSnapshot.cs │ └── 20190315063840_InitialCreate.Designer.cs ├── BiliMusic.JS ├── secure.cs ├── biliapp.cs ├── Properties │ └── AssemblyInfo.cs └── BiliMusic.JS.csproj ├── BiliMusic.Sqlite ├── Properties │ ├── BiliMusic.Sqlite.rd.xml │ └── AssemblyInfo.cs ├── BilMusicContext.cs └── BiliMusic.Sqlite.csproj ├── opensource.html ├── privacystatement.html ├── .gitattributes ├── .gitignore └── BiliMusic.sln /BiliMusic/Assets/Placeholde.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Placeholde.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Login/ic_22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Login/ic_22.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Login/ic_33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Login/ic_33.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Login/ic_22_hide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Login/ic_22_hide.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Login/ic_33_hide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Login/ic_33_hide.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Placeholde300W300H.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Placeholde300W300H.png -------------------------------------------------------------------------------- /BiliMusic/Assets/StoreLogo.backup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/StoreLogo.backup.png -------------------------------------------------------------------------------- /BiliMusic/Assets/LargeTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/LargeTile.scale-100.png -------------------------------------------------------------------------------- /BiliMusic/Assets/LargeTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/LargeTile.scale-125.png -------------------------------------------------------------------------------- /BiliMusic/Assets/LargeTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/LargeTile.scale-150.png -------------------------------------------------------------------------------- /BiliMusic/Assets/LargeTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/LargeTile.scale-200.png -------------------------------------------------------------------------------- /BiliMusic/Assets/LargeTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/LargeTile.scale-400.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Placeholde1020W300H.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Placeholde1020W300H.png -------------------------------------------------------------------------------- /BiliMusic/Assets/SmallTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/SmallTile.scale-100.png -------------------------------------------------------------------------------- /BiliMusic/Assets/SmallTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/SmallTile.scale-125.png -------------------------------------------------------------------------------- /BiliMusic/Assets/SmallTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/SmallTile.scale-150.png -------------------------------------------------------------------------------- /BiliMusic/Assets/SmallTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/SmallTile.scale-200.png -------------------------------------------------------------------------------- /BiliMusic/Assets/SmallTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/SmallTile.scale-400.png -------------------------------------------------------------------------------- /BiliMusic/Assets/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /BiliMusic/Assets/StoreLogo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/StoreLogo.scale-125.png -------------------------------------------------------------------------------- /BiliMusic/Assets/StoreLogo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/StoreLogo.scale-150.png -------------------------------------------------------------------------------- /BiliMusic/Assets/StoreLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/StoreLogo.scale-200.png -------------------------------------------------------------------------------- /BiliMusic/Assets/StoreLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/StoreLogo.scale-400.png -------------------------------------------------------------------------------- /BiliMusic/Assets/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /BiliMusic/Assets/SplashScreen.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/SplashScreen.scale-125.png -------------------------------------------------------------------------------- /BiliMusic/Assets/SplashScreen.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/SplashScreen.scale-150.png -------------------------------------------------------------------------------- /BiliMusic/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /BiliMusic/Assets/SplashScreen.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/SplashScreen.scale-400.png -------------------------------------------------------------------------------- /BiliMusic/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square44x44Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square44x44Logo.scale-125.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square44x44Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square44x44Logo.scale-150.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square44x44Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square44x44Logo.scale-400.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Wide310x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Wide310x150Logo.scale-100.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Wide310x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Wide310x150Logo.scale-125.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Wide310x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Wide310x150Logo.scale-150.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Wide310x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Wide310x150Logo.scale-400.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Fonts/MaterialIcons-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Fonts/MaterialIcons-Regular.ttf -------------------------------------------------------------------------------- /BiliMusic/Assets/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square150x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square150x150Logo.scale-125.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square150x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square150x150Logo.scale-150.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square44x44Logo.targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square44x44Logo.targetsize-16.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square44x44Logo.targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square44x44Logo.targetsize-24.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square44x44Logo.targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square44x44Logo.targetsize-256.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square44x44Logo.targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square44x44Logo.targetsize-32.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square44x44Logo.targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square44x44Logo.targetsize-48.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square44x44Logo.altform-unplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square44x44Logo.altform-unplated_targetsize-16.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square44x44Logo.altform-unplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square44x44Logo.altform-unplated_targetsize-256.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square44x44Logo.altform-unplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square44x44Logo.altform-unplated_targetsize-32.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square44x44Logo.altform-unplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square44x44Logo.altform-unplated_targetsize-48.png -------------------------------------------------------------------------------- /BiliMusic/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaocz/BiliMusic/HEAD/BiliMusic/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /BiliMusic.Migrations.Startup/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BiliMusic.Migrations.Startup 4 | { 5 | class Program 6 | { 7 | static void Main(string[] args) 8 | { 9 | Console.WriteLine("Hello World!"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /BiliMusic/Models/HomeTabModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BiliMusic.Models 8 | { 9 | public class HomeTabModel 10 | { 11 | public int id { get; set; } 12 | public string title { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 哔哩哔哩音乐 UWP 2 | 3 | 第三方哔哩哔哩音乐UWP客户端,目前属于半弃坑状态 4 | 5 | ## 截图 6 | 7 | ![首页](https://i.loli.net/2019/08/22/d5jKI9FRpPCVg4H.png) 8 | 9 | ![歌单](https://i.loli.net/2019/08/22/bBhicZrGKQ32INk.png) 10 | 11 | ## TODO 12 | 13 | - [√] 首页 14 | - [√] 搜索 15 | - [√] 歌单详细 16 | - [√] 音乐播放 17 | - [√] 榜单 18 | - [×] 歌曲详细 19 | - [×] MV播放 20 | - [×] 收音叽 21 | - [×] 音乐下载 22 | - [×] 本地音乐 23 | - [×] 个人中心 24 | - [×] 我的关注 25 | - [×] 我的收藏 26 | -------------------------------------------------------------------------------- /BiliMusic/Models/ApiParseModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BiliMusic.Models 8 | { 9 | public class ApiParseModel 10 | { 11 | public int code { get; set; } 12 | public string msg { get; set; } = ""; 13 | public string message { get; set; } = ""; 14 | public T data { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /BiliMusic/Views/SingerPage.xaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /BiliMusic/Models/QualitiesModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BiliMusic.Models 8 | { 9 | public class QualitiesModel 10 | { 11 | public int type { get; set; } 12 | public string desc { get; set; } 13 | public long size { get; set; } 14 | public string bps { get; set; } 15 | public string tag { get; set; } 16 | public int require { get; set; } 17 | public string requiredesc { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /BiliMusic.SqliteModel/BiliMusic.SqliteModel.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | all 11 | runtime; build; native; contentfiles; analyzers 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /BiliMusic/Views/WebPage.xaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /BiliMusic/Views/UserPage.xaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /BiliMusic/Views/DesktopLyricsPage.xaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /BiliMusic.Migrations.Startup/BiliMusic.Migrations.Startup.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.1 6 | 7 | 8 | 9 | 10 | all 11 | runtime; build; native; contentfiles; analyzers 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /BiliMusic/Controls/MyDialog.xaml: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /BiliMusic/Models/RankModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BiliMusic.Models 8 | { 9 | public class RankModel 10 | { 11 | public int menuId { get; set; } 12 | public string title { get; set; } 13 | public string coverUrl { get; set; } 14 | public string intro { get; set; } 15 | public int type { get; set; } 16 | public List audios { get; set; } 17 | } 18 | public class AudiosModel 19 | { 20 | public int id { get; set; } 21 | public string title { get; set; } 22 | public string author { get; set; } 23 | } 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /BiliMusic/Controls/MyUICommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Windows.UI.Popups; 7 | 8 | namespace BiliMusic.Controls 9 | { 10 | public class MyUICommand 11 | { 12 | public MyUICommand(string lable) 13 | { 14 | Label = lable; 15 | } 16 | public MyUICommand(string lable, EventHandler invoked) 17 | { 18 | Label = lable; 19 | Invoked = invoked; 20 | } 21 | public object Id { get; set ; } 22 | public EventHandler Invoked { get; set; } 23 | public string Label { get; set; } 24 | 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /BiliMusic/Converters/DurationToTimeConvert.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Windows.UI.Xaml.Data; 7 | 8 | namespace BiliMusic.Converters 9 | { 10 | public class DurationToTimeConvert : IValueConverter 11 | { 12 | public object Convert(object value, Type targetType, object parameter, string language) 13 | { 14 | var ts = TimeSpan.FromSeconds((Int64)value); 15 | 16 | return ts.ToString(@"mm\:ss"); 17 | } 18 | 19 | public object ConvertBack(object value, Type targetType, object parameter, string language) 20 | { 21 | throw new NotImplementedException(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /BiliMusic/Models/SongsUrlModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BiliMusic.Models 8 | { 9 | public class SongsUrlModel 10 | { 11 | 12 | public int sid { get; set; } 13 | /// 14 | /// -1是试听,提示开通会员 15 | /// 16 | public int type { get; set; } 17 | public string info { get; set; } 18 | public int timeout { get; set; } 19 | public int size { get; set; } 20 | public List cdns { get; set; } 21 | public List qualities { get; set; } 22 | public string title { get; set; } 23 | public string cover { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /BiliMusic/Converters/ProgressToTimeConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Windows.UI.Xaml.Data; 7 | 8 | namespace BiliMusic.Converters 9 | { 10 | public class ProgressToTimeConverter : IValueConverter 11 | { 12 | public object Convert(object value, Type targetType, object parameter, string language) 13 | { 14 | int i = 0; 15 | int.TryParse(value.ToString(), out i); 16 | TimeSpan ts = new TimeSpan(0, 0, i); 17 | return ts.ToString(@"mm\:ss"); 18 | } 19 | 20 | public object ConvertBack(object value, Type targetType, object parameter, string language) 21 | { 22 | return null; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /BiliMusic/Converters/PlaylistStyleSelector.cs: -------------------------------------------------------------------------------- 1 | using BiliMusic.Models; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Windows.UI.Xaml; 8 | using Windows.UI.Xaml.Controls; 9 | namespace BiliMusic.Converters 10 | { 11 | public class PlaylistStyleSelector : StyleSelector 12 | { 13 | protected override Style SelectStyleCore(object item, DependencyObject container) 14 | { 15 | var models = item as PlayModel; 16 | if (models.select) 17 | { 18 | return (Style)App.Current.Resources["playlistItemSelect"]; 19 | } 20 | else 21 | { 22 | return (Style)App.Current.Resources["playlistItem"]; 23 | } 24 | } 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /BiliMusic.JS/secure.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Windows.Foundation.Metadata; 7 | using Windows.UI.Popups; 8 | namespace BiliMusic.JS 9 | { 10 | [AllowForWeb] 11 | public sealed class secure 12 | { 13 | public event EventHandler CaptchaEvent; 14 | public void Captcha() 15 | { 16 | if (CaptchaEvent != null) 17 | { 18 | CaptchaEvent(this, ""); 19 | } 20 | } 21 | 22 | public event EventHandler CloseCaptchaEvent; 23 | public void CloseCaptcha() 24 | { 25 | if (CloseCaptchaEvent != null) 26 | { 27 | CloseCaptchaEvent(this, ""); 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /BiliMusic/Helpers/UserHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices.WindowsRuntime; 5 | using System.Text; 6 | using System.Text.RegularExpressions; 7 | using System.Threading.Tasks; 8 | using Windows.Security.Cryptography.Core; 9 | using Windows.Storage.Streams; 10 | using Windows.Web.Http.Filters; 11 | using Microsoft.Toolkit.Uwp.Helpers; 12 | using BiliMusic.Models; 13 | 14 | namespace BiliMusic.Helpers 15 | { 16 | /// 17 | /// 用户信息 18 | /// 19 | public static class UserHelper 20 | { 21 | public static bool isLogin { get; set; } = false; 22 | public static string access_key { get; set; } 23 | public static long mid { get; set; } = 0; 24 | 25 | public static void Collect() 26 | { 27 | 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /BiliMusic/Views/SingerPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.Foundation; 7 | using Windows.Foundation.Collections; 8 | using Windows.UI.Xaml; 9 | using Windows.UI.Xaml.Controls; 10 | using Windows.UI.Xaml.Controls.Primitives; 11 | using Windows.UI.Xaml.Data; 12 | using Windows.UI.Xaml.Input; 13 | using Windows.UI.Xaml.Media; 14 | using Windows.UI.Xaml.Navigation; 15 | 16 | // https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板 17 | 18 | namespace BiliMusic.Views 19 | { 20 | /// 21 | /// 可用于自身或导航至 Frame 内部的空白页。 22 | /// 23 | public sealed partial class SingerPage : Page 24 | { 25 | public SingerPage() 26 | { 27 | this.InitializeComponent(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /BiliMusic.SqliteModel/BiliMusicContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.DataAnnotations; 3 | using System.ComponentModel.DataAnnotations.Schema; 4 | using Microsoft.EntityFrameworkCore; 5 | 6 | namespace BiliMusic.SqliteModel 7 | { 8 | 9 | public class BiliMusicContext : DbContext 10 | { 11 | public DbSet SearchHistorys { get; set; } 12 | 13 | 14 | protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) 15 | { 16 | optionsBuilder.UseSqlite("Data Source=bilimusic.db"); 17 | } 18 | } 19 | 20 | public class SearchHistory 21 | { 22 | [Required,Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)] 23 | public int id { get; set; } 24 | public DateTime datetime { get; set; } 25 | public string content { get; set; } 26 | } 27 | 28 | 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /BiliMusic/Converters/NumberToStringConvert.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Windows.UI.Xaml.Data; 7 | 8 | namespace BiliMusic.Converters 9 | { 10 | public class NumberToStringConvert : IValueConverter 11 | { 12 | public object Convert(object value, Type targetType, object parameter, string language) 13 | { 14 | var number = System.Convert.ToDouble(value); 15 | if (number >= 10000) 16 | { 17 | return ((double)number / 10000).ToString("0.0") + "万"; 18 | } 19 | return number.ToString(); 20 | } 21 | 22 | public object ConvertBack(object value, Type targetType, object parameter, string language) 23 | { 24 | throw new NotImplementedException(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /BiliMusic/Views/DesktopLyricsPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.Foundation; 7 | using Windows.Foundation.Collections; 8 | using Windows.UI.Xaml; 9 | using Windows.UI.Xaml.Controls; 10 | using Windows.UI.Xaml.Controls.Primitives; 11 | using Windows.UI.Xaml.Data; 12 | using Windows.UI.Xaml.Input; 13 | using Windows.UI.Xaml.Media; 14 | using Windows.UI.Xaml.Navigation; 15 | 16 | // https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板 17 | 18 | namespace BiliMusic.Views 19 | { 20 | /// 21 | /// 可用于自身或导航至 Frame 内部的空白页。 22 | /// 23 | public sealed partial class DesktopLyricsPage : Page 24 | { 25 | public DesktopLyricsPage() 26 | { 27 | this.InitializeComponent(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /BiliMusic/Converters/ImageCompressionConvert.cs: -------------------------------------------------------------------------------- 1 | using BiliMusic.Helpers; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Windows.UI.Xaml.Data; 8 | 9 | namespace BiliMusic.Converters 10 | { 11 | public class ImageCompressionConvert : IValueConverter 12 | { 13 | public object Convert(object value, Type targetType, object parameter, string language) 14 | { 15 | if (SettingHelper.LoadOriginalImage) 16 | { 17 | return value; 18 | } 19 | //使用webp图片能更小,可惜UWP还不支持 20 | return value.ToString()+"@"+ parameter.ToString()+".jpg"; 21 | } 22 | 23 | public object ConvertBack(object value, Type targetType, object parameter, string language) 24 | { 25 | throw new NotImplementedException(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /BiliMusic/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /BiliMusic.Sqlite/Properties/BiliMusic.Sqlite.rd.xml: -------------------------------------------------------------------------------- 1 | 2 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /BiliMusic/Views/UserPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.Foundation; 7 | using Windows.Foundation.Collections; 8 | using Windows.UI.Xaml; 9 | using Windows.UI.Xaml.Controls; 10 | using Windows.UI.Xaml.Controls.Primitives; 11 | using Windows.UI.Xaml.Data; 12 | using Windows.UI.Xaml.Input; 13 | using Windows.UI.Xaml.Media; 14 | using Windows.UI.Xaml.Navigation; 15 | 16 | // https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板 17 | 18 | namespace BiliMusic.Views 19 | { 20 | /// 21 | /// 可用于自身或导航至 Frame 内部的空白页。 22 | /// 23 | public sealed partial class UserPage : Page 24 | { 25 | public UserPage() 26 | { 27 | this.InitializeComponent(); 28 | } 29 | 30 | private void BtnLogout_Click(object sender, RoutedEventArgs e) 31 | { 32 | Helpers.MessageCenter.SendLogout(); 33 | this.Frame.GoBack(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /BiliMusic/Views/WebPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.Foundation; 7 | using Windows.Foundation.Collections; 8 | using Windows.UI.Xaml; 9 | using Windows.UI.Xaml.Controls; 10 | using Windows.UI.Xaml.Controls.Primitives; 11 | using Windows.UI.Xaml.Data; 12 | using Windows.UI.Xaml.Input; 13 | using Windows.UI.Xaml.Media; 14 | using Windows.UI.Xaml.Navigation; 15 | 16 | // https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板 17 | 18 | namespace BiliMusic.Views 19 | { 20 | /// 21 | /// 可用于自身或导航至 Frame 内部的空白页。 22 | /// 23 | public sealed partial class WebPage : Page 24 | { 25 | public WebPage() 26 | { 27 | this.InitializeComponent(); 28 | } 29 | protected override void OnNavigatedTo(NavigationEventArgs e) 30 | { 31 | base.OnNavigatedTo(e); 32 | webview.Navigate(new Uri(e.Parameter.ToString())); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /BiliMusic.JS/biliapp.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Windows.Foundation.Metadata; 7 | using Windows.UI.Popups; 8 | 9 | namespace BiliMusic.JS 10 | { 11 | [AllowForWeb] 12 | public sealed class biliapp 13 | { 14 | public void Alert(string message) 15 | { 16 | MessageDialog md; 17 | md = new MessageDialog(message); 18 | md.ShowAsync(); 19 | } 20 | public event EventHandler ValidateLoginEvent; 21 | public void ValidateLogin(string data) 22 | { 23 | if (ValidateLoginEvent != null) 24 | { 25 | ValidateLoginEvent(this, data); 26 | } 27 | 28 | 29 | } 30 | public event EventHandler CloseBrowserEvent; 31 | public void CloseBrowser() 32 | { 33 | if (CloseBrowserEvent != null) 34 | { 35 | CloseBrowserEvent(this, ""); 36 | } 37 | 38 | 39 | } 40 | 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /BiliMusic/Controls/MyDialog.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.Foundation; 7 | using Windows.Foundation.Collections; 8 | using Windows.UI.Xaml; 9 | using Windows.UI.Xaml.Controls; 10 | using Windows.UI.Xaml.Controls.Primitives; 11 | using Windows.UI.Xaml.Data; 12 | using Windows.UI.Xaml.Input; 13 | using Windows.UI.Xaml.Media; 14 | using Windows.UI.Xaml.Navigation; 15 | 16 | // https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“内容对话框”项模板 17 | 18 | namespace BiliMusic.Controls 19 | { 20 | public sealed partial class MyDialog : ContentDialog 21 | { 22 | public MyDialog() 23 | { 24 | this.InitializeComponent(); 25 | } 26 | 27 | private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) 28 | { 29 | } 30 | 31 | private void ContentDialog_SecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) 32 | { 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /BiliMusic/Converters/MusicPlayModeConvert.cs: -------------------------------------------------------------------------------- 1 | using BiliMusic.Modules; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Windows.UI.Xaml; 8 | using Windows.UI.Xaml.Data; 9 | 10 | namespace BiliMusic.Converters 11 | { 12 | public class MusicPlayModeConvert : IValueConverter 13 | { 14 | public object Convert(object value, Type targetType, object parameter, string language) 15 | { 16 | if (value is MusicPlayMode) 17 | { 18 | var mode = (MusicPlayMode)value; 19 | if (mode.ToString()==parameter.ToString()) 20 | { 21 | return Visibility.Visible; 22 | } 23 | else 24 | { 25 | return Visibility.Collapsed; 26 | } 27 | } 28 | return value; 29 | 30 | } 31 | 32 | public object ConvertBack(object value, Type targetType, object parameter, string language) 33 | { 34 | return null; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /BiliMusic/Models/MyCollectionMenuModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BiliMusic.Models 8 | { 9 | public class MyCollectionMenuModel 10 | { 11 | public int pageNum { get; set; } 12 | public int pageSize { get; set; } 13 | public int total { get; set; } 14 | public int size { get; set; } 15 | public int pages { get; set; } 16 | public bool isFirstPage { get; set; } 17 | public bool isLastPage { get; set; } 18 | public bool hasPreviousPage { get; set; } 19 | public bool hasNextPage { get; set; } 20 | public List list { get; set; } 21 | } 22 | public class MyCollectionMenuItemModel 23 | { 24 | 25 | public int mid { get; set; } 26 | public string title { get; set; } 27 | public string intro { get; set; } 28 | public string coverUrl { get; set; } 29 | public int menuId { get; set; } 30 | public string uname { get; set; } 31 | public string face { get; set; } 32 | 33 | } 34 | } -------------------------------------------------------------------------------- /BiliMusic/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("BiliMusic")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("BiliMusic")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /BiliMusic.JS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("BiliMusic.JS")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("BiliMusic.JS")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /BiliMusic.SqliteModel/Migrations/20190315063840_InitialCreate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.EntityFrameworkCore.Migrations; 3 | 4 | namespace BiliMusic.SqliteModel.Migrations 5 | { 6 | public partial class InitialCreate : Migration 7 | { 8 | protected override void Up(MigrationBuilder migrationBuilder) 9 | { 10 | migrationBuilder.CreateTable( 11 | name: "SearchHistorys", 12 | columns: table => new 13 | { 14 | id = table.Column(nullable: false) 15 | .Annotation("Sqlite:Autoincrement", true), 16 | datetime = table.Column(nullable: false), 17 | content = table.Column(nullable: true) 18 | }, 19 | constraints: table => 20 | { 21 | table.PrimaryKey("PK_SearchHistorys", x => x.id); 22 | }); 23 | } 24 | 25 | protected override void Down(MigrationBuilder migrationBuilder) 26 | { 27 | migrationBuilder.DropTable( 28 | name: "SearchHistorys"); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /BiliMusic.Sqlite/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("BiliMusic.Sqlite")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("BiliMusic.Sqlite")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /BiliMusic/Converters/HomeItemDataTemplateSelector.cs: -------------------------------------------------------------------------------- 1 | using BiliMusic.Models; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Windows.UI.Xaml; 8 | using Windows.UI.Xaml.Controls; 9 | 10 | namespace BiliMusic.Converters 11 | { 12 | public class HomeItemDataTemplateSelector : DataTemplateSelector 13 | { 14 | public ResourceDictionary resource; 15 | protected override DataTemplate SelectTemplateCore(object item, DependencyObject container) 16 | { 17 | var models = item as modulesModel; 18 | switch (models.type) 19 | { 20 | case 2: 21 | //返回编辑推荐模板 22 | return resource["Recommend"] as DataTemplate; 23 | case 3: 24 | //返回歌单模板 25 | return resource["SongList"] as DataTemplate; 26 | case 4: 27 | return resource["Videos"] as DataTemplate; 28 | default: 29 | break; 30 | } 31 | 32 | 33 | return base.SelectTemplateCore(item, container); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /BiliMusic.Sqlite/BilMusicContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace BiliMusic.SqliteModel 9 | { 10 | public class BilMusicContext : DbContext 11 | { 12 | public class BloggingContext : DbContext 13 | { 14 | public DbSet Blogs { get; set; } 15 | public DbSet Posts { get; set; } 16 | 17 | protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) 18 | { 19 | optionsBuilder.UseSqlite("Data Source=bilimusic.db"); 20 | } 21 | } 22 | 23 | public class SearchHistory 24 | { 25 | public DateTime data { get; set; } 26 | public string content { get; set; } 27 | } 28 | 29 | public class Post 30 | { 31 | public int PostId { get; set; } 32 | public string Title { get; set; } 33 | public string Content { get; set; } 34 | 35 | public int BlogId { get; set; } 36 | public Blog Blog { get; set; } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /BiliMusic/Converters/HomeItemNarrowStyleSelector.cs: -------------------------------------------------------------------------------- 1 | using BiliMusic.Models; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Windows.UI.Xaml; 8 | using Windows.UI.Xaml.Controls; 9 | 10 | namespace BiliMusic.Converters 11 | { 12 | public class HomeItemNarrowStyleSelector : StyleSelector 13 | { 14 | protected override Style SelectStyleCore(object item, DependencyObject container) 15 | { 16 | 17 | var models = item as modulesModel; 18 | Style st = new Style(); 19 | st.TargetType = typeof(ContentPresenter); 20 | st.Setters.Add(new Setter() 21 | { 22 | Property = Grid.ColumnProperty, 23 | Value = 0 24 | }); 25 | st.Setters.Add(new Setter() 26 | { 27 | Property = Grid.RowProperty, 28 | Value = models.narrow_row 29 | }); 30 | st.Setters.Add(new Setter() 31 | { 32 | Property = Grid.ColumnSpanProperty, 33 | Value = 2 34 | }); 35 | return st; 36 | 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /BiliMusic.SqliteModel/Migrations/BiliMusicContextModelSnapshot.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using BiliMusic.SqliteModel; 4 | using Microsoft.EntityFrameworkCore; 5 | using Microsoft.EntityFrameworkCore.Infrastructure; 6 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 7 | 8 | namespace BiliMusic.SqliteModel.Migrations 9 | { 10 | [DbContext(typeof(BiliMusicContext))] 11 | partial class BiliMusicContextModelSnapshot : ModelSnapshot 12 | { 13 | protected override void BuildModel(ModelBuilder modelBuilder) 14 | { 15 | #pragma warning disable 612, 618 16 | modelBuilder 17 | .HasAnnotation("ProductVersion", "2.2.3-servicing-35854"); 18 | 19 | modelBuilder.Entity("BiliMusic.SqliteModel.SearchHistory", b => 20 | { 21 | b.Property("id") 22 | .ValueGeneratedOnAdd(); 23 | 24 | b.Property("content"); 25 | 26 | b.Property("datetime"); 27 | 28 | b.HasKey("id"); 29 | 30 | b.ToTable("SearchHistorys"); 31 | }); 32 | #pragma warning restore 612, 618 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /BiliMusic/Controls/HomeGrid.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Windows.UI.Xaml; 7 | using Windows.UI.Xaml.Controls; 8 | 9 | namespace BiliMusic.Controls 10 | { 11 | public class HomeGrid:Grid 12 | { 13 | public HomeGrid() 14 | { 15 | 16 | } 17 | 18 | public int RowNumber 19 | { 20 | get { return (int)GetValue(RowNumberProperty); } 21 | set { 22 | SetValue(RowNumberProperty, value); 23 | this.RowDefinitions.Clear(); 24 | for (int i = 0; i < value; i++) 25 | { 26 | this.RowDefinitions.Add(new RowDefinition() { 27 | Height=GridLength.Auto 28 | }); 29 | } 30 | 31 | } 32 | } 33 | 34 | // Using a DependencyProperty as the backing store for RowNumber. This enables animation, styling, binding, etc... 35 | public static readonly DependencyProperty RowNumberProperty = 36 | DependencyProperty.Register("RowNumber", typeof(int), typeof(HomeGrid), new PropertyMetadata(10)); 37 | 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /BiliMusic.SqliteModel/Migrations/20190315063840_InitialCreate.Designer.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using BiliMusic.SqliteModel; 4 | using Microsoft.EntityFrameworkCore; 5 | using Microsoft.EntityFrameworkCore.Infrastructure; 6 | using Microsoft.EntityFrameworkCore.Migrations; 7 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 8 | 9 | namespace BiliMusic.SqliteModel.Migrations 10 | { 11 | [DbContext(typeof(BiliMusicContext))] 12 | [Migration("20190315063840_InitialCreate")] 13 | partial class InitialCreate 14 | { 15 | protected override void BuildTargetModel(ModelBuilder modelBuilder) 16 | { 17 | #pragma warning disable 612, 618 18 | modelBuilder 19 | .HasAnnotation("ProductVersion", "2.2.3-servicing-35854"); 20 | 21 | modelBuilder.Entity("BiliMusic.SqliteModel.SearchHistory", b => 22 | { 23 | b.Property("id") 24 | .ValueGeneratedOnAdd(); 25 | 26 | b.Property("content"); 27 | 28 | b.Property("datetime"); 29 | 30 | b.HasKey("id"); 31 | 32 | b.ToTable("SearchHistorys"); 33 | }); 34 | #pragma warning restore 612, 618 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /BiliMusic/Controls/MessageToast.xaml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /BiliMusic/Helpers/SystemHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Windows.Security.Cryptography; 7 | using Windows.Security.Cryptography.Core; 8 | using Windows.Storage.Streams; 9 | 10 | namespace BiliMusic.Helpers 11 | { 12 | /// 13 | /// 一些系统方法封装 14 | /// 15 | public class SystemHelper 16 | { 17 | /// 18 | /// MD5加密 19 | /// 20 | /// 21 | /// 22 | public static string ToMD5(string input) 23 | { 24 | var provider = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Md5); 25 | IBuffer buffer = CryptographicBuffer.ConvertStringToBinary(input, BinaryStringEncoding.Utf8); 26 | var hashed = provider.HashData(buffer); 27 | var result = CryptographicBuffer.EncodeToHexString(hashed); 28 | return result; 29 | } 30 | 31 | public static void SetClipboard(string text) 32 | { 33 | Windows.ApplicationModel.DataTransfer.DataPackage pack = new Windows.ApplicationModel.DataTransfer.DataPackage(); 34 | pack.SetText(text); 35 | Windows.ApplicationModel.DataTransfer.Clipboard.SetContent(pack); // 保存 DataPackage 对象到剪切板 36 | Windows.ApplicationModel.DataTransfer.Clipboard.Flush(); 37 | } 38 | 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /BiliMusic/Converters/HomeItemStyleSelector.cs: -------------------------------------------------------------------------------- 1 | using BiliMusic.Models; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Windows.UI.Xaml; 8 | using Windows.UI.Xaml.Controls; 9 | 10 | namespace BiliMusic.Converters 11 | { 12 | public class HomeItemStyleSelector : StyleSelector 13 | { 14 | protected override Style SelectStyleCore(object item, DependencyObject container) 15 | { 16 | 17 | var models = item as modulesModel; 18 | Style st = new Style(); 19 | st.TargetType = typeof(ContentPresenter); 20 | st.Setters.Add(new Setter() 21 | { 22 | Property = Grid.ColumnProperty, 23 | Value = models.column 24 | }); 25 | st.Setters.Add(new Setter() 26 | { 27 | Property = Grid.RowProperty, 28 | Value = models.row 29 | }); 30 | if (models.dataSize == 3 && models.type == 3) 31 | { 32 | st.Setters.Add(new Setter() 33 | { 34 | Property = Grid.ColumnSpanProperty, 35 | Value = 1 36 | }); 37 | } 38 | else 39 | { 40 | st.Setters.Add(new Setter() 41 | { 42 | Property = Grid.ColumnSpanProperty, 43 | Value = 2 44 | }); 45 | } 46 | return st; 47 | } 48 | 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /BiliMusic/Helpers/SettingHelper.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Toolkit.Uwp.Helpers; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace BiliMusic.Helpers 9 | { 10 | public static class SettingHelper 11 | { 12 | /// 13 | /// 用户登录信息 14 | /// 15 | public const string LoginInfo = "LoginInfo"; 16 | /// 17 | /// 音乐播放清晰度清晰度 18 | /// 19 | public const string DefaultQualities = "DefaultQualities"; 20 | /// 21 | /// 音乐下载清晰度清晰度 22 | /// 23 | public const string DefaultDownloadQualities = "DefaultDownloadQualities"; 24 | /// 25 | /// 视频播放清晰度清晰度 26 | /// 27 | public const string DefaultVideoQualities = "DefaultVideoQualities"; 28 | /// 29 | /// 应用主题,0跟随系统,1浅色,2深色 30 | /// 31 | public const string Theme = "Theme"; 32 | /// 33 | /// 加载原图 34 | /// 35 | public const string OriginalImage = "OriginalImage"; 36 | /// 37 | /// 音量 38 | /// 39 | public const string Volume = "Volume"; 40 | /// 41 | /// 播放模式 42 | /// 43 | public const string PlayMode = "PlayMode"; 44 | 45 | 46 | public static bool LoadOriginalImage { get; set; } = false; 47 | public static LocalObjectStorageHelper StorageHelper = new LocalObjectStorageHelper(); 48 | 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /BiliMusic/Views/RankPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using BiliMusic.Helpers; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Runtime.InteropServices.WindowsRuntime; 7 | using Windows.Foundation; 8 | using Windows.Foundation.Collections; 9 | using Windows.UI.Xaml; 10 | using Windows.UI.Xaml.Controls; 11 | using Windows.UI.Xaml.Controls.Primitives; 12 | using Windows.UI.Xaml.Data; 13 | using Windows.UI.Xaml.Input; 14 | using Windows.UI.Xaml.Media; 15 | using Windows.UI.Xaml.Navigation; 16 | 17 | // https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板 18 | 19 | namespace BiliMusic.Views 20 | { 21 | /// 22 | /// 可用于自身或导航至 Frame 内部的空白页。 23 | /// 24 | public sealed partial class RankPage : Page 25 | { 26 | public RankPage() 27 | { 28 | this.InitializeComponent(); 29 | this.NavigationCacheMode = NavigationCacheMode.Enabled; 30 | rank = new Modules.Ranks(); 31 | this.DataContext = rank; 32 | } 33 | Modules.Ranks rank; 34 | protected override void OnNavigatedTo(NavigationEventArgs e) 35 | { 36 | base.OnNavigatedTo(e); 37 | if (e.NavigationMode== NavigationMode.New&&rank.ranks==null) 38 | { 39 | rank.LoadRanks(); 40 | } 41 | } 42 | private void ListRank_ItemClick(object sender, ItemClickEventArgs e) 43 | { 44 | var item= e.ClickedItem as Models.RankModel; 45 | MessageCenter.SendMainFrameNavigate(typeof(SonglistPage), item.menuId); 46 | 47 | 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /BiliMusic/Models/MyCreateMenuModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.ObjectModel; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace BiliMusic.Models 9 | { 10 | public class MyCreateMenuModel 11 | { 12 | public int pageNum { get; set; } 13 | public int pageSize { get; set; } 14 | public int total { get; set; } 15 | public int size { get; set; } 16 | public int pages { get; set; } 17 | public bool isFirstPage { get; set; } 18 | public bool isLastPage { get; set; } 19 | public bool hasPreviousPage { get; set; } 20 | public bool hasNextPage { get; set; } 21 | 22 | 23 | public List list { get; set; } 24 | } 25 | public class MyCreateMenuItemModel 26 | { 27 | public int id { get; set; } 28 | public int mid { get; set; } 29 | public string title { get; set; } 30 | public int collection_id { get; set; } 31 | public string img_url { get; set; } 32 | public int menu_id { get; set; } 33 | public int is_default { get; set; } 34 | public int is_open { get; set; } 35 | public string status 36 | { 37 | get 38 | { 39 | if (is_open==1) 40 | { 41 | return "公开"; 42 | } 43 | else 44 | { 45 | return "私密"; 46 | } 47 | } 48 | } 49 | 50 | public int records_num { get; set; } 51 | public List songsid_list { get; set; } 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /BiliMusic/Models/UserModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BiliMusic.Models 8 | { 9 | public enum LoginStatus 10 | { 11 | /// 12 | /// 登录成功 13 | /// 14 | Success, 15 | /// 16 | /// 登录失败 17 | /// 18 | Fail, 19 | /// 20 | /// 登录错误 21 | /// 22 | Error, 23 | /// 24 | /// 登录需要验证码 25 | /// 26 | NeedCaptcha, 27 | /// 28 | /// 需要安全认证 29 | /// 30 | NeedValidate 31 | } 32 | /// 33 | /// V2的登录 34 | /// 35 | public class LoginV2Model 36 | { 37 | 38 | public long ts { get; set; } 39 | public int code { get; set; } 40 | public LoginDataV2Model data { get; set; } 41 | /// 42 | /// 当错误代码为2100会返回一个链接验证 43 | /// 44 | public string url { get; set; } 45 | public string message { get; set; } 46 | } 47 | public class LoginDataV2Model 48 | { 49 | 50 | public long mid { get; set; } 51 | 52 | public string access_token { get; set; } 53 | 54 | public string refresh_token { get; set; } 55 | 56 | public int expires_in { get; set; } 57 | 58 | public DateTime expires_datetime { get; set; } 59 | } 60 | 61 | public class LoginCallbackModel 62 | { 63 | public LoginStatus status { get; set; } 64 | public string message { get; set; } 65 | public string url { get; set; } 66 | } 67 | 68 | 69 | } 70 | -------------------------------------------------------------------------------- /BiliMusic/Helpers/MessageCenter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using BiliMusic.Models; 6 | using System.Threading.Tasks; 7 | using Windows.UI.Xaml; 8 | using Windows.UI.Xaml.Controls; 9 | 10 | namespace BiliMusic.Helpers 11 | { 12 | public static class MessageCenter 13 | { 14 | public delegate void MainFrameNavigateHandler(Type page,object par); 15 | public static event EventHandler Logined; 16 | public static event EventHandler Logouted; 17 | public static event MainFrameNavigateHandler MainFrameNavigatedTo; 18 | /// 19 | /// 发送登录完成事件 20 | /// 21 | public static void SendLogined(LoginDataV2Model data) 22 | { 23 | Logined?.Invoke(null, data); 24 | } 25 | /// 26 | /// 发送注销事件 27 | /// 28 | public static void SendLogout() 29 | { 30 | SettingHelper.StorageHelper.Save(SettingHelper.LoginInfo, ""); 31 | UserHelper.isLogin = false; 32 | UserHelper.access_key = ""; 33 | UserHelper.mid = 0; 34 | Logouted?.Invoke(null, null); 35 | } 36 | 37 | public static BiliMusic.Modules.MusicPlay GetMusicPlay() 38 | { 39 | return ((Window.Current.Content as Frame).Content as MainPage).musicPlay; 40 | } 41 | public static BiliMusic.Modules.Main GetMainInfo() 42 | { 43 | return ((Window.Current.Content as Frame).Content as MainPage).main; 44 | } 45 | 46 | public static void SendMainFrameNavigate(Type page, object par) 47 | { 48 | MainFrameNavigatedTo?.Invoke(page, par); 49 | } 50 | 51 | 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /opensource.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 引用及开源许可 7 | 16 | 17 | 18 |

-----------------

19 |

Windows Community Toolkit

20 |

-----------------

21 |

https://github.com/windows-toolkit/WindowsCommunityToolkit

22 |

Copyright (c) .NET Foundation and Contributors

23 |

The MIT License (MIT)

24 |

25 | 26 |

-----------------

27 |

Newtonsoft.Json

28 |

-----------------

29 |

https://github.com/JamesNK/Newtonsoft.Json

30 |

Copyright (c) 2007 James Newton-King

31 |

The MIT License (MIT)

32 |

33 | 34 |

-----------------

35 |

RestSharp

36 |

-----------------

37 |

https://github.com/restsharp/RestSharp

38 |

Licensed under the Apache License, Version 2.0 (the "License");

39 |

40 | 41 |

-----------------

42 |

waslibs

43 |

-----------------

44 |

https://github.com/wasteam/waslibs

45 |

Copyright (c) 2016 WasTeam

46 |

The MIT License (MIT)

47 |

48 | 49 |

-----------------

50 |

Microsoft.Data.SQlite

51 |

-----------------

52 |

https://asp.net

53 |

Copyright (c) .NET Foundation and Contributors

54 |

Licensed under the Apache License, Version 2.0 (the "License");

55 |

56 | 57 |

-----------------

58 |

MetroLog

59 |

-----------------

60 |

https://github.com/mbrit/MetroLog

61 |

Copyright (c) 2012 The MetroLog Team

62 |

The MIT License (MIT)

63 |

64 | 65 | -------------------------------------------------------------------------------- /BiliMusic/Package.appxmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 哔哩哔哩音乐 7 | 逍遥橙子 8 | Assets\StoreLogo.png 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /BiliMusic/Modules/Ranks.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Collections.ObjectModel; 7 | using BiliMusic.Models.Main; 8 | using Microsoft.UI.Xaml.Controls; 9 | using Windows.UI.Xaml; 10 | using System.ComponentModel; 11 | using BiliMusic.Helpers; 12 | using BiliMusic.Models; 13 | using Windows.UI.Xaml.Data; 14 | using Windows.UI; 15 | 16 | namespace BiliMusic.Modules 17 | { 18 | public class Ranks : INotifyPropertyChanged 19 | { 20 | public event PropertyChangedEventHandler PropertyChanged; 21 | 22 | private List _ranks; 23 | 24 | public List ranks 25 | { 26 | get { return _ranks; } 27 | set { _ranks = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("ranks")); } 28 | } 29 | private bool _loading = true; 30 | public bool loading 31 | { 32 | get { return _loading; } 33 | set 34 | { 35 | _loading = value; 36 | if (PropertyChanged != null) 37 | { 38 | PropertyChanged(this, new PropertyChangedEventArgs("loading")); 39 | } 40 | } 41 | } 42 | public async void LoadRanks() 43 | { 44 | try 45 | { 46 | loading = true; 47 | IHttpResults re = await Api.Ranks().Request(); 48 | 49 | if (!re.status) 50 | { 51 | Utils.ShowMessageToast(re.message); 52 | return; 53 | } 54 | var data = re.GetJson>>(); 55 | if (data.code != 0) 56 | { 57 | Utils.ShowMessageToast(data.msg + data.message); 58 | return; 59 | } 60 | ranks = data.data; 61 | } 62 | catch (Exception ex) 63 | { 64 | Utils.ShowMessageToast("加载榜单失败"); 65 | LogHelper.Log("加载榜单失败", LogType.ERROR, ex); 66 | } 67 | finally 68 | { 69 | loading = false; 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /BiliMusic/Modules/SongDetail.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Collections.ObjectModel; 7 | using BiliMusic.Models.Main; 8 | using Microsoft.UI.Xaml.Controls; 9 | using Windows.UI.Xaml; 10 | using System.ComponentModel; 11 | using BiliMusic.Helpers; 12 | using BiliMusic.Models; 13 | namespace BiliMusic.Modules 14 | { 15 | public class SongDetail : INotifyPropertyChanged 16 | { 17 | public event PropertyChangedEventHandler PropertyChanged; 18 | public int songId { get; set; } 19 | public SongDetail(int songid) 20 | { 21 | songId = songid; 22 | } 23 | private SongsDetailModel _detail; 24 | 25 | public SongsDetailModel detail 26 | { 27 | get { return _detail; } 28 | set { _detail = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("detail")); } 29 | } 30 | private bool _loading = false; 31 | public bool loading 32 | { 33 | get { return _loading; } 34 | set 35 | { 36 | _loading = value; 37 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("loading")); 38 | } 39 | } 40 | 41 | 42 | public async void LoadMusicDeatil() 43 | { 44 | try 45 | { 46 | loading = true; 47 | var re = await Api.SongDetail(songId).Request(); 48 | if (!re.status) 49 | { 50 | Utils.ShowMessageToast(re.message); 51 | return; 52 | } 53 | var data = re.GetJson>(); 54 | if (data.code != 0) 55 | { 56 | Utils.ShowMessageToast(data.msg + data.message); 57 | return; 58 | } 59 | detail = data.data; 60 | } 61 | catch (Exception ex) 62 | { 63 | 64 | Utils.ShowMessageToast("读取歌曲信息失败"); 65 | 66 | LogHelper.Log("读取歌曲信息失败" + songId, LogType.ERROR, ex); 67 | } 68 | finally 69 | { 70 | loading = false; 71 | } 72 | 73 | } 74 | 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /BiliMusic/Helpers/LogHelper.cs: -------------------------------------------------------------------------------- 1 | using NLog; 2 | using NLog.Config; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Diagnostics; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | 11 | namespace BiliMusic.Helpers 12 | { 13 | public enum LogType 14 | { 15 | INFO, 16 | DEBUG, 17 | ERROR, 18 | FATAL 19 | } 20 | public class LogHelper 21 | { 22 | public static LoggingConfiguration config; 23 | public static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); 24 | public static void Log(string message,LogType type,Exception ex=null) 25 | { 26 | if (config == null) 27 | { 28 | config = new NLog.Config.LoggingConfiguration(); 29 | Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder; 30 | var logfile = new NLog.Targets.FileTarget() { 31 | Name= "logfile", 32 | CreateDirs=true, 33 | FileName = storageFolder.Path+@"\log\" +DateTime.Now.ToString("yyyyMMdd") + ".log", 34 | Layout= "${longdate}|${level:uppercase=true}|${logger}|${threadid}|${message}|${exception:format=Message,StackTrace}" 35 | }; 36 | config.AddRule(LogLevel.Info, LogLevel.Info, logfile); 37 | config.AddRule(LogLevel.Debug, LogLevel.Debug, logfile); 38 | config.AddRule(LogLevel.Error, LogLevel.Error, logfile); 39 | config.AddRule(LogLevel.Fatal, LogLevel.Fatal, logfile); 40 | NLog.LogManager.Configuration = config; 41 | } 42 | Debug.WriteLine("["+LogType.INFO.ToString()+"]"+ message); 43 | switch (type) 44 | { 45 | case LogType.INFO: 46 | logger.Info(message); 47 | break; 48 | case LogType.DEBUG: 49 | logger.Debug(message); 50 | break; 51 | case LogType.ERROR: 52 | logger.Error(ex,message); 53 | break; 54 | case LogType.FATAL: 55 | logger.Fatal(ex,message); 56 | break; 57 | default: 58 | break; 59 | } 60 | } 61 | 62 | 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /BiliMusic/Helpers/ApiHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BiliMusic.Helpers 8 | { 9 | public class ApiHelper 10 | { 11 | private const string _mobi_app = "android"; 12 | private const string _appkey = "1d8b6e7d45233436"; 13 | private const string _appSecret = "560c52ccd288fed045859ed18bffd973"; 14 | private const string _build = "5341000"; 15 | private const string _platform = "android"; 16 | 17 | public static string GetSign(string url) 18 | { 19 | string result; 20 | string str = url.Substring(url.IndexOf("?", 4) + 1); 21 | List list = str.Split('&').ToList(); 22 | list.Sort(); 23 | StringBuilder stringBuilder = new StringBuilder(); 24 | foreach (string str1 in list) 25 | { 26 | stringBuilder.Append((stringBuilder.Length > 0 ? "&" : string.Empty)); 27 | stringBuilder.Append(str1); 28 | } 29 | stringBuilder.Append(_appSecret); 30 | result = SystemHelper.ToMD5(stringBuilder.ToString()); 31 | return "&sign="+result; 32 | } 33 | public static string GetSign(IDictionary pars) 34 | { 35 | StringBuilder sb = new StringBuilder(); 36 | foreach (var item in pars.OrderBy(x=>x.Key)) 37 | { 38 | sb.Append(item.Key); 39 | sb.Append("="); 40 | sb.Append(item.Value); 41 | sb.Append("&"); 42 | } 43 | var results = sb.ToString().TrimEnd('&'); 44 | results = results + _appSecret; 45 | return "&sign="+SystemHelper.ToMD5(results); 46 | } 47 | 48 | /// 49 | /// 一些必要的参数 50 | /// 51 | /// 是否需要accesskey 52 | /// 53 | public static string MustParameter(bool needAccesskey = false) 54 | { 55 | var url = ""; 56 | if (needAccesskey&&UserHelper.isLogin) 57 | { 58 | url = $"access_key={UserHelper.access_key}&"; 59 | } 60 | return url+$"appkey={_appkey}&build={_build}&mobi_app={_mobi_app}&platform={_platform}&ts={Utils.GetTimestampS()}"; 61 | } 62 | 63 | 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /BiliMusic/Models/SearchModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.ComponentModel; 7 | using System.Collections.ObjectModel; 8 | 9 | namespace BiliMusic.Models 10 | { 11 | public class SearchModel 12 | { 13 | public int page { get; set; } 14 | public int pagesize { get; set; } 15 | public int num_pages { get; set; } 16 | public string seid { get; set; } 17 | public string code { get; set; } 18 | public string msg { get; set; } 19 | public ObservableCollection result { get; set; } 20 | } 21 | public class SearchSongResultModel 22 | { 23 | public int review_count { get; set; } 24 | public int id { get; set; } 25 | public int play_count { get; set; } 26 | public string cover { get; set; } 27 | 28 | public string title { get; set; } 29 | 30 | public string author { get; set; } 31 | } 32 | public class SearchMenuResultModel 33 | { 34 | public int id { get; set; } 35 | public int play_count { get; set; } 36 | public int favor_count { get; set; } 37 | public int music_count { get; set; } 38 | public string cover { get; set; } 39 | private string _title; 40 | 41 | public string title 42 | { 43 | get { return _title; } 44 | set { _title = value.Replace("", "").Replace("",""); } 45 | } 46 | 47 | } 48 | 49 | public class SearchAuthorResultModel:INotifyPropertyChanged 50 | { 51 | public event PropertyChangedEventHandler PropertyChanged; 52 | public int id { get; set; } 53 | private string _uname; 54 | public string uname 55 | { 56 | get { return _uname; } 57 | set { _uname = value.Replace("", "").Replace("", ""); } 58 | } 59 | public string cover { get; set; } 60 | public int fans_count { get; set; } 61 | public int play_count { get; set; } 62 | 63 | private int _is_follow; 64 | 65 | public int is_follow 66 | { 67 | get { return _is_follow; } 68 | set { 69 | _is_follow = value; 70 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("is_follow")); 71 | } 72 | } 73 | 74 | 75 | 76 | } 77 | 78 | 79 | 80 | } 81 | -------------------------------------------------------------------------------- /privacystatement.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 隐私策略 5 | 6 | 7 |

隐私政策

8 | 9 |

本软件指 哔哩哔哩音乐UWP(第三方) 软件(以下称本软件)。

10 | 11 |

本软件重视用户隐私,本软件尊重并保护所有使用服务用户的个人隐私权。为了给您提供更准确、更有个性化的服务,本软件会按照本隐私权政策的规定使用和披露您的个人信息。

12 | 13 |

除本隐私权政策另有规定外,在未征得您事先许可的情况下,本软件不会将这些信息对外披露或向第三方提供。本软件会不时更新本隐私权政策。您在同意本软件服务使用协议之时,即视为您已经同意本隐私权政策全部内容。本隐私权政策属于本软件服务使用协议不可分割的一部分。

14 | 15 |

1. 适用范围

16 | 17 |

在您注册本软件帐号时,您根据本软件要求提供的个人注册信息;

18 | 19 |

在您使用本软件网络服务,或访问本软件平台网页时,本软件自动接收并记录的您的浏览器和计算机上的信息,包括但不限于您的IP地址、浏览器的类型、使用的语言、访问日期和时间、软硬件特征信息及您需求的网页记录等数据;

20 | 21 |

本软件通过合法途径从商业伙伴处取得的用户个人数据。 您了解并同意,以下信息不适用本隐私权政策:

22 | 23 |

您在使用本软件平台提供的搜索服务时输入的关键字信息;

24 | 25 |

本软件收集到的您在本软件发布的有关信息数据,包括但不限于参与活动、成交信息及评价详情;

26 | 27 |

违反法律规定或违反本软件规则行为及本软件已对您采取的措施。

28 | 29 |

2.信息使用

30 | 31 |

本软件不会向任何无关第三方提供、出售、出租、分享或交易您的个人信息,除非事先得到您的许可,或该第三方和本软件(含本软件关联公司)单独或共同为您提供服务,且在该服务结束后,其将被禁止访问包括其以前能够访问的所有这些资料。

32 | 33 |

本软件亦不允许任何第三方以任何手段收集、编辑、出售或者无偿传播您的个人信息。任何本软件平台用户如从事上述活动,一经发现,本软件有权立即终止与该用户的服务协议。

34 | 35 |

为服务用户的目的,本软件可能通过使用您的个人信息,向您提供您感兴趣的信息,包括但不限于向您发出产品和服务信息,或者与本软件合作伙伴共享信息以便他们向您发送有关其产品和服务的信息(后者需要您的事先同意)。

36 | 37 |

3.信息披露

38 | 39 |

在如下情况下,本软件将依据您的个人意愿或法律的规定全部或部分的披露您的个人信息:

40 | 41 |

经您事先同意,向第三方披露;

42 | 43 |

为提供您所要求的产品和服务,而必须和第三方分享您的个人信息;

44 | 45 |

根据法律的有关规定,或者行政或司法机构的要求,向第三方或者行政、司法机构披露;

46 | 47 |

如您出现违反中国有关法律、法规或者本软件服务协议或相关规则的情况,需要向第三方披露;

48 | 49 |

如您是适格的知识产权投诉人并已提起投诉,应被投诉人要求,向被投诉人披露,以便双方处理可能的权利纠纷;

50 | 51 |

在本软件平台上创建的某一交易中,如交易任何一方履行或部分履行了交易义务并提出信息披露请求的,本软件有权决定向该用户提供其交易对方的联络方式等必要信息,以促成交易的完成或纠纷的解决。

52 | 53 |

其它本软件根据法律、法规或者网站政策认为合适的披露。

54 | 55 |

4. 信息存储和交换

56 | 57 |

本软件收集的有关您的信息和资料将保存在本软件及(或)其关联公司的服务器上,这些信息和资料可能传送至您所在国家、地区或本软件收集信息和资料所在地的境外并在境外被访问、存储和展示。

58 | 59 |

5. Cookie的使用

60 | 61 |

在您未拒绝接受cookies的情况下,本软件会在您的计算机上设定或取用cookies ,以便您能登录或使用依赖于cookies的本软件平台服务或功能。本软件使用cookies可为您提供更加周到的个性化服务,包括推广服务。

62 | 63 |

您有权选择接受或拒绝接受cookies。您可以通过修改浏览器设置的方式拒绝接受cookies。但如果您选择拒绝接受cookies,则您可能无法登录或使用依赖于cookies的本软件网络服务或功能。

64 | 65 |

通过本软件所设cookies所取得的有关信息,将适用本政策。

66 | 67 |

6. 信息安全

68 | 69 |

a) 本软件帐号均有安全保护功能,请妥善保管您的用户名及密码信息。本软件将通过对用户密码进行加密等安全措施确保您的信息不丢失,不被滥用和变造。尽管有前述安全措施,但同时也请您注意在信息网络上不存在“完善的安全措施”。

70 | 71 |

b) 在使用本软件网络服务进行网上交易时,您不可避免的要向交易对方或潜在的交易对方披露自己的个人信息,如联络方式或者邮政地址。请您妥善保护自己的个人信息,仅在必要的情形下向他人提供。如您发现自己的个人信息泄密,尤其是本软件用户名及密码发生泄露,请您立即联络本软件客服,以便本软件采取相应措施。

72 | 73 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /BiliMusic/Controls/CollectionsDialog.xaml: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | · 个内容 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 歌单名称 42 | 43 | 简介 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /BiliMusic/Models/PlayModel.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Toolkit.Uwp.Helpers; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using Windows.UI.Xaml.Media; 9 | 10 | namespace BiliMusic.Models 11 | { 12 | public class PlayModel : INotifyPropertyChanged 13 | { 14 | public event PropertyChangedEventHandler PropertyChanged; 15 | public SongsDetailModel songinfo { get; set; } 16 | public int songid { get; set; } 17 | public string title { get; set; } 18 | public string pic { get; set; } 19 | public string author { get; set; } = ""; 20 | public string lyric_url { get; set; } 21 | public Uri play_url { get; set; } 22 | public List backup_url { get; set; } 23 | public bool is_preview { get; set; } 24 | public bool is_collect { get; set; } 25 | 26 | public List qualities { get; set; } 27 | 28 | public bool _select = false; 29 | public bool select 30 | { 31 | get { return _select; } 32 | set 33 | { 34 | _select = value; 35 | if (PropertyChanged != null) 36 | { 37 | DispatcherHelper.ExecuteOnUIThreadAsync(() => 38 | { 39 | PropertyChanged(this, new PropertyChangedEventArgs("select")); 40 | }); 41 | } 42 | } 43 | } 44 | 45 | public SolidColorBrush _color=(SolidColorBrush)App.Current.Resources["COLOR_Foreground"]; 46 | public SolidColorBrush color 47 | { 48 | get { return _color; } 49 | set 50 | { 51 | _color = value; 52 | if (PropertyChanged != null) 53 | { 54 | DispatcherHelper.ExecuteOnUIThreadAsync(() => 55 | { 56 | PropertyChanged(this, new PropertyChangedEventArgs("color")); 57 | }); 58 | } 59 | } 60 | } 61 | 62 | public string title_show 63 | { 64 | get { 65 | if (author=="") 66 | { 67 | return title; 68 | } 69 | return title + " - " + author; 70 | } 71 | } 72 | public string tag 73 | { 74 | get 75 | { 76 | if (is_preview) 77 | { 78 | return "[试听]"; 79 | } 80 | else 81 | { 82 | return ""; 83 | } 84 | } 85 | } 86 | 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /BiliMusic/Models/MainModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Collections.ObjectModel; 7 | 8 | namespace BiliMusic.Models.Main 9 | { 10 | public enum MenuOpenMode 11 | { 12 | /// 13 | /// /首页 14 | /// 15 | Home=0, 16 | /// 17 | /// 搜索 18 | /// 19 | Search = 1, 20 | /// 21 | /// 我的缓存 22 | /// 23 | Download=2, 24 | /// 25 | /// 本地音乐 26 | /// 27 | LoaclMusic=3, 28 | /// 29 | /// 我的收藏 30 | /// 31 | Collection=4, 32 | /// 33 | /// 关注的人 34 | /// 35 | Attention=5, 36 | /// 37 | /// 歌单 38 | /// 39 | Songlist=6, 40 | /// 41 | /// 歌曲 42 | /// 43 | Song=7, 44 | /// 45 | /// 用户 46 | /// 47 | User=8, 48 | /// 49 | /// 网页 50 | /// 51 | Webpage=9, 52 | /// 53 | /// 个人中心 54 | /// 55 | Account=10, 56 | /// 57 | /// 榜单 58 | /// 59 | Rank=11, 60 | /// 61 | /// 收音机 62 | /// 63 | Radio = 12, 64 | /// 65 | /// 登录 66 | /// 67 | Login=13, 68 | /// 69 | /// 我的收藏 70 | /// 71 | MyCollect = 14, 72 | /// 73 | /// 我的关注 74 | /// 75 | MyAttention = 15 76 | 77 | } 78 | /// 79 | /// 菜单类型 80 | /// 81 | public enum MenuType 82 | { 83 | Header, 84 | Menuitem, 85 | Separator 86 | } 87 | public class MenuModel 88 | { 89 | /// 90 | /// Icon 91 | /// 92 | public string icon { get; set; } 93 | /// 94 | /// 标题 95 | /// 96 | public string title { get; set; } 97 | /// 98 | /// 点击打开类型 99 | /// 100 | public MenuOpenMode openMode { get; set; } 101 | /// 102 | /// 参数 103 | /// 104 | public object parameters { get; set; } 105 | 106 | public object parameters2 { get; set; } 107 | 108 | /// 109 | /// 类型 110 | /// 111 | public MenuType menuType { get; set; } = MenuType.Menuitem; 112 | public string name { get; set; } = ""; 113 | } 114 | 115 | 116 | 117 | } 118 | -------------------------------------------------------------------------------- /BiliMusic/Views/RankPage.xaml: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 35 | 36 | 1. 37 | 2. 38 | 3. 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /BiliMusic/Controls/LoginDialog.xaml: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 账号 37 | 38 | 密码 39 | 40 | 41 | 验证码 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 注册账号 53 | 忘记密码 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /BiliMusic/Utils.cs: -------------------------------------------------------------------------------- 1 | using BiliMusic.Helpers; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using BiliMusic.Controls; 8 | using Windows.UI.Popups; 9 | 10 | namespace BiliMusic 11 | { 12 | public static class Utils 13 | { 14 | /// 15 | /// 发送请求,扩展方法 16 | /// 17 | /// 18 | /// 19 | public async static Task Request(this ApiModel api) 20 | { 21 | if (api.method == RestSharp.Method.GET) 22 | { 23 | return await HttpHelper.Get(api.url, api.headers, api.cookies); 24 | } 25 | else 26 | { 27 | return await HttpHelper.Post(api.url, api.body, api.headers, api.cookies); 28 | } 29 | } 30 | 31 | /// 32 | /// 默认一些请求头 33 | /// 34 | /// 35 | public static IDictionary GetDefaultHeaders() 36 | { 37 | Dictionary headers = new Dictionary(); 38 | headers.Add("user-agent", "Mozilla/5.0 BiliDroid/5.34.1 (bbcallen@gmail.com)"); 39 | headers.Add("Referer", "https://www.bilibili.com/"); 40 | return headers; 41 | } 42 | /// 43 | /// 将时间戳转为时间 44 | /// 45 | /// 46 | /// 47 | public static DateTime TimestampToDatetime(long ts) 48 | { 49 | DateTime dtStart = new DateTime(1970, 1, 1,8,0,0); 50 | long lTime = long.Parse(ts + "0000000"); 51 | TimeSpan toNow = new TimeSpan(lTime); 52 | return dtStart.Add(toNow); 53 | } 54 | /// 55 | /// 生成时间戳/秒 56 | /// 57 | /// 58 | public static long GetTimestampS() 59 | { 60 | return Convert.ToInt64((DateTime.Now - new DateTime(1970, 1, 1, 8, 0, 0, 0)).TotalSeconds); 61 | } 62 | /// 63 | /// 生成时间戳/豪秒 64 | /// 65 | /// 66 | public static long GetTimestampMS() 67 | { 68 | return Convert.ToInt64((DateTime.Now - new DateTime(1970, 1, 1, 8, 0, 0, 0)).TotalMilliseconds); 69 | } 70 | 71 | public static void ShowMessageToast(string message) 72 | { 73 | MessageToast ms = new MessageToast(message, TimeSpan.FromSeconds(2)); 74 | ms.Show(); 75 | } 76 | public static void ShowMessageToast(string message,List commands, int seconds = 15) 77 | { 78 | MessageToast ms = new MessageToast(message, TimeSpan.FromSeconds(seconds), commands); 79 | ms.Show(); 80 | } 81 | 82 | public async static Task ShowLoginDialog() 83 | { 84 | LoginDialog login = new LoginDialog(); 85 | await login.ShowAsync(); 86 | if (UserHelper.isLogin) 87 | { 88 | return true; 89 | } 90 | else 91 | { 92 | return false; 93 | } 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /BiliMusic/Models/TabDetailModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.ObjectModel; 4 | using System.ComponentModel; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using Windows.UI.Xaml; 9 | 10 | namespace BiliMusic.Models 11 | { 12 | public class TabDetailDataModel 13 | { 14 | public ObservableCollection banners { get; set; } 15 | public ObservableCollection modules { get; set; } 16 | 17 | } 18 | public class bannersModel 19 | { 20 | public int bannerId { get; set; } 21 | public string bannerTitle { get; set; } 22 | public string bannerImgUrl { get; set; } 23 | public int bannerType { get; set; } 24 | public string schema { get; set; } 25 | } 26 | public class modulesModel 27 | { 28 | /// 29 | /// 用于Grid布局行 30 | /// 31 | public int row { get; set; } 32 | /// 33 | /// 用于Grid窄布局行 34 | /// 35 | public int narrow_row { get; set; } 36 | /// 37 | /// 用于Grid布局列 38 | /// 39 | public int column { get; set; } 40 | 41 | public int id { get; set; } 42 | public string title { get; set; } 43 | public int type { get; set; } 44 | public int dataSize { get; set; } 45 | public int layout { get; set; } 46 | public string target { get; set; } 47 | public int shark { get; set; } 48 | public int time { get; set; } = 1; 49 | 50 | 51 | public bool hasMore 52 | { 53 | get 54 | { 55 | return target != ""; 56 | } 57 | } 58 | public bool hasRefresh 59 | { 60 | get 61 | { 62 | return shark == 1; 63 | } 64 | } 65 | public ObservableCollection songs { get; set; } 66 | public ObservableCollection menus { get; set; } 67 | public ObservableCollection videos { get; set; } 68 | } 69 | public class videosModel 70 | { 71 | public long aid { get; set; } 72 | public string title { get; set; } 73 | public string pic { get; set; } 74 | public long duration { get; set; } 75 | public long view { get; set; } 76 | public long reply { get; set; } 77 | public songsModel song { get; set; } 78 | 79 | public bool hasSong 80 | { 81 | get 82 | { 83 | return song!=null&&song.id!=0; 84 | } 85 | } 86 | } 87 | public class songsModel 88 | { 89 | public int id { get; set; } 90 | public string title { get; set; } 91 | public string cover_url { get; set; } 92 | public string author { get; set; } 93 | public int song_id { get; set; } 94 | public string schema { get; set; } 95 | } 96 | public class menusModel 97 | { 98 | public int menuId { get; set; } 99 | public string title { get; set; } 100 | public string coverUrl { get; set; } 101 | public string mbnames { get; set; } 102 | public int type { get; set; }//5 付费音乐,2 歌单,4 猫耳,6 合辑 103 | public long playNum { get; set; } 104 | public bool showName 105 | { 106 | get { return mbnames != ""; } 107 | 108 | } 109 | public bool isVip 110 | { 111 | get { return type == 5; } 112 | } 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /BiliMusic/Controls/MessageToast.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.Foundation; 7 | using Windows.Foundation.Collections; 8 | using Windows.UI.Xaml; 9 | using Windows.UI.Xaml.Controls; 10 | using Windows.UI.Xaml.Controls.Primitives; 11 | using Windows.UI.Xaml.Data; 12 | using Windows.UI.Xaml.Input; 13 | using Windows.UI.Xaml.Media; 14 | using Windows.UI.Xaml.Navigation; 15 | using Microsoft.Toolkit.Uwp.UI.Animations; 16 | using Windows.UI.Popups; 17 | 18 | 19 | //https://go.microsoft.com/fwlink/?LinkId=234236 上介绍了“用户控件”项模板 20 | 21 | namespace BiliMusic.Controls 22 | { 23 | public sealed partial class MessageToast : UserControl 24 | { 25 | private Popup m_Popup; 26 | 27 | private string m_TextBlockContent = ""; 28 | private TimeSpan m_ShowTime; 29 | public MessageToast() 30 | { 31 | this.InitializeComponent(); 32 | m_Popup = new Popup(); 33 | this.Width = Window.Current.Bounds.Width; 34 | this.Height = Window.Current.Bounds.Height; 35 | m_Popup.Child = this; 36 | this.Loaded += NotifyPopup_Loaded; 37 | this.Unloaded += NotifyPopup_Unloaded; 38 | } 39 | 40 | public MessageToast(string content, TimeSpan showTime) : this() 41 | { 42 | if (m_TextBlockContent == null) 43 | { 44 | m_TextBlockContent = ""; 45 | } 46 | this.m_TextBlockContent = content; 47 | this.m_ShowTime = showTime; 48 | } 49 | public MessageToast(string content, TimeSpan showTime,List commands) : this() 50 | { 51 | if (m_TextBlockContent == null) 52 | { 53 | m_TextBlockContent = ""; 54 | } 55 | this.m_TextBlockContent = content; 56 | this.m_ShowTime = showTime; 57 | foreach (var item in commands) 58 | { 59 | HyperlinkButton button = new HyperlinkButton() { 60 | Margin=new Thickness(8,0,0,0), 61 | VerticalAlignment= VerticalAlignment.Center, 62 | Content=new TextBlock() { Text=item.Label} 63 | }; 64 | button.Click += new RoutedEventHandler((sender,e)=> { 65 | item.Invoked?.Invoke(this,item); 66 | }); 67 | btns.Children.Add(button); 68 | } 69 | } 70 | 71 | 72 | public void Show() 73 | { 74 | this.m_Popup.IsOpen = true; 75 | 76 | } 77 | public async void Close() 78 | { 79 | await this.Offset(offsetX: 0, offsetY: (float)border.ActualHeight, duration: 200, delay: 0, easingType: EasingType.Default).StartAsync(); 80 | this.m_Popup.IsOpen = false; 81 | } 82 | private async void NotifyPopup_Loaded(object sender, RoutedEventArgs e) 83 | { 84 | if (m_TextBlockContent == null) 85 | { 86 | m_TextBlockContent = ""; 87 | } 88 | this.tbNotify.Text = m_TextBlockContent; 89 | Window.Current.SizeChanged += Current_SizeChanged; 90 | 91 | await this.Offset(offsetX: 0, offsetY: -72, duration: 200, delay: 0, easingType: EasingType.Default).StartAsync(); 92 | await this.Offset(offsetX: 0, offsetY: (float)border.ActualHeight, duration: 200, delay: m_ShowTime.TotalMilliseconds, easingType: EasingType.Default).StartAsync(); 93 | this.m_Popup.IsOpen = false; 94 | } 95 | 96 | 97 | private void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) 98 | { 99 | this.Width = e.Size.Width; 100 | this.Height = e.Size.Height; 101 | } 102 | 103 | private void NotifyPopup_Unloaded(object sender, RoutedEventArgs e) 104 | { 105 | Window.Current.SizeChanged -= Current_SizeChanged; 106 | } 107 | 108 | 109 | } 110 | 111 | } 112 | -------------------------------------------------------------------------------- /BiliMusic/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using BiliMusic.Helpers; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Runtime.InteropServices.WindowsRuntime; 7 | using Windows.ApplicationModel; 8 | using Windows.ApplicationModel.Activation; 9 | using Windows.Foundation; 10 | using Windows.Foundation.Collections; 11 | using Windows.UI.Xaml; 12 | using Windows.UI.Xaml.Controls; 13 | using Windows.UI.Xaml.Controls.Primitives; 14 | using Windows.UI.Xaml.Data; 15 | using Windows.UI.Xaml.Input; 16 | using Windows.UI.Xaml.Media; 17 | using Windows.UI.Xaml.Navigation; 18 | using BiliMusic.SqliteModel; 19 | using Microsoft.EntityFrameworkCore; 20 | 21 | namespace BiliMusic 22 | { 23 | /// 24 | /// 提供特定于应用程序的行为,以补充默认的应用程序类。 25 | /// 26 | sealed partial class App : Application 27 | { 28 | /// 29 | /// 初始化单一实例应用程序对象。这是执行的创作代码的第一行, 30 | /// 已执行,逻辑上等同于 main() 或 WinMain()。 31 | /// 32 | public App() 33 | { 34 | this.InitializeComponent(); 35 | this.Suspending += OnSuspending; 36 | using (var db = new BiliMusicContext()) 37 | { 38 | db.Database.Migrate(); 39 | } 40 | } 41 | 42 | /// 43 | /// 在应用程序由最终用户正常启动时进行调用。 44 | /// 将在启动应用程序以打开特定文件等情况下使用。 45 | /// 46 | /// 有关启动请求和过程的详细信息。 47 | protected override void OnLaunched(LaunchActivatedEventArgs e) 48 | { 49 | 50 | 51 | Frame rootFrame = Window.Current.Content as Frame; 52 | 53 | // 不要在窗口已包含内容时重复应用程序初始化, 54 | // 只需确保窗口处于活动状态 55 | if (rootFrame == null) 56 | { 57 | // 创建要充当导航上下文的框架,并导航到第一页 58 | rootFrame = new Frame(); 59 | 60 | rootFrame.NavigationFailed += OnNavigationFailed; 61 | 62 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) 63 | { 64 | //TODO: 从之前挂起的应用程序加载状态 65 | } 66 | switch (SettingHelper.StorageHelper.Read(SettingHelper.Theme, 1)) 67 | { 68 | case 1: 69 | rootFrame.RequestedTheme = ElementTheme.Light; 70 | break; 71 | case 2: 72 | rootFrame.RequestedTheme = ElementTheme.Dark; 73 | break; 74 | default: 75 | rootFrame.RequestedTheme = ElementTheme.Default; 76 | break; 77 | } 78 | // 将框架放在当前窗口中 79 | Window.Current.Content = rootFrame; 80 | 81 | } 82 | 83 | if (e.PrelaunchActivated == false) 84 | { 85 | if (rootFrame.Content == null) 86 | { 87 | // 当导航堆栈尚未还原时,导航到第一页, 88 | // 并通过将所需信息作为导航参数传入来配置 89 | // 参数 90 | rootFrame.Navigate(typeof(MainPage), e.Arguments); 91 | } 92 | // 确保当前窗口处于活动状态 93 | Window.Current.Activate(); 94 | } 95 | } 96 | 97 | /// 98 | /// 导航到特定页失败时调用 99 | /// 100 | ///导航失败的框架 101 | ///有关导航失败的详细信息 102 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e) 103 | { 104 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName); 105 | } 106 | 107 | /// 108 | /// 在将要挂起应用程序执行时调用。 在不知道应用程序 109 | /// 无需知道应用程序会被终止还是会恢复, 110 | /// 并让内存内容保持不变。 111 | /// 112 | /// 挂起的请求的源。 113 | /// 有关挂起请求的详细信息。 114 | private void OnSuspending(object sender, SuspendingEventArgs e) 115 | { 116 | var deferral = e.SuspendingOperation.GetDeferral(); 117 | //TODO: 保存应用程序状态并停止任何后台活动 118 | deferral.Complete(); 119 | } 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /BiliMusic/Models/SonglistDetailModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Collections.ObjectModel; 7 | using System.ComponentModel; 8 | 9 | namespace BiliMusic.Models 10 | { 11 | public class SonglistDetailModel 12 | { 13 | public menusResponesModel menusRespones { get; set; } 14 | private List _songsList; 15 | public List songsList { 16 | get { return _songsList; } 17 | set 18 | { 19 | int i = 1; 20 | value.ForEach(x => { x.index = i.ToString("00");i++; }); 21 | _songsList = value; 22 | } 23 | } 24 | public List menusTags { get; set; } 25 | 26 | } 27 | public class menusResponesModel:System.ComponentModel.INotifyPropertyChanged 28 | { 29 | public int menuId { get; set; } 30 | public string title { get; set; } 31 | public string coverUrl { get; set; } 32 | public string intro { get; set; } = ""; 33 | public int type { get; set; } 34 | public long? playNum { get; set; } = -1; 35 | public long? collectNum { get; set; } = 0; 36 | public long? commentNum { get; set; } = 0; 37 | public int? songNum { get; set; } = -1; 38 | public string toptitle { get; set; } 39 | public string face { get; set; } 40 | public string uname { get; set; } 41 | public long? uid { get; set; } = 0; 42 | public string mbnames { get; set; } = ""; 43 | 44 | private int? _collected; 45 | 46 | public int? collected 47 | { 48 | get { return _collected; } 49 | set { _collected = value; 50 | PropertyChanged?.Invoke(this,new PropertyChangedEventArgs("collected")); 51 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("showCollect")); 52 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("showCancelCollect")); 53 | } 54 | } 55 | 56 | 57 | 58 | 59 | public bool showPlayNum 60 | { 61 | get 62 | { 63 | return songNum != null && songNum != -1; 64 | } 65 | } 66 | 67 | public bool showIntro 68 | { 69 | get 70 | { 71 | return intro != ""; 72 | } 73 | } 74 | public string bg 75 | { 76 | get 77 | { 78 | return coverUrl+"@100w.jpg"; 79 | } 80 | } 81 | public bool showCreate 82 | { 83 | get { return type == 1; } 84 | } 85 | public bool showName 86 | { 87 | get { return mbnames!=null&&mbnames != ""; } 88 | } 89 | public bool showVip 90 | { 91 | get { return type == 5; } 92 | } 93 | 94 | public bool showCollect 95 | { 96 | get 97 | { 98 | return playNum!=null&&collected == 0; 99 | } 100 | } 101 | public bool showCancelCollect 102 | { 103 | get 104 | { 105 | return playNum != null && collected == 1; 106 | } 107 | } 108 | 109 | public event PropertyChangedEventHandler PropertyChanged; 110 | } 111 | public class songsListModel 112 | { 113 | public string index { get; set; } 114 | public int id { get; set; } 115 | public string title { get; set; } 116 | public string intro { get; set; } 117 | public string cover_url { get; set; } 118 | public string author { get; set; } 119 | public long duration { get; set; } 120 | 121 | /// 122 | /// 是否收费 123 | /// 124 | public int is_pay { get; set; } 125 | 126 | public bool isPay 127 | { 128 | get { return is_pay == 1; } 129 | } 130 | } 131 | public class menusTagModel 132 | { 133 | public int cateId { get; set; } 134 | public int itemId { get; set; } 135 | public string itemVal { get; set; } 136 | public int attr { get; set; } 137 | } 138 | 139 | } 140 | -------------------------------------------------------------------------------- /BiliMusic/Views/SearchPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using BiliMusic.Modules; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Runtime.InteropServices.WindowsRuntime; 7 | using Windows.Foundation; 8 | using Windows.Foundation.Collections; 9 | using Windows.UI.Xaml; 10 | using Windows.UI.Xaml.Controls; 11 | using Windows.UI.Xaml.Controls.Primitives; 12 | using Windows.UI.Xaml.Data; 13 | using Windows.UI.Xaml.Input; 14 | using Windows.UI.Xaml.Media; 15 | using Windows.UI.Xaml.Navigation; 16 | using BiliMusic.Models; 17 | using BiliMusic.Helpers; 18 | 19 | // https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板 20 | 21 | namespace BiliMusic.Views 22 | { 23 | /// 24 | /// 可用于自身或导航至 Frame 内部的空白页。 25 | /// 26 | public sealed partial class SearchPage : Page 27 | { 28 | public SearchPage() 29 | { 30 | this.InitializeComponent(); 31 | this.NavigationCacheMode = NavigationCacheMode.Enabled; 32 | } 33 | Search search; 34 | protected override void OnNavigatedTo(NavigationEventArgs e) 35 | { 36 | base.OnNavigatedTo(e); 37 | if (e.NavigationMode == NavigationMode.New) 38 | { 39 | txtSearch.Text = ""; 40 | searchInfo.Visibility = Visibility.Visible; 41 | pivotResults.Visibility = Visibility.Collapsed; 42 | search = new Search(); 43 | DataContext = search; 44 | } 45 | } 46 | private void TxtSearch_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args) 47 | { 48 | if (txtSearch.Text.Length == 0) 49 | { 50 | searchInfo.Visibility = Visibility.Visible; 51 | pivotResults.Visibility = Visibility.Collapsed; 52 | search.LoadHistory(); 53 | return; 54 | } 55 | searchInfo.Visibility = Visibility.Collapsed; 56 | pivotResults.Visibility = Visibility.Visible; 57 | search.DoSearch(txtSearch.Text); 58 | } 59 | 60 | private void BtnWord_Click(object sender, RoutedEventArgs e) 61 | { 62 | txtSearch.Text = (sender as HyperlinkButton).DataContext.ToString(); 63 | TxtSearch_QuerySubmitted(null, null); 64 | } 65 | 66 | private void BtnClearHistory_Click(object sender, RoutedEventArgs e) 67 | { 68 | search.ClearHistory(); 69 | } 70 | 71 | private void SvSongs_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e) 72 | { 73 | if (svSongs.VerticalOffset >= svSongs.ScrollableHeight - 100) 74 | { 75 | if (!search.loading) 76 | { 77 | search.SearchSongs(); 78 | } 79 | } 80 | } 81 | 82 | private void SvMenus_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e) 83 | { 84 | if (svMenus.VerticalOffset >= svMenus.ScrollableHeight - 100) 85 | { 86 | if (!search.loading) 87 | { 88 | search.SearchMenus(); 89 | } 90 | } 91 | } 92 | private void SvMusician_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e) 93 | { 94 | if (svMusician.VerticalOffset >= svMusician.ScrollableHeight - 100) 95 | { 96 | if (!search.loading) 97 | { 98 | search.SearchMusician(); 99 | } 100 | } 101 | } 102 | private void ListMenus_ItemClick(object sender, ItemClickEventArgs e) 103 | { 104 | var item = e.ClickedItem as SearchMenuResultModel; 105 | MessageCenter.SendMainFrameNavigate(typeof(SonglistPage), item.id); 106 | } 107 | 108 | private void ListSongs_ItemClick(object sender, ItemClickEventArgs e) 109 | { 110 | var item = e.ClickedItem as SearchSongResultModel; 111 | MessageCenter.SendMainFrameNavigate(typeof(SongDetailsPage), item.id); 112 | } 113 | 114 | 115 | 116 | private void ListMusicians_ItemClick(object sender, ItemClickEventArgs e) 117 | { 118 | 119 | } 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /BiliMusic/Views/SongDetailsPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using BiliMusic.Controls; 2 | using BiliMusic.Helpers; 3 | using BiliMusic.Models; 4 | using BiliMusic.Modules; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.IO; 8 | using System.Linq; 9 | using System.Runtime.InteropServices.WindowsRuntime; 10 | using Windows.Foundation; 11 | using Windows.Foundation.Collections; 12 | using Windows.UI.Xaml; 13 | using Windows.UI.Xaml.Controls; 14 | using Windows.UI.Xaml.Controls.Primitives; 15 | using Windows.UI.Xaml.Data; 16 | using Windows.UI.Xaml.Input; 17 | using Windows.UI.Xaml.Media; 18 | using Windows.UI.Xaml.Navigation; 19 | 20 | // https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板 21 | 22 | namespace BiliMusic.Views 23 | { 24 | /// 25 | /// 可用于自身或导航至 Frame 内部的空白页。 26 | /// 27 | public sealed partial class SongDetailsPage : Page 28 | { 29 | public SongDetailsPage() 30 | { 31 | this.InitializeComponent(); 32 | this.NavigationCacheMode = NavigationCacheMode.Enabled; 33 | } 34 | SongDetail songDetail; 35 | int songId = 0; 36 | protected override void OnNavigatedTo(NavigationEventArgs e) 37 | { 38 | base.OnNavigatedTo(e); 39 | if (e.NavigationMode == NavigationMode.New|| songDetail==null) 40 | { 41 | songId = Convert.ToInt32(e.Parameter); 42 | songDetail = new SongDetail(songId); 43 | this.DataContext = songDetail; 44 | songDetail.LoadMusicDeatil(); 45 | //id.Text = e.Parameter.ToString(); 46 | } 47 | } 48 | protected override void OnNavigatingFrom(NavigatingCancelEventArgs e) 49 | { 50 | if (e.SourcePageType == typeof(SongDetailsPage)) 51 | { 52 | this.NavigationCacheMode = NavigationCacheMode.Disabled; 53 | } 54 | base.OnNavigatingFrom(e); 55 | } 56 | 57 | private async void TxtIntro_Tapped(object sender, TappedRoutedEventArgs e) 58 | { 59 | ContentDialog contentDialog = new ContentDialog() { 60 | Content=new TextBlock() { 61 | Text=songDetail.detail.intro, 62 | IsTextSelectionEnabled=true, 63 | TextWrapping= TextWrapping.Wrap 64 | }, 65 | IsPrimaryButtonEnabled=true, 66 | PrimaryButtonText="关闭" 67 | }; 68 | await contentDialog.ShowAsync(); 69 | } 70 | 71 | private async void BtnCollect_Click(object sender, RoutedEventArgs e) 72 | { 73 | if (UserHelper.isLogin || await Utils.ShowLoginDialog()) 74 | { 75 | try 76 | { 77 | CollectionsDialog cd = new CollectionsDialog(songId); 78 | await cd.ShowAsync(); 79 | } 80 | catch (Exception ex) 81 | { 82 | 83 | Utils.ShowMessageToast("收藏歌曲失败"); 84 | LogHelper.Log("收藏歌曲失败", LogType.ERROR, ex); 85 | } 86 | } 87 | else 88 | { 89 | Utils.ShowMessageToast("请先登录"); 90 | } 91 | } 92 | 93 | private void BtnPlay_Click(object sender, RoutedEventArgs e) 94 | { 95 | var player = MessageCenter.GetMusicPlay(); 96 | player.AddToPlay(new PlayModel() 97 | { 98 | author = songDetail.detail.author, 99 | title = songDetail.detail.title, 100 | pic = songDetail.detail.cover_url, 101 | songid = songDetail.detail.id 102 | }); 103 | } 104 | 105 | private void BtnShare_Click(object sender, RoutedEventArgs e) 106 | { 107 | SystemHelper.SetClipboard("https://www.bilibili.com/audio/au" + songId); 108 | Utils.ShowMessageToast("已经将地址复制到剪切板"); 109 | } 110 | 111 | private void ListUps_ItemClick(object sender, ItemClickEventArgs e) 112 | { 113 | var item = e.ClickedItem as SongsMemberModel; 114 | } 115 | 116 | private void ListVideos_ItemClick(object sender, ItemClickEventArgs e) 117 | { 118 | var item = e.ClickedItem as SongsVideosModel; 119 | } 120 | 121 | private void ListHitSongs_ItemClick(object sender, ItemClickEventArgs e) 122 | { 123 | var item = e.ClickedItem as SongsAudiosModel; 124 | MessageCenter.SendMainFrameNavigate(typeof(SongDetailsPage),item.id); 125 | } 126 | 127 | private void ListMenus_ItemClick(object sender, ItemClickEventArgs e) 128 | { 129 | var item = e.ClickedItem as menusResponesModel; 130 | MessageCenter.SendMainFrameNavigate(typeof(SonglistPage), item.menuId); 131 | } 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /BiliMusic/Models/SongsDetailModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BiliMusic.Models 8 | { 9 | public class SongsDetailModel 10 | { 11 | public string index { get; set; } 12 | public int id { get; set; } 13 | public string title { get; set; } 14 | public string intro { get; set; } 15 | public string cover_url { get; set; } 16 | public string author { get; set; } 17 | public long? duration { get; set; } = 0; 18 | public long? up_mid { get; set; } 19 | public string up_name { get; set; } 20 | public string up_img { get; set; } 21 | public int up_cert_type { get; set; } 22 | public string up_cert_info { get; set; } 23 | public string lyric_url { get; set; } 24 | 25 | public long? fans { get; set; } = 0; 26 | public int isFromVideo { get; set; } 27 | public string avid { get; set; } 28 | public long? snum { get; set; } = 0; 29 | public long? reply_count { get; set; } = 0; 30 | public long? play_count { get; set; } = 0; 31 | public long? collect_count { get; set; } = 0; 32 | public long? coin_num { get; set; } = 0; 33 | /// 34 | /// 硬币最多可投数 35 | /// 36 | public int coinceiling { get; set; } 37 | 38 | public int is_collect { get; set; } 39 | public bool _is_collect { get { return is_collect == 1; } } 40 | public int up_is_follow { get; set; } 41 | public bool _up_is_follow { get { return up_is_follow == 1; } } 42 | public bool _showfollow { get { return up_is_follow == 0; } } 43 | 44 | 45 | /// 46 | /// 是否可以缓存 47 | /// 48 | public bool is_cacheable { get; set; } 49 | /// 50 | /// 是否收费 51 | /// 52 | public int is_pay { get; set; } 53 | 54 | public bool isPay 55 | { 56 | get { return up_name == "付费音乐"; } 57 | } 58 | 59 | public bool showName 60 | { 61 | get { return up_name != "付费音乐"; } 62 | } 63 | 64 | public List qualities { get; set; } 65 | /// 66 | /// 歌单推荐 67 | /// 68 | public List menusRespones { get; set; } 69 | public List videos { get; set; } 70 | public List up_hit_audios { get; set; } 71 | public List memberList { get; set; } 72 | public bool showMenusRespones 73 | { 74 | get 75 | { 76 | return menusRespones != null && menusRespones.Count != 0; 77 | } 78 | } 79 | public bool showVideos 80 | { 81 | get 82 | { 83 | return videos != null && videos.Count != 0; 84 | } 85 | } 86 | public bool showUp_hit_audios 87 | { 88 | get 89 | { 90 | return up_hit_audios != null && up_hit_audios.Count != 0; 91 | } 92 | } 93 | public bool showMemberList 94 | { 95 | get 96 | { 97 | return memberList != null && memberList.Count != 0; 98 | } 99 | } 100 | } 101 | public class SongsMemberModel 102 | { 103 | public string face { get; set; } 104 | public string name { get; set; } 105 | public long mid { get; set; } 106 | public List m_type_info { get; set; } 107 | public string info 108 | { 109 | get 110 | { 111 | StringBuilder sb = new StringBuilder(); 112 | foreach (var item in m_type_info) 113 | { 114 | sb.Append(item); 115 | sb.Append("、"); 116 | } 117 | return sb.ToString().TrimEnd('、'); 118 | } 119 | } 120 | } 121 | public class SongsVideosModel 122 | { 123 | public int aid { get; set; } 124 | public string title { get; set; } 125 | public string ptitle { get; set; } 126 | public string pic { get; set; } 127 | public long view { get; set; } 128 | public long reply { get; set; } 129 | } 130 | public class SongsAudiosModel 131 | { 132 | public int id { get; set; } 133 | public string title { get; set; } 134 | public string cover { get; set; } 135 | public string uname { get; set; } 136 | } 137 | public class SongsVideoModel 138 | { 139 | public long aid { get; set; } 140 | public string title { get; set; } 141 | public string ptitle { get; set; } 142 | public string pic { get; set; } 143 | public long duration { get; set; } 144 | public long view { get; set; } 145 | public long reply { get; set; } 146 | 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | _pkginfo.txt 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.jfm 193 | *.pfx 194 | *.publishsettings 195 | node_modules/ 196 | orleans.codegen.cs 197 | 198 | # Since there are multiple workflows, uncomment next line to ignore bower_components 199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 200 | #bower_components/ 201 | 202 | # RIA/Silverlight projects 203 | Generated_Code/ 204 | 205 | # Backup & report files from converting an old project file 206 | # to a newer Visual Studio version. Backup files are not needed, 207 | # because we have git ;-) 208 | _UpgradeReport_Files/ 209 | Backup*/ 210 | UpgradeLog*.XML 211 | UpgradeLog*.htm 212 | 213 | # SQL Server files 214 | *.mdf 215 | *.ldf 216 | 217 | # Business Intelligence projects 218 | *.rdl.data 219 | *.bim.layout 220 | *.bim_*.settings 221 | 222 | # Microsoft Fakes 223 | FakesAssemblies/ 224 | 225 | # GhostDoc plugin setting file 226 | *.GhostDoc.xml 227 | 228 | # Node.js Tools for Visual Studio 229 | .ntvs_analysis.dat 230 | 231 | # Visual Studio 6 build log 232 | *.plg 233 | 234 | # Visual Studio 6 workspace options file 235 | *.opt 236 | 237 | # Visual Studio LightSwitch build output 238 | **/*.HTMLClient/GeneratedArtifacts 239 | **/*.DesktopClient/GeneratedArtifacts 240 | **/*.DesktopClient/ModelManifest.xml 241 | **/*.Server/GeneratedArtifacts 242 | **/*.Server/ModelManifest.xml 243 | _Pvt_Extensions 244 | 245 | # Paket dependency manager 246 | .paket/paket.exe 247 | paket-files/ 248 | 249 | # FAKE - F# Make 250 | .fake/ 251 | 252 | # JetBrains Rider 253 | .idea/ 254 | *.sln.iml 255 | 256 | # CodeRush 257 | .cr/ 258 | 259 | # Python Tools for Visual Studio (PTVS) 260 | __pycache__/ 261 | *.pyc -------------------------------------------------------------------------------- /BiliMusic/Views/HomePage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.Foundation; 7 | using Windows.Foundation.Collections; 8 | using Windows.UI.Xaml; 9 | using Windows.UI.Xaml.Controls; 10 | using Windows.UI.Xaml.Controls.Primitives; 11 | using Windows.UI.Xaml.Data; 12 | using Windows.UI.Xaml.Input; 13 | using Windows.UI.Xaml.Media; 14 | using Windows.UI.Xaml.Navigation; 15 | using BiliMusic.Models; 16 | using BiliMusic.Modules; 17 | using Microsoft.Toolkit.Uwp.UI.Controls; 18 | using Windows.System; 19 | using Windows.Media.Playback; 20 | using Windows.Media.Core; 21 | using BiliMusic.Helpers; 22 | 23 | // https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板 24 | 25 | namespace BiliMusic.Views 26 | { 27 | /// 28 | /// 可用于自身或导航至 Frame 内部的空白页。 29 | /// 30 | public sealed partial class HomePage : Page 31 | { 32 | int tab_id = 0; 33 | public HomePage() 34 | { 35 | this.InitializeComponent(); 36 | this.NavigationCacheMode = NavigationCacheMode.Enabled; 37 | homeItemDataTemplateSelector.resource = this.Resources; 38 | } 39 | TabDetail tabDetail; 40 | protected override void OnNavigatedTo(NavigationEventArgs e) 41 | { 42 | base.OnNavigatedTo(e); 43 | if (e.NavigationMode == NavigationMode.New || tabDetail == null) 44 | { 45 | tab_id = Convert.ToInt32(e.Parameter); 46 | tabDetail = new TabDetail(tab_id); 47 | this.DataContext = tabDetail; 48 | tabDetail.LoadData(); 49 | } 50 | 51 | } 52 | protected override void OnNavigatingFrom(NavigatingCancelEventArgs e) 53 | { 54 | if (e.SourcePageType == typeof(HomePage)) 55 | { 56 | this.NavigationCacheMode = NavigationCacheMode.Disabled; 57 | } 58 | base.OnNavigatingFrom(e); 59 | } 60 | private async void Banner_Tapped(object sender, TappedRoutedEventArgs e) 61 | { 62 | var data = (sender as ImageEx).DataContext as bannersModel; 63 | 64 | if (data.schema.Contains("bilibili://")) 65 | { 66 | await Windows.System.Launcher.LaunchUriAsync(new Uri(data.schema)); 67 | } 68 | else 69 | { 70 | this.Frame.Navigate(typeof(WebPage), data.schema); 71 | } 72 | 73 | 74 | 75 | //await Launcher.LaunchUriAsync(new Uri(data.schema)); 76 | } 77 | 78 | private void SongMenu_ItemClick(object sender, ItemClickEventArgs e) 79 | { 80 | var data = e.ClickedItem as menusModel; 81 | this.Frame.Navigate(typeof(SonglistPage), data.menuId); 82 | } 83 | 84 | private void Refresh_Click(object sender, RoutedEventArgs e) 85 | { 86 | tabDetail.RefreshModule((sender as Button).DataContext as modulesModel); 87 | } 88 | 89 | 90 | private void LsRecommend_ItemClick(object sender, ItemClickEventArgs e) 91 | { 92 | var item = e.ClickedItem as songsModel; 93 | var player = MessageCenter.GetMusicPlay(); 94 | player.AddToPlay(new PlayModel() 95 | { 96 | author = item.author, 97 | title = item.title, 98 | pic = item.cover_url, 99 | songid = item.id 100 | }); 101 | } 102 | 103 | private void BtnShowMoreRecommend_Click(object sender, RoutedEventArgs e) 104 | { 105 | var data = (sender as Button).DataContext as modulesModel; 106 | this.Frame.Navigate(typeof(SonglistPage),new object[] { data.id,"Recommend" }); 107 | } 108 | 109 | private async void BtnPlayAll_Click(object sender, RoutedEventArgs e) 110 | { 111 | tabDetail.loading = true; 112 | 113 | try 114 | { 115 | var player = MessageCenter.GetMusicPlay(); 116 | var module = (sender as Button).DataContext as modulesModel; 117 | 118 | var re = await Api.RecommendDetail(module.id).Request(); 119 | if (!re.status) 120 | { 121 | Utils.ShowMessageToast(re.message); 122 | return; 123 | } 124 | var data = re.GetJson>(); 125 | if (data.code != 0) 126 | { 127 | Utils.ShowMessageToast(data.msg + data.message); 128 | return; 129 | } 130 | List ls = new List(); 131 | foreach (var item in data.data.songsList) 132 | { 133 | ls.Add(new PlayModel() 134 | { 135 | author = item.author, 136 | title = item.title, 137 | pic = item.cover_url, 138 | songid = item.id 139 | }); 140 | } 141 | player.ReplacePlayList(ls); 142 | } 143 | catch (Exception ex) 144 | { 145 | Utils.ShowMessageToast("播放全部推荐歌曲失败"); 146 | LogHelper.Log("首页播放全部推荐歌曲失败", LogType.ERROR, ex); 147 | } 148 | finally 149 | { 150 | tabDetail.loading = false; 151 | } 152 | 153 | 154 | } 155 | } 156 | } 157 | -------------------------------------------------------------------------------- /BiliMusic/Views/SettingPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using BiliMusic.Helpers; 2 | using Microsoft.Toolkit.Uwp.Helpers; 3 | using Microsoft.Toolkit.Uwp.UI; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices.WindowsRuntime; 9 | using System.Threading.Tasks; 10 | using Windows.Foundation; 11 | using Windows.Foundation.Collections; 12 | using Windows.Storage; 13 | using Windows.UI.Xaml; 14 | using Windows.UI.Xaml.Controls; 15 | using Windows.UI.Xaml.Controls.Primitives; 16 | using Windows.UI.Xaml.Data; 17 | using Windows.UI.Xaml.Input; 18 | using Windows.UI.Xaml.Media; 19 | using Windows.UI.Xaml.Navigation; 20 | 21 | // https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板 22 | 23 | namespace BiliMusic.Views 24 | { 25 | /// 26 | /// 可用于自身或导航至 Frame 内部的空白页。 27 | /// 28 | public sealed partial class SettingPage : Page 29 | { 30 | public SettingPage() 31 | { 32 | this.InitializeComponent(); 33 | } 34 | protected override void OnNavigatedTo(NavigationEventArgs e) 35 | { 36 | base.OnNavigatedTo(e); 37 | LoadSetting(); 38 | } 39 | private void LoadSetting() 40 | { 41 | 42 | //读取主题 43 | var theme = SettingHelper.StorageHelper.Read(SettingHelper.Theme, 0); 44 | foreach (RadioButton item in stTheme.Children) 45 | { 46 | if (item.Tag.Equals(theme.ToString())) 47 | { 48 | item.IsChecked = true; 49 | } 50 | item.Checked += Theme_Checked; 51 | } 52 | //读取默认播放清晰度 53 | var defaultQualities = SettingHelper.StorageHelper.Read(SettingHelper.DefaultQualities, 2); 54 | foreach (RadioButton item in stDefaultQualities.Children) 55 | { 56 | if (item.Tag.Equals(defaultQualities.ToString())) 57 | { 58 | item.IsChecked = true; 59 | } 60 | item.Checked += Radio_Checked; 61 | } 62 | 63 | //读取默认播放清晰度 64 | var defaultDownloadQualities = SettingHelper.StorageHelper.Read(SettingHelper.DefaultDownloadQualities, 2); 65 | foreach (RadioButton item in stDownloadQualities.Children) 66 | { 67 | if (item.Tag.Equals(defaultDownloadQualities.ToString())) 68 | { 69 | item.IsChecked = true; 70 | } 71 | item.Checked += Radio_Checked; 72 | } 73 | 74 | 75 | switchOriginal.IsOn= SettingHelper.StorageHelper.Read(SettingHelper.OriginalImage,false); 76 | var version = SystemInformation.ApplicationVersion; 77 | Version.Text = $"{version.Major}.{version.Minor}.{version.Build}.{version.Revision}"; 78 | 79 | GetCacheSize(); 80 | } 81 | 82 | private void Radio_Checked(object sender, RoutedEventArgs e) 83 | { 84 | var rd = sender as RadioButton; 85 | SettingHelper.StorageHelper.Save(rd.GroupName,Convert.ToInt32(rd.Tag)); 86 | } 87 | 88 | private async void GetCacheSize() 89 | { 90 | try 91 | { 92 | var storageFolder = ApplicationData.Current.TemporaryFolder; 93 | storageFolder = await storageFolder.GetFolderAsync("ImageCache"); 94 | if (storageFolder != null) 95 | { 96 | var fileSizeTasks = (await storageFolder.GetFilesAsync()).Select(async file => (await file.GetBasicPropertiesAsync()).Size); 97 | var sizes = await Task.WhenAll(fileSizeTasks); 98 | var folderSize = sizes.Sum(l => (long)l); 99 | var size = (folderSize / (double)1024 / 1024).ToString("0.00"); 100 | txt_cache.Text = "清除缓存(" + size + "M)"; 101 | } 102 | } 103 | catch (Exception ex) 104 | { 105 | LogHelper.Log("读取缓存大小失败了", LogType.ERROR, ex); 106 | } 107 | } 108 | private async void BtnClearCache_Click(object sender, RoutedEventArgs e) 109 | { 110 | btnClearCache.IsEnabled = false; 111 | txt_cache.Text = "清除中..."; 112 | await ImageCache.Instance.ClearAsync(); 113 | Utils.ShowMessageToast("清理完成"); 114 | btnClearCache.IsEnabled = true; 115 | txt_cache.Text = "清除缓存"; 116 | } 117 | 118 | private void Theme_Checked(object sender, RoutedEventArgs e) 119 | { 120 | var rd = sender as RadioButton; 121 | var theme = Convert.ToInt32(rd.Tag); 122 | SettingHelper.StorageHelper.Save(rd.GroupName, theme); 123 | Frame rootFrame = Window.Current.Content as Frame; 124 | switch (theme) 125 | { 126 | case 1: 127 | rootFrame.RequestedTheme = ElementTheme.Light; 128 | break; 129 | case 2: 130 | rootFrame.RequestedTheme = ElementTheme.Dark; 131 | break; 132 | default: 133 | rootFrame.RequestedTheme = ElementTheme.Default; 134 | break; 135 | } 136 | } 137 | 138 | 139 | private void SwitchOriginal_Toggled(object sender, RoutedEventArgs e) 140 | { 141 | SettingHelper.LoadOriginalImage = switchOriginal.IsOn; 142 | SettingHelper.StorageHelper.Save(SettingHelper.OriginalImage, switchOriginal.IsOn); 143 | } 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /BiliMusic/Controls/CollectionsDialog.xaml.cs: -------------------------------------------------------------------------------- 1 | using BiliMusic.Helpers; 2 | using BiliMusic.Models; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.IO; 6 | using System.Linq; 7 | using System.Runtime.InteropServices.WindowsRuntime; 8 | using Windows.Foundation; 9 | using Windows.Foundation.Collections; 10 | using Windows.UI.Xaml; 11 | using Windows.UI.Xaml.Controls; 12 | using Windows.UI.Xaml.Controls.Primitives; 13 | using Windows.UI.Xaml.Data; 14 | using Windows.UI.Xaml.Input; 15 | using Windows.UI.Xaml.Media; 16 | using Windows.UI.Xaml.Navigation; 17 | 18 | // https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“内容对话框”项模板 19 | 20 | namespace BiliMusic.Controls 21 | { 22 | public sealed partial class CollectionsDialog : ContentDialog 23 | { 24 | int songId = 0; 25 | List songIds = null; 26 | public CollectionsDialog(int _songId) 27 | { 28 | this.InitializeComponent(); 29 | songId = _songId; 30 | LoadCollections(); 31 | } 32 | public CollectionsDialog(List _songIds) 33 | { 34 | this.InitializeComponent(); 35 | songIds = _songIds; 36 | LoadCollections(); 37 | 38 | } 39 | private async void LoadCollections() 40 | { 41 | try 42 | { 43 | var re = await Api.MyCreate().Request(); 44 | if (!re.status) 45 | { 46 | Utils.ShowMessageToast(re.message); 47 | return; 48 | } 49 | var data = re.GetJson>(); 50 | if (data.code != 0) 51 | { 52 | Utils.ShowMessageToast(data.msg + data.message); 53 | } 54 | list.ItemsSource = data.data.list; 55 | if (songId != 0) 56 | { 57 | foreach (var item in data.data.list.Where(x => x.songsid_list.Contains(songId))) 58 | { 59 | list.SelectedItems.Add(item); 60 | } 61 | } 62 | 63 | } 64 | catch (Exception ex) 65 | { 66 | Utils.ShowMessageToast("读取创建的歌单失败"); 67 | LogHelper.Log("读取创建的歌单失败", LogType.ERROR, ex); 68 | } 69 | 70 | } 71 | private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) 72 | { 73 | if (PrimaryButtonText == "收藏") 74 | { 75 | Collction(); 76 | } 77 | else 78 | { 79 | args.Cancel = true; 80 | if (txtTitle.Text.Length == 0) 81 | { 82 | Utils.ShowMessageToast("必须输入标题"); 83 | return; 84 | } 85 | Create(); 86 | } 87 | } 88 | private async void Collction() 89 | { 90 | try 91 | { 92 | List menus = new List(); 93 | foreach (MyCreateMenuItemModel item in list.SelectedItems) 94 | { 95 | menus.Add(item.id); 96 | } 97 | IHttpResults re = null; 98 | if (songId != 0) 99 | { 100 | re = await Api.CollectSong(songId, menus).Request(); 101 | } 102 | else 103 | { 104 | re = await Api.CollectSong(songIds, menus).Request(); 105 | } 106 | if (!re.status) 107 | { 108 | Utils.ShowMessageToast(re.message); 109 | return; 110 | } 111 | var data = re.GetJson>(); 112 | if (data.code != 0) 113 | { 114 | Utils.ShowMessageToast(data.msg + data.message); 115 | return; 116 | } 117 | Utils.ShowMessageToast("操作完成"); 118 | 119 | } 120 | catch (Exception ex) 121 | { 122 | Utils.ShowMessageToast("收藏歌曲失败"); 123 | LogHelper.Log("收藏歌曲失败", LogType.ERROR, ex); 124 | } 125 | 126 | 127 | } 128 | private async void Create() 129 | { 130 | try 131 | { 132 | var re = await Api.CreateCollection(txtTitle.Text, txtDesc.Text, swOpen.IsOn).Request(); 133 | if (!re.status) 134 | { 135 | Utils.ShowMessageToast(re.message); 136 | return; 137 | } 138 | var data = re.GetJson>(); 139 | if (data.code != 0) 140 | { 141 | Utils.ShowMessageToast(data.msg + data.message); 142 | return; 143 | } 144 | Utils.ShowMessageToast("创建歌单成功"); 145 | MessageCenter.GetMainInfo().Logined(); 146 | pivot.SelectedIndex = 0; 147 | LoadCollections(); 148 | } 149 | catch (Exception ex) 150 | { 151 | 152 | Utils.ShowMessageToast("创建歌单失败"); 153 | LogHelper.Log("创建歌单失败", LogType.ERROR, ex); 154 | } 155 | } 156 | 157 | private void ContentDialog_SecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) 158 | { 159 | } 160 | 161 | 162 | private void Pivot_SelectionChanged(object sender, SelectionChangedEventArgs e) 163 | { 164 | if (pivot.SelectedIndex == 0) 165 | { 166 | this.PrimaryButtonText = "收藏"; 167 | } 168 | else 169 | { 170 | this.PrimaryButtonText = "创建"; 171 | } 172 | } 173 | } 174 | } 175 | -------------------------------------------------------------------------------- /BiliMusic/Modules/TabDetail.cs: -------------------------------------------------------------------------------- 1 | using BiliMusic.Models; 2 | using BiliMusic.Helpers; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.ComponentModel; 9 | using System.Collections.ObjectModel; 10 | 11 | namespace BiliMusic.Modules 12 | { 13 | public class TabDetail : INotifyPropertyChanged 14 | { 15 | 16 | public int tab_id { get; set; } 17 | private TabDetailDataModel _Datas; 18 | public TabDetailDataModel Datas { 19 | get { return _Datas; } 20 | set 21 | { 22 | _Datas = value; 23 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Datas")); 24 | } 25 | } 26 | 27 | private ObservableCollection _banners; 28 | public ObservableCollection banners 29 | { 30 | get { return _banners; } 31 | set { _banners = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("banners")); } 32 | } 33 | 34 | private ObservableCollection _modules; 35 | public ObservableCollection modules 36 | { 37 | get { return _modules; } 38 | set { _modules = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("modules")); } 39 | } 40 | 41 | //public ObservableCollection modules { get; set; } 42 | 43 | 44 | private bool _loading=true; 45 | public bool loading 46 | { 47 | get { return _loading; } 48 | set 49 | { 50 | _loading = value; 51 | if (PropertyChanged != null) 52 | { 53 | PropertyChanged(this, new PropertyChangedEventArgs("loading")); 54 | } 55 | } 56 | } 57 | 58 | public TabDetail(int id) 59 | { 60 | tab_id = id; 61 | } 62 | 63 | public event PropertyChangedEventHandler PropertyChanged; 64 | 65 | public async void LoadData() 66 | { 67 | try 68 | { 69 | loading = true; 70 | var re = await Api.TabDetail(tab_id).Request(); 71 | if (!re.status) 72 | { 73 | Utils.ShowMessageToast(re.message); 74 | return; 75 | } 76 | var data = re.GetJson>(); 77 | if (data.code != 0) 78 | { 79 | Utils.ShowMessageToast(data.msg + data.message); 80 | return; 81 | } 82 | var ls = data.data.modules.Where(x => x.type == 2 || x.type == 3 || x.type == 4).ToList(); 83 | var d = ls.Where(x => x.type == 3 && x.dataSize == 3).ToList(); 84 | ls.RemoveAll(x => x.type == 3 && x.dataSize == 3); 85 | 86 | //布局用得是Grid,设置一下行列 87 | int row = 0; 88 | //数据超过了4列默认占一行 89 | foreach (var item in ls) 90 | { 91 | item.row = row; 92 | item.column = 0; 93 | item.narrow_row = row; 94 | row++; 95 | } 96 | //数据只有3列默认两组占一行 97 | var i = 0; 98 | var c_row = row; 99 | foreach (var item in d) 100 | { 101 | i++; 102 | item.row = c_row; 103 | item.narrow_row = row; 104 | item.column = i - 1; 105 | if (i%2==0) 106 | { 107 | c_row++; 108 | i = 0; 109 | } 110 | row++; 111 | } 112 | ls.InsertRange(ls.Count, d); 113 | ObservableCollection _modules = new ObservableCollection(); 114 | foreach (var item in ls) 115 | { 116 | _modules.Add(item); 117 | } 118 | //data.data.modules =ls; 119 | modules = _modules; 120 | banners = data.data.banners; 121 | //Datas = data.data; 122 | } 123 | catch (Exception ex) 124 | { 125 | Utils.ShowMessageToast("读取首页信息失败"); 126 | LogHelper.Log("读取首页信息失败TABID:"+ tab_id, LogType.ERROR, ex); 127 | } 128 | finally 129 | { 130 | loading = false; 131 | } 132 | } 133 | 134 | 135 | public async void RefreshModule(modulesModel item) 136 | { 137 | try 138 | { 139 | loading = true; 140 | var re = await Api.RefreshModule(item.id,item.time).Request(); 141 | if (!re.status) 142 | { 143 | Utils.ShowMessageToast(re.message); 144 | return; 145 | } 146 | var data = re.GetJson>(); 147 | if (data.code != 0) 148 | { 149 | Utils.ShowMessageToast(data.msg + data.message); 150 | return; 151 | } 152 | data.data.time = item.time + 1; 153 | data.data.column = item.column; 154 | data.data.row = item.row; 155 | data.data.narrow_row = item.narrow_row; 156 | modules[modules.IndexOf(item)] = data.data; 157 | } 158 | catch (Exception ex) 159 | { 160 | Utils.ShowMessageToast("刷新信息失败"); 161 | LogHelper.Log("刷新信息失败", LogType.ERROR, ex); 162 | } 163 | finally 164 | { 165 | loading = false; 166 | } 167 | } 168 | 169 | } 170 | } 171 | -------------------------------------------------------------------------------- /BiliMusic/Modules/Account.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices.WindowsRuntime; 5 | using System.Text; 6 | using System.Text.RegularExpressions; 7 | using System.Threading.Tasks; 8 | using Windows.Security.Cryptography.Core; 9 | using Windows.Storage.Streams; 10 | using Windows.Web.Http.Filters; 11 | using Microsoft.Toolkit.Uwp.Helpers; 12 | using BiliMusic.Models; 13 | using BiliMusic.Helpers; 14 | 15 | namespace BiliMusic.Modules 16 | { 17 | public class Account 18 | { 19 | 20 | private async Task EncryptedPassword(string passWord) 21 | { 22 | string base64String; 23 | try 24 | { 25 | HttpBaseProtocolFilter httpBaseProtocolFilter = new HttpBaseProtocolFilter(); 26 | httpBaseProtocolFilter.IgnorableServerCertificateErrors.Add(Windows.Security.Cryptography.Certificates.ChainValidationResult.Expired); 27 | httpBaseProtocolFilter.IgnorableServerCertificateErrors.Add(Windows.Security.Cryptography.Certificates.ChainValidationResult.Untrusted); 28 | var jObjects = (await Api.GetKey().Request()).GetJObject(); 29 | string str = jObjects["data"]["hash"].ToString(); 30 | string str1 = jObjects["data"]["key"].ToString(); 31 | string str2 = string.Concat(str, passWord); 32 | string str3 = Regex.Match(str1, "BEGIN PUBLIC KEY-----(?[\\s\\S]+)-----END PUBLIC KEY").Groups["key"].Value.Trim(); 33 | byte[] numArray = Convert.FromBase64String(str3); 34 | AsymmetricKeyAlgorithmProvider asymmetricKeyAlgorithmProvider = AsymmetricKeyAlgorithmProvider.OpenAlgorithm(AsymmetricAlgorithmNames.RsaPkcs1); 35 | CryptographicKey cryptographicKey = asymmetricKeyAlgorithmProvider.ImportPublicKey(WindowsRuntimeBufferExtensions.AsBuffer(numArray), 0); 36 | IBuffer buffer = CryptographicEngine.Encrypt(cryptographicKey, WindowsRuntimeBufferExtensions.AsBuffer(Encoding.UTF8.GetBytes(str2)), null); 37 | base64String = Convert.ToBase64String(WindowsRuntimeBufferExtensions.ToArray(buffer)); 38 | } 39 | catch (Exception) 40 | { 41 | base64String = passWord; 42 | } 43 | return base64String; 44 | } 45 | 46 | /// 47 | /// 登录V2 48 | /// 49 | /// 50 | public async Task LoginV2(string username, string password, string captcha = "") 51 | { 52 | try 53 | { 54 | 55 | var results = await Api.LoginV2(username,await EncryptedPassword(password), captcha).Request(); 56 | var m = results.GetJson(); 57 | if (m.code == 0) 58 | { 59 | m.data.expires_datetime = Utils.TimestampToDatetime(m.ts).AddSeconds(m.data.expires_in); 60 | //设置登录状态 61 | UserHelper.isLogin = true; 62 | UserHelper.access_key = m.data.access_token; 63 | UserHelper.mid = m.data.mid; 64 | //保持登录信息 65 | 66 | SettingHelper.StorageHelper.Save(SettingHelper.LoginInfo, m.data); 67 | //执行SSO 68 | await Api.SSO(m.data.access_token).Request(); 69 | //发送登录成功事件 70 | MessageCenter.SendLogined(m.data); 71 | 72 | return new LoginCallbackModel() 73 | { 74 | status = LoginStatus.Success, 75 | message = "登录成功" 76 | }; 77 | } 78 | else if (m.code == -2100) 79 | { 80 | return new LoginCallbackModel() 81 | { 82 | status = LoginStatus.NeedValidate, 83 | url = m.url, 84 | message = "登录需要验证" 85 | }; 86 | } 87 | else if (m.code == -105) 88 | { 89 | return new LoginCallbackModel() 90 | { 91 | status = LoginStatus.NeedCaptcha, 92 | message = "登录需要验证码" 93 | }; 94 | } 95 | else 96 | { 97 | return new LoginCallbackModel() 98 | { 99 | status = LoginStatus.Fail, 100 | message = m.message 101 | }; 102 | } 103 | } 104 | catch (Exception ex) 105 | { 106 | LogHelper.Log("登录错误", LogType.ERROR, ex); 107 | return new LoginCallbackModel() 108 | { 109 | status = LoginStatus.Error, 110 | message = "登录出现小问题,请重试" 111 | }; 112 | } 113 | } 114 | 115 | /// 116 | /// 安全验证后保存状态 117 | /// 118 | /// 119 | /// 120 | /// 121 | /// 122 | /// 123 | public async Task SaveLogin(string access_key, string refresh_token, int expires, long userid) 124 | { 125 | try 126 | { 127 | //设置登录状态 128 | UserHelper.isLogin = true; 129 | UserHelper.access_key = access_key; 130 | UserHelper.mid = userid; 131 | var data = new LoginDataV2Model() 132 | { 133 | access_token= access_key, 134 | expires_datetime=DateTime.Now.AddSeconds(expires), 135 | expires_in= expires, 136 | mid= userid, 137 | refresh_token= refresh_token 138 | }; 139 | //保持登录信息 140 | SettingHelper.StorageHelper.Save(SettingHelper.LoginInfo, data); 141 | //执行SSO 142 | await Api.SSO(access_key).Request(); 143 | //} 144 | MessageCenter.SendLogined(data); 145 | return true; 146 | 147 | } 148 | catch (Exception ex) 149 | { 150 | LogHelper.Log("安全验证后设置保存信息失败", LogType.ERROR, ex); 151 | return false; 152 | } 153 | } 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /BiliMusic/Modules/SongFlyoutMenu.cs: -------------------------------------------------------------------------------- 1 | using BiliMusic.Controls; 2 | using BiliMusic.Helpers; 3 | using BiliMusic.Models; 4 | using BiliMusic.Views; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using Windows.UI.Xaml; 11 | using Windows.UI.Xaml.Controls; 12 | 13 | 14 | namespace BiliMusic.Modules 15 | { 16 | public class SongFlyoutMenu 17 | { 18 | public MenuFlyout menuFlyout { get; set; } 19 | private Main main; 20 | public SongFlyoutMenu(Main m) 21 | { 22 | main = m; 23 | menuFlyout = (App.Current.Resources["song_menu"] as MenuFlyout); 24 | main.MyCreateUpdated += Main_MyCreateUpdated; 25 | SetMenu(); 26 | } 27 | 28 | private void Main_MyCreateUpdated(object sender, System.Collections.ObjectModel.ObservableCollection e) 29 | { 30 | SetMenu(); 31 | } 32 | 33 | public void SetMenu() 34 | { 35 | 36 | foreach (var item in menuFlyout.Items) 37 | { 38 | switch (item.Name) 39 | { 40 | case "menuPlay": 41 | (item as MenuFlyoutItem).Click -= MenuPlay_Click; 42 | (item as MenuFlyoutItem).Click += MenuPlay_Click; 43 | break; 44 | case "menuAdd": 45 | (item as MenuFlyoutItem).Click -= MenuAdd_Click; 46 | (item as MenuFlyoutItem).Click += MenuAdd_Click; 47 | break; 48 | case "menuDown": 49 | (item as MenuFlyoutItem).Click -= MenuDownload_Click; 50 | (item as MenuFlyoutItem).Click += MenuDownload_Click; 51 | break; 52 | case "menuShare": 53 | (item as MenuFlyoutItem).Click -= MenuShare_Click; 54 | (item as MenuFlyoutItem).Click += MenuShare_Click; 55 | break; 56 | case "menuCollect": 57 | (item as MenuFlyoutItem).Click -= MenuCollect_Click; 58 | (item as MenuFlyoutItem).Click += MenuCollect_Click; 59 | break; 60 | case "menuInfo": 61 | (item as MenuFlyoutItem).Click -= MenuInfo_Click; 62 | (item as MenuFlyoutItem).Click += MenuInfo_Click; 63 | break; 64 | default: 65 | break; 66 | } 67 | } 68 | } 69 | 70 | private void MenuAdd_Click(object sender, RoutedEventArgs e) 71 | { 72 | var player = MessageCenter.GetMusicPlay(); 73 | var data = (sender as MenuFlyoutItem).DataContext; 74 | if (data is songsListModel) 75 | { 76 | var item = data as songsListModel; 77 | player.AddPlay(new PlayModel() 78 | { 79 | author = item.author, 80 | title = item.title, 81 | pic = item.cover_url, 82 | songid = item.id 83 | }); 84 | 85 | } 86 | } 87 | 88 | private async void MenuCollect_Click(object sender, RoutedEventArgs e) 89 | { 90 | var songId = 0; 91 | var context = (sender as MenuFlyoutItem).DataContext; 92 | if (context is songsListModel) 93 | { 94 | songId = (context as songsListModel).id; 95 | } 96 | else 97 | { 98 | songId = (context as PlayModel).songid; 99 | } 100 | if (UserHelper.isLogin || await Utils.ShowLoginDialog()) 101 | { 102 | try 103 | { 104 | CollectionsDialog cd = new CollectionsDialog(songId); 105 | await cd.ShowAsync(); 106 | } 107 | catch (Exception ex) 108 | { 109 | 110 | Utils.ShowMessageToast("收藏歌曲失败"); 111 | LogHelper.Log("收藏歌曲失败", LogType.ERROR, ex); 112 | } 113 | } 114 | else 115 | { 116 | Utils.ShowMessageToast("请先登录"); 117 | } 118 | 119 | 120 | } 121 | 122 | private void MenuInfo_Click(object sender, RoutedEventArgs e) 123 | { 124 | var songId = 0; 125 | var context = (sender as MenuFlyoutItem).DataContext; 126 | if (context is songsListModel) 127 | { 128 | songId = (context as songsListModel).id; 129 | } 130 | else 131 | { 132 | songId = (context as PlayModel).songid; 133 | } 134 | MessageCenter.SendMainFrameNavigate(typeof(SongDetailsPage),songId); 135 | } 136 | 137 | 138 | 139 | 140 | private void MenuShare_Click(object sender, RoutedEventArgs e) 141 | { 142 | int id = 0; 143 | var data = (sender as MenuFlyoutItem).DataContext; 144 | if (data is songsListModel) 145 | { 146 | id = (data as songsListModel).id; 147 | } 148 | else if (data is PlayModel) 149 | { 150 | id = (data as PlayModel).songid; 151 | } 152 | SystemHelper.SetClipboard("https://www.bilibili.com/audio/au" + id); 153 | Utils.ShowMessageToast("已经将地址复制到剪切板"); 154 | } 155 | 156 | private void MenuDownload_Click(object sender, RoutedEventArgs e) 157 | { 158 | Utils.ShowMessageToast("下载功能开发中...."); 159 | } 160 | 161 | private void MenuPlay_Click(object sender, RoutedEventArgs e) 162 | { 163 | var player = MessageCenter.GetMusicPlay(); 164 | var data = (sender as MenuFlyoutItem).DataContext; 165 | if (data is songsListModel) 166 | { 167 | var item = data as songsListModel; 168 | player.AddToPlay(new PlayModel() 169 | { 170 | author = item.author, 171 | title = item.title, 172 | pic = item.cover_url, 173 | songid = item.id 174 | }); 175 | 176 | } 177 | else if (data is PlayModel) 178 | { 179 | var play = data as PlayModel; 180 | var index = player.mediaPlaybackList.Items.IndexOf(player.mediaPlaybackList.Items.FirstOrDefault(x => x.Source.CustomProperties["id"].Equals(play.songid))); 181 | MessageCenter.GetMusicPlay().mediaPlaybackList.MoveTo(Convert.ToUInt32(index)); 182 | } 183 | } 184 | } 185 | } 186 | -------------------------------------------------------------------------------- /BiliMusic.Sqlite/BiliMusic.Sqlite.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {d8c2e1c8-091b-44eb-abe4-dd6defb5c5b2} 8 | Library 9 | Properties 10 | BiliMusic.Sqlite 11 | BiliMusic.Sqlite 12 | zh-CN 13 | UAP 14 | 10.0.17134.0 15 | 10.0.16299.0 16 | 14 17 | 512 18 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 19 | 20 | 21 | AnyCPU 22 | true 23 | full 24 | false 25 | bin\Debug\ 26 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 27 | prompt 28 | 4 29 | 30 | 31 | AnyCPU 32 | pdbonly 33 | true 34 | bin\Release\ 35 | TRACE;NETFX_CORE;WINDOWS_UWP 36 | prompt 37 | 4 38 | 39 | 40 | x86 41 | true 42 | bin\x86\Debug\ 43 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 44 | ;2008 45 | full 46 | false 47 | prompt 48 | 49 | 50 | x86 51 | bin\x86\Release\ 52 | TRACE;NETFX_CORE;WINDOWS_UWP 53 | true 54 | ;2008 55 | pdbonly 56 | false 57 | prompt 58 | 59 | 60 | ARM 61 | true 62 | bin\ARM\Debug\ 63 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 64 | ;2008 65 | full 66 | false 67 | prompt 68 | 69 | 70 | ARM 71 | bin\ARM\Release\ 72 | TRACE;NETFX_CORE;WINDOWS_UWP 73 | true 74 | ;2008 75 | pdbonly 76 | false 77 | prompt 78 | 79 | 80 | ARM64 81 | true 82 | bin\ARM64\Debug\ 83 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 84 | ;2008 85 | full 86 | false 87 | prompt 88 | 89 | 90 | ARM64 91 | bin\ARM64\Release\ 92 | TRACE;NETFX_CORE;WINDOWS_UWP 93 | true 94 | ;2008 95 | pdbonly 96 | false 97 | prompt 98 | 99 | 100 | x64 101 | true 102 | bin\x64\Debug\ 103 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 104 | ;2008 105 | full 106 | false 107 | prompt 108 | 109 | 110 | x64 111 | bin\x64\Release\ 112 | TRACE;NETFX_CORE;WINDOWS_UWP 113 | true 114 | ;2008 115 | pdbonly 116 | false 117 | prompt 118 | 119 | 120 | PackageReference 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 14.0 129 | 130 | 131 | 138 | 139 | -------------------------------------------------------------------------------- /BiliMusic.JS/BiliMusic.JS.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3} 8 | winmdobj 9 | Properties 10 | BiliMusic.JS 11 | BiliMusic.JS 12 | zh-CN 13 | UAP 14 | 10.0.17134.0 15 | 10.0.16299.0 16 | 14 17 | 512 18 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 19 | false 20 | 21 | 22 | AnyCPU 23 | true 24 | full 25 | false 26 | bin\Debug\ 27 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 28 | prompt 29 | 4 30 | 31 | 32 | AnyCPU 33 | pdbonly 34 | true 35 | bin\Release\ 36 | TRACE;NETFX_CORE;WINDOWS_UWP 37 | prompt 38 | 4 39 | 40 | 41 | x86 42 | true 43 | bin\x86\Debug\ 44 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 45 | ;2008 46 | full 47 | false 48 | prompt 49 | 50 | 51 | x86 52 | bin\x86\Release\ 53 | TRACE;NETFX_CORE;WINDOWS_UWP 54 | true 55 | ;2008 56 | pdbonly 57 | false 58 | prompt 59 | 60 | 61 | ARM 62 | true 63 | bin\ARM\Debug\ 64 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 65 | ;2008 66 | full 67 | false 68 | prompt 69 | 70 | 71 | ARM 72 | bin\ARM\Release\ 73 | TRACE;NETFX_CORE;WINDOWS_UWP 74 | true 75 | ;2008 76 | pdbonly 77 | false 78 | prompt 79 | 80 | 81 | ARM64 82 | true 83 | bin\ARM64\Debug\ 84 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 85 | ;2008 86 | full 87 | false 88 | prompt 89 | 90 | 91 | ARM64 92 | bin\ARM64\Release\ 93 | TRACE;NETFX_CORE;WINDOWS_UWP 94 | true 95 | ;2008 96 | pdbonly 97 | false 98 | prompt 99 | 100 | 101 | x64 102 | true 103 | bin\x64\Debug\ 104 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 105 | ;2008 106 | full 107 | false 108 | prompt 109 | 110 | 111 | x64 112 | bin\x64\Release\ 113 | TRACE;NETFX_CORE;WINDOWS_UWP 114 | true 115 | ;2008 116 | pdbonly 117 | false 118 | prompt 119 | 120 | 121 | PackageReference 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 6.1.9 131 | 132 | 133 | 134 | 14.0 135 | 136 | 137 | 144 | -------------------------------------------------------------------------------- /BiliMusic/Modules/MenuDetail.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Collections.ObjectModel; 7 | using BiliMusic.Models.Main; 8 | using Microsoft.UI.Xaml.Controls; 9 | using Windows.UI.Xaml; 10 | using System.ComponentModel; 11 | using BiliMusic.Helpers; 12 | using BiliMusic.Models; 13 | 14 | namespace BiliMusic.Modules 15 | { 16 | public class MenuDetail : INotifyPropertyChanged 17 | { 18 | 19 | private SonglistDetailModel _Datas; 20 | 21 | public event PropertyChangedEventHandler PropertyChanged; 22 | 23 | public SonglistDetailModel Datas 24 | { 25 | get { return _Datas; } 26 | set 27 | { 28 | _Datas = value; 29 | if (PropertyChanged != null) 30 | { 31 | PropertyChanged(this, new PropertyChangedEventArgs("Datas")); 32 | } 33 | } 34 | } 35 | private bool _loading = true; 36 | public bool loading 37 | { 38 | get { return _loading; } 39 | set 40 | { 41 | _loading = value; 42 | if (PropertyChanged != null) 43 | { 44 | PropertyChanged(this, new PropertyChangedEventArgs("loading")); 45 | } 46 | } 47 | } 48 | /// 49 | /// 歌单ID 50 | /// 51 | public int menuId { get; set; } 52 | /// 53 | /// 编辑推荐ID 54 | /// 55 | public int recommedId { get; set; } 56 | public MenuDetail(int id,int recommed_id = 0) 57 | { 58 | menuId = id; 59 | recommedId = recommed_id; 60 | } 61 | /// 62 | /// 加载歌单信息 63 | /// 64 | public async void LoadData() 65 | { 66 | try 67 | { 68 | loading = true; 69 | IHttpResults re; 70 | if (recommedId == 0) 71 | { 72 | re = await Api.SonglistDetail(menuId).Request(); 73 | } 74 | else 75 | { 76 | re = await Api.RecommendDetail(recommedId).Request(); 77 | } 78 | if (!re.status) 79 | { 80 | Utils.ShowMessageToast(re.message); 81 | return; 82 | } 83 | var data = re.GetJson>(); 84 | if (data.code != 0) 85 | { 86 | Utils.ShowMessageToast(data.msg + data.message); 87 | return; 88 | } 89 | if (recommedId == 0) 90 | { 91 | data.data.menusTags = await LoadTags(); 92 | } 93 | 94 | Datas = data.data; 95 | 96 | } 97 | catch (Exception ex) 98 | { 99 | 100 | Utils.ShowMessageToast("读取歌单信息失败"); 101 | LogHelper.Log("读取歌单信息失败", LogType.ERROR, ex); 102 | } 103 | finally 104 | { 105 | loading = false; 106 | } 107 | 108 | } 109 | 110 | /// 111 | /// 收藏歌单 112 | /// 113 | /// 114 | public async void CollectMenu() 115 | { 116 | try 117 | { 118 | loading = true; 119 | IHttpResults re= await Api.MenuCollect(menuId).Request(); 120 | if (!re.status) 121 | { 122 | Utils.ShowMessageToast(re.message); 123 | return; 124 | } 125 | var data = re.GetJson>(); 126 | if (data.code != 0) 127 | { 128 | Utils.ShowMessageToast(data.msg + data.message); 129 | return; 130 | } 131 | Datas.menusRespones.collected = 1; 132 | Utils.ShowMessageToast("收藏成功"); 133 | MessageCenter.GetMainInfo().Logined(); 134 | } 135 | catch (Exception ex) 136 | { 137 | 138 | Utils.ShowMessageToast("读取歌单信息失败"); 139 | LogHelper.Log("读取歌单信息失败", LogType.ERROR, ex); 140 | } 141 | finally 142 | { 143 | loading = false; 144 | } 145 | } 146 | 147 | /// 148 | /// 收藏歌单 149 | /// 150 | /// 151 | public async void CancelCollectMenu() 152 | { 153 | try 154 | { 155 | loading = true; 156 | IHttpResults re = await Api.CancelMenuCollect(menuId).Request(); 157 | if (!re.status) 158 | { 159 | Utils.ShowMessageToast(re.message); 160 | return; 161 | } 162 | var data = re.GetJson>(); 163 | 164 | if (data.code != 0) 165 | { 166 | Utils.ShowMessageToast(data.msg + data.message); 167 | return; 168 | } 169 | Datas.menusRespones.collected = 0; 170 | Utils.ShowMessageToast("已经取消收藏"); 171 | MessageCenter.GetMainInfo().Logined(); 172 | } 173 | catch (Exception ex) 174 | { 175 | 176 | Utils.ShowMessageToast("读取歌单信息失败"); 177 | LogHelper.Log("读取歌单信息失败", LogType.ERROR, ex); 178 | } 179 | finally 180 | { 181 | loading = false; 182 | } 183 | } 184 | 185 | 186 | /// 187 | /// 加载歌单TAG信息 188 | /// 189 | /// 190 | public async Task> LoadTags() 191 | { 192 | try 193 | { 194 | if (menuId==0) 195 | { 196 | return null; 197 | } 198 | loading = true; 199 | 200 | var re = await Api.SonglistTag(menuId).Request(); 201 | if (!re.status) 202 | { 203 | Utils.ShowMessageToast(re.message); 204 | return null; 205 | } 206 | var data = re.GetJson>>(); 207 | if (data.code != 0) 208 | { 209 | Utils.ShowMessageToast(data.msg + data.message); 210 | return null; 211 | } 212 | 213 | 214 | return data.data; 215 | 216 | } 217 | catch (Exception ex) 218 | { 219 | Utils.ShowMessageToast("读取歌单TAG失败"); 220 | LogHelper.Log("读取歌单TAG失败", LogType.ERROR, ex); 221 | return null; 222 | } 223 | 224 | } 225 | } 226 | } 227 | -------------------------------------------------------------------------------- /BiliMusic/Controls/LoginDialog.xaml.cs: -------------------------------------------------------------------------------- 1 | using BiliMusic.Helpers; 2 | using BiliMusic.Models; 3 | using BiliMusic.Modules; 4 | using Newtonsoft.Json.Linq; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.IO; 8 | using System.Linq; 9 | using System.Runtime.InteropServices.WindowsRuntime; 10 | using Windows.Foundation; 11 | using Windows.Foundation.Collections; 12 | using Windows.UI.Xaml; 13 | using Windows.UI.Xaml.Controls; 14 | using Windows.UI.Xaml.Controls.Primitives; 15 | using Windows.UI.Xaml.Data; 16 | using Windows.UI.Xaml.Input; 17 | using Windows.UI.Xaml.Media; 18 | using Windows.UI.Xaml.Media.Imaging; 19 | using Windows.UI.Xaml.Navigation; 20 | 21 | // https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“内容对话框”项模板 22 | 23 | namespace BiliMusic.Controls 24 | { 25 | public sealed partial class LoginDialog : ContentDialog 26 | { 27 | Account account; 28 | public LoginDialog() 29 | { 30 | this.InitializeComponent(); 31 | account = new Account(); 32 | _biliapp.CloseBrowserEvent += _biliapp_CloseBrowserEvent; 33 | _biliapp.ValidateLoginEvent += _biliapp_ValidateLoginEvent; 34 | _secure.CloseCaptchaEvent += _biliapp_CloseCaptchaEvent; 35 | _secure.CaptchaEvent += _biliapp_CaptchaEvent; 36 | } 37 | 38 | private void _biliapp_CaptchaEvent(object sender, string e) 39 | { 40 | //throw new NotImplementedException(); 41 | } 42 | 43 | private void _biliapp_CloseCaptchaEvent(object sender, string e) 44 | { 45 | //throw new NotImplementedException(); 46 | } 47 | 48 | JS.biliapp _biliapp = new JS.biliapp(); 49 | JS.secure _secure = new JS.secure(); 50 | private void _biliapp_CloseBrowserEvent(object sender, string e) 51 | { 52 | this.Hide(); 53 | } 54 | 55 | private async void _biliapp_ValidateLoginEvent(object sender, string e) 56 | { 57 | try 58 | { 59 | JObject jObject = JObject.Parse(e); 60 | if (jObject["access_token"] != null) 61 | { 62 | var m = await account.SaveLogin(jObject["access_token"].ToString(), jObject["refresh_token"].ToString(), Convert.ToInt32(jObject["expires_in"]), Convert.ToInt64(jObject["mid"])); 63 | if (m) 64 | { 65 | this.Hide(); 66 | Utils.ShowMessageToast("登录成功"); 67 | } 68 | else 69 | { 70 | Title = "登录"; 71 | IsPrimaryButtonEnabled = true; 72 | webView.Visibility = Visibility.Collapsed; 73 | Utils.ShowMessageToast("登录失败,请重试"); 74 | } 75 | //await UserManage.LoginSucess(jObject["access_token"].ToString()); 76 | } 77 | else 78 | { 79 | Title = "登录"; 80 | IsPrimaryButtonEnabled = true; 81 | webView.Visibility = Visibility.Collapsed; 82 | Utils.ShowMessageToast("登录失败,请重试"); 83 | } 84 | 85 | } 86 | catch (Exception) 87 | { 88 | } 89 | 90 | } 91 | private async void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) 92 | { 93 | args.Cancel = true; 94 | if (txt_Username.Text.Length == 0) 95 | { 96 | txt_Username.Focus(FocusState.Pointer); 97 | Utils.ShowMessageToast("请输入用户名"); 98 | return; 99 | } 100 | if (txt_Password.Password.Length == 0) 101 | { 102 | txt_Password.Focus(FocusState.Pointer); 103 | Utils.ShowMessageToast("请输入密码"); 104 | return; 105 | } 106 | if (chatcha.Visibility == Visibility.Visible && txt_captcha.Text.Length == 0) 107 | { 108 | txt_Password.Focus(FocusState.Pointer); 109 | Utils.ShowMessageToast("请输入验证码"); 110 | return; 111 | } 112 | IsPrimaryButtonEnabled = false; 113 | //var results = await account.LoginV3(txt_Username.Text, txt_Password.Password); 114 | var results = await account.LoginV2(txt_Username.Text, txt_Password.Password, txt_captcha.Text); 115 | switch (results.status) 116 | { 117 | case LoginStatus.Success: 118 | this.Hide(); 119 | break; 120 | case LoginStatus.Fail: 121 | case LoginStatus.Error: 122 | IsPrimaryButtonEnabled = true; 123 | break; 124 | case LoginStatus.NeedCaptcha: 125 | //V2 126 | chatcha.Visibility = Visibility.Visible; 127 | IsPrimaryButtonEnabled = true; 128 | GetCaptcha(); 129 | 130 | break; 131 | case LoginStatus.NeedValidate: 132 | Title = "安全验证"; 133 | webView.Visibility = Visibility.Visible; 134 | webView.Source = new Uri(results.url.Replace("&ticket=1", "")); 135 | break; 136 | default: 137 | break; 138 | } 139 | Utils.ShowMessageToast(results.message); 140 | } 141 | 142 | private void ContentDialog_SecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) 143 | { 144 | } 145 | 146 | private void txt_Password_GotFocus(object sender, RoutedEventArgs e) 147 | { 148 | hide.Visibility = Visibility.Visible; 149 | } 150 | private void txt_Password_LostFocus(object sender, RoutedEventArgs e) 151 | { 152 | hide.Visibility = Visibility.Collapsed; 153 | } 154 | 155 | private void Image_Tapped(object sender, TappedRoutedEventArgs e) 156 | { 157 | GetCaptcha(); 158 | } 159 | private async void GetCaptcha() 160 | { 161 | try 162 | { 163 | var steam = await HttpHelper.GetStream(Api.Captcha().url); 164 | var img = new BitmapImage(); 165 | await img.SetSourceAsync(steam.AsRandomAccessStream()); 166 | img_Captcha.Source = img; 167 | } 168 | catch (Exception) 169 | { 170 | Utils.ShowMessageToast("无法加载验证码"); 171 | } 172 | 173 | 174 | } 175 | 176 | private void webView_NavigationStarting(WebView sender, WebViewNavigationStartingEventArgs args) 177 | { 178 | try 179 | { 180 | this.webView.AddWebAllowedObject("biliapp", _biliapp); 181 | this.webView.AddWebAllowedObject("secure", _secure); 182 | } 183 | catch (Exception ex) 184 | { 185 | LogHelper.Log("注入JS对象失败", LogType.ERROR, ex); 186 | } 187 | 188 | } 189 | 190 | private void webView_ScriptNotify(object sender, NotifyEventArgs e) 191 | { 192 | 193 | } 194 | } 195 | } 196 | -------------------------------------------------------------------------------- /BiliMusic.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28010.2046 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BiliMusic", "BiliMusic\BiliMusic.csproj", "{5A2A009D-BA98-490C-B415-15177C28AA90}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BiliMusic.JS", "BiliMusic.JS\BiliMusic.JS.csproj", "{97C7B171-E341-4AC4-9720-14E7B1ECF2A3}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BiliMusic.SqliteModel", "BiliMusic.SqliteModel\BiliMusic.SqliteModel.csproj", "{BB7C60F3-3215-442E-85AE-A6D5F406D1EC}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BiliMusic.Migrations.Startup", "BiliMusic.Migrations.Startup\BiliMusic.Migrations.Startup.csproj", "{D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}" 13 | EndProject 14 | Global 15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 16 | Debug|Any CPU = Debug|Any CPU 17 | Debug|ARM = Debug|ARM 18 | Debug|ARM64 = Debug|ARM64 19 | Debug|x64 = Debug|x64 20 | Debug|x86 = Debug|x86 21 | Release|Any CPU = Release|Any CPU 22 | Release|ARM = Release|ARM 23 | Release|ARM64 = Release|ARM64 24 | Release|x64 = Release|x64 25 | Release|x86 = Release|x86 26 | EndGlobalSection 27 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 28 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Debug|Any CPU.ActiveCfg = Debug|x86 29 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Debug|ARM.ActiveCfg = Debug|ARM 30 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Debug|ARM.Build.0 = Debug|ARM 31 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Debug|ARM.Deploy.0 = Debug|ARM 32 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Debug|ARM64.ActiveCfg = Debug|x86 33 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Debug|x64.ActiveCfg = Debug|x64 34 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Debug|x64.Build.0 = Debug|x64 35 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Debug|x64.Deploy.0 = Debug|x64 36 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Debug|x86.ActiveCfg = Debug|x86 37 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Debug|x86.Build.0 = Debug|x86 38 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Debug|x86.Deploy.0 = Debug|x86 39 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Release|Any CPU.ActiveCfg = Release|x86 40 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Release|ARM.ActiveCfg = Release|ARM 41 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Release|ARM.Build.0 = Release|ARM 42 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Release|ARM.Deploy.0 = Release|ARM 43 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Release|ARM64.ActiveCfg = Release|x86 44 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Release|x64.ActiveCfg = Release|x64 45 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Release|x64.Build.0 = Release|x64 46 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Release|x64.Deploy.0 = Release|x64 47 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Release|x86.ActiveCfg = Release|x86 48 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Release|x86.Build.0 = Release|x86 49 | {5A2A009D-BA98-490C-B415-15177C28AA90}.Release|x86.Deploy.0 = Release|x86 50 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 51 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Debug|Any CPU.Build.0 = Debug|Any CPU 52 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Debug|ARM.ActiveCfg = Debug|ARM 53 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Debug|ARM.Build.0 = Debug|ARM 54 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Debug|ARM64.ActiveCfg = Debug|ARM64 55 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Debug|ARM64.Build.0 = Debug|ARM64 56 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Debug|x64.ActiveCfg = Debug|x64 57 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Debug|x64.Build.0 = Debug|x64 58 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Debug|x86.ActiveCfg = Debug|x86 59 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Debug|x86.Build.0 = Debug|x86 60 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Release|Any CPU.ActiveCfg = Release|Any CPU 61 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Release|Any CPU.Build.0 = Release|Any CPU 62 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Release|ARM.ActiveCfg = Release|ARM 63 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Release|ARM.Build.0 = Release|ARM 64 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Release|ARM64.ActiveCfg = Release|ARM64 65 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Release|ARM64.Build.0 = Release|ARM64 66 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Release|x64.ActiveCfg = Release|x64 67 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Release|x64.Build.0 = Release|x64 68 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Release|x86.ActiveCfg = Release|x86 69 | {97C7B171-E341-4AC4-9720-14E7B1ECF2A3}.Release|x86.Build.0 = Release|x86 70 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 71 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Debug|Any CPU.Build.0 = Debug|Any CPU 72 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Debug|ARM.ActiveCfg = Debug|Any CPU 73 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Debug|ARM.Build.0 = Debug|Any CPU 74 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Debug|ARM64.ActiveCfg = Debug|Any CPU 75 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Debug|ARM64.Build.0 = Debug|Any CPU 76 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Debug|x64.ActiveCfg = Debug|Any CPU 77 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Debug|x64.Build.0 = Debug|Any CPU 78 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Debug|x86.ActiveCfg = Debug|Any CPU 79 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Debug|x86.Build.0 = Debug|Any CPU 80 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Release|Any CPU.ActiveCfg = Release|Any CPU 81 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Release|Any CPU.Build.0 = Release|Any CPU 82 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Release|ARM.ActiveCfg = Release|Any CPU 83 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Release|ARM.Build.0 = Release|Any CPU 84 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Release|ARM64.ActiveCfg = Release|Any CPU 85 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Release|ARM64.Build.0 = Release|Any CPU 86 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Release|x64.ActiveCfg = Release|Any CPU 87 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Release|x64.Build.0 = Release|Any CPU 88 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Release|x86.ActiveCfg = Release|Any CPU 89 | {BB7C60F3-3215-442E-85AE-A6D5F406D1EC}.Release|x86.Build.0 = Release|Any CPU 90 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 91 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Debug|Any CPU.Build.0 = Debug|Any CPU 92 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Debug|ARM.ActiveCfg = Debug|Any CPU 93 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Debug|ARM.Build.0 = Debug|Any CPU 94 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Debug|ARM64.ActiveCfg = Debug|Any CPU 95 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Debug|ARM64.Build.0 = Debug|Any CPU 96 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Debug|x64.ActiveCfg = Debug|Any CPU 97 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Debug|x64.Build.0 = Debug|Any CPU 98 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Debug|x86.ActiveCfg = Debug|Any CPU 99 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Debug|x86.Build.0 = Debug|Any CPU 100 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Release|Any CPU.ActiveCfg = Release|Any CPU 101 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Release|Any CPU.Build.0 = Release|Any CPU 102 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Release|ARM.ActiveCfg = Release|Any CPU 103 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Release|ARM.Build.0 = Release|Any CPU 104 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Release|ARM64.ActiveCfg = Release|Any CPU 105 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Release|ARM64.Build.0 = Release|Any CPU 106 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Release|x64.ActiveCfg = Release|Any CPU 107 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Release|x64.Build.0 = Release|Any CPU 108 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Release|x86.ActiveCfg = Release|Any CPU 109 | {D2CF32EC-5DB9-4E11-B450-A2E051F0BD8F}.Release|x86.Build.0 = Release|Any CPU 110 | EndGlobalSection 111 | GlobalSection(SolutionProperties) = preSolution 112 | HideSolutionNode = FALSE 113 | EndGlobalSection 114 | GlobalSection(ExtensibilityGlobals) = postSolution 115 | SolutionGuid = {F8A9C19C-7EDD-41B6-A21B-F5CE28991F12} 116 | EndGlobalSection 117 | EndGlobal 118 | --------------------------------------------------------------------------------