├── .gitattributes ├── .github └── workflows │ └── build.yml ├── .gitignore ├── CHANGELOG.md ├── Directory.Build.props ├── Directory.Build.targets ├── Directory.Packages.props ├── DownKyi.Core ├── Aria2cNet │ ├── AriaManager.cs │ ├── Client │ │ ├── AriaClient.cs │ │ ├── Entity │ │ │ ├── AriaAddMetalink.cs │ │ │ ├── AriaAddTorrent.cs │ │ │ ├── AriaAddUri.cs │ │ │ ├── AriaChangeOption.cs │ │ │ ├── AriaChangePosition.cs │ │ │ ├── AriaChangeUri.cs │ │ │ ├── AriaError.cs │ │ │ ├── AriaGetFiles.cs │ │ │ ├── AriaGetGlobalStat.cs │ │ │ ├── AriaGetOption.cs │ │ │ ├── AriaGetPeers.cs │ │ │ ├── AriaGetServers.cs │ │ │ ├── AriaGetSessionInfo.cs │ │ │ ├── AriaGetUris.cs │ │ │ ├── AriaOption.cs │ │ │ ├── AriaPause.cs │ │ │ ├── AriaRemove.cs │ │ │ ├── AriaSaveSession.cs │ │ │ ├── AriaSendData.cs │ │ │ ├── AriaShutdown.cs │ │ │ ├── AriaTellStatus.cs │ │ │ ├── AriaUri.cs │ │ │ ├── AriaVersion.cs │ │ │ ├── SystemListMethods.cs │ │ │ ├── SystemListNotifications.cs │ │ │ ├── SystemMulticall.cs │ │ │ └── SystemMulticallMathod.cs │ │ └── HowChangePosition.cs │ ├── DownloadResult.cs │ └── Server │ │ ├── AriaConfig.cs │ │ ├── AriaConfigFileAllocation.cs │ │ ├── AriaConfigLogLevel.cs │ │ └── AriaServer.cs ├── BiliApi │ ├── Bangumi │ │ ├── BangumiInfo.cs │ │ ├── BangumiType.cs │ │ └── Models │ │ │ ├── BangumiArea.cs │ │ │ ├── BangumiEpisode.cs │ │ │ ├── BangumiMedia.cs │ │ │ ├── BangumiPositive.cs │ │ │ ├── BangumiSeason.cs │ │ │ ├── BangumiSeasonInfo.cs │ │ │ ├── BangumiSection.cs │ │ │ ├── BangumiStat.cs │ │ │ └── BangumiUpInfo.cs │ ├── BiliUtils │ │ ├── BvId.cs │ │ ├── Constant.cs │ │ ├── DanmakuSender.cs │ │ ├── ParseEntrance.cs │ │ ├── Quality.cs │ │ └── VideoParseType.cs │ ├── BilibiliImages.axaml │ ├── Cheese │ │ ├── CheeseInfo.cs │ │ └── Models │ │ │ ├── CheeseBrief.cs │ │ │ ├── CheeseEpisode.cs │ │ │ ├── CheeseEpisodeList.cs │ │ │ ├── CheeseEpisodePage.cs │ │ │ ├── CheeseImg.cs │ │ │ ├── CheeseStat.cs │ │ │ ├── CheeseUpInfo.cs │ │ │ └── CheeseView.cs │ ├── Danmaku │ │ ├── DanmakuProtobuf.cs │ │ └── Models │ │ │ └── BiliDanmaku.cs │ ├── Favorites │ │ ├── FavoritesInfo.cs │ │ ├── FavoritesResource.cs │ │ └── Models │ │ │ ├── FavStatus.cs │ │ │ ├── FavUpper.cs │ │ │ ├── FavoritesList.cs │ │ │ ├── FavoritesMedia.cs │ │ │ ├── FavoritesMediaId.cs │ │ │ ├── FavoritesMediaResource.cs │ │ │ ├── FavoritesMetaInfo.cs │ │ │ └── MediaStatus.cs │ ├── History │ │ ├── History.cs │ │ ├── Models │ │ │ ├── HistoryBusiness.cs │ │ │ ├── HistoryCursor.cs │ │ │ ├── HistoryData.cs │ │ │ ├── HistoryList.cs │ │ │ ├── HistoryListHistory.cs │ │ │ ├── ToViewData.cs │ │ │ └── ToViewList.cs │ │ └── ToView.cs │ ├── Login │ │ ├── LoginHelper.cs │ │ ├── LoginQR.cs │ │ └── Models │ │ │ ├── LoginStatus.cs │ │ │ └── LoginUrl.cs │ ├── Models │ │ ├── BaseModel.cs │ │ ├── Dimension.cs │ │ ├── Json │ │ │ ├── SubRipText.cs │ │ │ ├── Subtitle.cs │ │ │ └── SubtitleJson.cs │ │ └── VideoOwner.cs │ ├── Sign │ │ └── WbiSign.cs │ ├── Users │ │ ├── Models │ │ │ ├── BangumiFollow.cs │ │ │ ├── BangumiFollowAreas.cs │ │ │ ├── BangumiFollowNewEp.cs │ │ │ ├── BangumiFollowOrigin.cs │ │ │ ├── BangumiType.cs │ │ │ ├── FollowingGroup.cs │ │ │ ├── FollowingGroupContent.cs │ │ │ ├── FollowingOrder.cs │ │ │ ├── MyInfo.cs │ │ │ ├── NicknameStatus.cs │ │ │ ├── PublicationOrder.cs │ │ │ ├── RelationBlack.cs │ │ │ ├── RelationFollow.cs │ │ │ ├── RelationFollowInfo.cs │ │ │ ├── RelationWhisper.cs │ │ │ ├── SpaceChannel.cs │ │ │ ├── SpaceChannelArchive.cs │ │ │ ├── SpaceChannelArchiveStat.cs │ │ │ ├── SpaceChannelList.cs │ │ │ ├── SpaceChannelVideo.cs │ │ │ ├── SpaceChannelVideoList.cs │ │ │ ├── SpaceChannelVideoPage.cs │ │ │ ├── SpaceCheese.cs │ │ │ ├── SpaceCheeseOrigin.cs │ │ │ ├── SpaceCheesePage.cs │ │ │ ├── SpacePublication.cs │ │ │ ├── SpacePublicationList.cs │ │ │ ├── SpacePublicationListType.cs │ │ │ ├── SpacePublicationListTypeVideoZone.cs │ │ │ ├── SpacePublicationListVideo.cs │ │ │ ├── SpacePublicationPage.cs │ │ │ ├── SpaceSeasonsDetail.cs │ │ │ ├── SpaceSeasonsSeries.cs │ │ │ ├── SpaceSeasonsSeriesArchives.cs │ │ │ ├── SpaceSeasonsSeriesMeta.cs │ │ │ ├── SpaceSeasonsSeriesOrigin.cs │ │ │ ├── SpaceSeasonsSeriesPage.cs │ │ │ ├── SpaceSeasonsSeriesStat.cs │ │ │ ├── SpaceSeriesDetail.cs │ │ │ ├── SpaceSeriesMeta.cs │ │ │ ├── SpaceSettings.cs │ │ │ ├── SpaceSettingsToutu.cs │ │ │ ├── UpStat.cs │ │ │ ├── UserInfoForNavigation.cs │ │ │ ├── UserInfoForSpace.cs │ │ │ ├── UserInfoLevelExp.cs │ │ │ ├── UserInfoVip.cs │ │ │ └── UserRelationStat.cs │ │ ├── Nickname.cs │ │ ├── UserInfo.cs │ │ ├── UserRelation.cs │ │ ├── UserSpace.cs │ │ └── UserStatus.cs │ ├── Video │ │ ├── Dynamic.cs │ │ ├── Models │ │ │ ├── DynamicVideoView.cs │ │ │ ├── RankingVideoView.cs │ │ │ ├── RegionDynamic.cs │ │ │ ├── RegionRanking.cs │ │ │ ├── UgcArc.cs │ │ │ ├── UgcEpisode.cs │ │ │ ├── UgcSeason.cs │ │ │ ├── UgcSection.cs │ │ │ ├── UgcStat.cs │ │ │ ├── VideoDescription.cs │ │ │ ├── VideoPage.cs │ │ │ ├── VideoPagelist.cs │ │ │ ├── VideoStat.cs │ │ │ ├── VideoSubtitle.cs │ │ │ └── VideoView.cs │ │ ├── Ranking.cs │ │ └── VideoInfo.cs │ ├── VideoStream │ │ ├── Models │ │ │ ├── PlayUrl.cs │ │ │ ├── PlayUrlDash.cs │ │ │ ├── PlayUrlDashDolby.cs │ │ │ ├── PlayUrlDashFlac.cs │ │ │ ├── PlayUrlDashVideo.cs │ │ │ ├── PlayUrlDurl.cs │ │ │ ├── PlayUrlSupportFormat.cs │ │ │ ├── PlayerV2.cs │ │ │ ├── Subtitle.cs │ │ │ └── SubtitleInfo.cs │ │ ├── PlayStreamType.cs │ │ └── VideoStream.cs │ ├── WebClient.cs │ ├── Zone │ │ ├── VideoZone.cs │ │ ├── VideoZoneIcon.cs │ │ ├── ZoneAttr.cs │ │ └── ZoneImages.axaml │ └── protobuf │ │ └── bilibili │ │ └── community │ │ └── service │ │ └── dm │ │ └── v1 │ │ └── Dm.cs ├── Danmaku2Ass │ ├── Bilibili.cs │ ├── Collision.cs │ ├── Config.cs │ ├── Creater.cs │ ├── Danmaku.cs │ ├── Display.cs │ ├── Filter.cs │ ├── Producer.cs │ ├── Studio.cs │ ├── Subtitle.cs │ └── Utils.cs ├── DownKyi.Core.csproj ├── FFMpeg │ └── FFMpeg.cs ├── FileName │ ├── FileName.cs │ ├── FileNamePart.cs │ └── HyphenSeparated.cs ├── Logging │ ├── LogInfo.cs │ ├── LogLevel.cs │ └── LogManager.cs ├── Settings │ ├── AfterDownloadOperation.cs │ ├── AllowStatus.cs │ ├── DanmakuLayoutAlgorithm.cs │ ├── DownloadFinishedSort.cs │ ├── Downloader.cs │ ├── Models │ │ ├── AboutSettings.cs │ │ ├── AppSettings.cs │ │ ├── BasicSettings.cs │ │ ├── DanmakuSettings.cs │ │ ├── NetworkSettings.cs │ │ ├── UserInfoSettings.cs │ │ ├── VideoContentSettings.cs │ │ └── VideoSettings.cs │ ├── NetworkProxy.cs │ ├── OrderFormat.cs │ ├── ParseScope.cs │ ├── RepeatDownloadStrategy.cs │ ├── SettingsManager.About.cs │ ├── SettingsManager.Basic.cs │ ├── SettingsManager.Danmaku.cs │ ├── SettingsManager.Network.cs │ ├── SettingsManager.UserInfo.cs │ ├── SettingsManager.Video.cs │ ├── SettingsManager.cs │ ├── ThemeMode.cs │ └── VideoCodecs.cs ├── Storage │ ├── Constant.cs │ ├── Database │ │ ├── DbHelper.cs │ │ └── Download │ │ │ ├── DownloadBaseDb.cs │ │ │ ├── DownloadDb.cs │ │ │ ├── DownloadedDb.cs │ │ │ └── DownloadingDb.cs │ ├── StorageManager.cs │ └── StorageUtils.cs └── Utils │ ├── Debugging │ └── Console.cs │ ├── Encryptor │ ├── Encryptor.File.cs │ ├── Encryptor.String.cs │ └── Hash.cs │ ├── Format.cs │ ├── HardDisk.cs │ ├── ListHelper.cs │ ├── MachineCode.cs │ ├── ObjectHelper.cs │ ├── QRCode.cs │ ├── StringLogicalComparer.cs │ └── Validator │ └── Number.cs ├── DownKyi.sln ├── DownKyi ├── App.axaml ├── App.axaml.cs ├── AppConstant.cs ├── Commands │ └── AsyncDelegateCommand.cs ├── Converter │ └── CountConverter.cs ├── CustomAction │ ├── GridSplitterExtensions.cs │ ├── InfiniteScrollBehavior.cs │ ├── NumericInputBehavior.cs │ └── ResetGridSplitterBehavior.cs ├── CustomControl │ ├── AsyncImageLoader │ │ ├── IAsyncImageLoader.cs │ │ ├── ImageBrushLoader.cs │ │ ├── ImageLoader.cs │ │ └── Loaders │ │ │ ├── AdvancedImage.axaml │ │ │ ├── AdvancedImage.axaml.cs │ │ │ ├── BaseWebImageLoader.cs │ │ │ ├── DiskCachedWebImageLoader.cs │ │ │ └── RamCachedWebImageLoader.cs │ ├── CustomPager.axaml │ ├── CustomPager.axaml.cs │ ├── CustomPagerViewModel.cs │ └── Loading.cs ├── DownKyi.csproj ├── Events │ ├── MessageEvent.cs │ ├── NavigationEvent.cs │ └── NavigationParam.cs ├── Images │ ├── ButtonIcon.cs │ ├── LogoIcon.cs │ ├── NavigationIcon.cs │ ├── NormalIcon.cs │ ├── SystemIcon.cs │ └── VectorImage.cs ├── Languanges │ └── Default.axaml ├── Models │ ├── AppInfo.cs │ ├── DownloadBase.cs │ ├── DownloadStatus.cs │ ├── Downloaded.cs │ ├── Downloading.cs │ ├── OrderFormatDisplay.cs │ ├── ParseScopeDisplay.cs │ └── RepeatDownloadStrategyDisplay.cs ├── PrismExtension │ ├── Common │ │ └── MvvmHelpers.cs │ └── Dialog │ │ ├── Dialog.cs │ │ ├── DialogService.cs │ │ ├── DialogWindow.axaml │ │ ├── DialogWindow.axaml.cs │ │ ├── IDialogService.cs │ │ └── IDialogWindow.cs ├── Program.cs ├── Resources │ ├── backgound │ │ └── 9-绿荫秘境.png │ ├── channel.png │ ├── checked.png │ ├── default_header.jpg │ ├── favicon.ico │ ├── level │ │ ├── lv0.png │ │ ├── lv1.png │ │ ├── lv2.png │ │ ├── lv3.png │ │ ├── lv4.png │ │ ├── lv5.png │ │ ├── lv6.png │ │ ├── lv7.png │ │ ├── lv8.png │ │ └── lv9.png │ ├── loading │ │ └── loading.gif │ ├── login │ │ ├── login_top_bar.png │ │ ├── qrcode_login_2233.png │ │ ├── qrcode_login_tip.png │ │ └── scan_succeed.png │ ├── no-data.png │ ├── nodata02.png │ ├── play.png │ ├── sex │ │ ├── female.png │ │ └── male.png │ ├── time.png │ └── video-placeholder.png ├── Services │ ├── AlertService.cs │ ├── BangumiInfoService.cs │ ├── CheeseInfoService.cs │ ├── Download │ │ ├── AddToDownloadService.cs │ │ ├── AriaDownloadService.cs │ │ ├── BuiltinDownloadService.cs │ │ ├── CustomAriaDownloadService.cs │ │ ├── DownloadService.cs │ │ ├── DownloadStorageService.cs │ │ └── IDownloadService.cs │ ├── FavoritesService.cs │ ├── IFavoritesService.cs │ ├── IInfoService.cs │ ├── SearchService.cs │ ├── Utils.cs │ ├── VersionCheckerService.cs │ └── VideoInfoService.cs ├── Themes │ ├── ColorBrush.axaml │ ├── Colors │ │ ├── ColorDark.axaml │ │ └── ColorDefault.axaml │ ├── Styles │ │ ├── NavigationIcon.axaml │ │ ├── NormalIcon.axaml │ │ ├── StyleBtn.axaml │ │ ├── StyleCheckBox.axaml │ │ ├── StyleImageBtn.axaml │ │ ├── StyleListBox.axaml │ │ ├── StyleRadio.axaml │ │ ├── StyleSystemBtn.axaml │ │ └── loading.axaml │ └── ThemeDefault.axaml ├── Utils │ ├── ClipboardListener.cs │ ├── ClipboardManager.cs │ ├── DialogUtils.cs │ ├── DictionaryResource.cs │ ├── ImageHelper.cs │ ├── MarkdownUtil.cs │ ├── NavigateToView.cs │ ├── PlatformHelper.cs │ └── ThemeHelper.cs ├── ViewModels │ ├── Dialogs │ │ ├── BaseDialogViewModel.cs │ │ ├── NewVersionAvailableDialogViewModel.cs │ │ ├── ViewAlertDialogViewModel.cs │ │ ├── ViewAlreadyDownloadedDialogViewModel.cs │ │ ├── ViewDownloadSetterViewModel.cs │ │ └── ViewParsingSelectorViewModel.cs │ ├── DownloadManager │ │ ├── DownloadBaseItem.cs │ │ ├── DownloadedItem.cs │ │ ├── DownloadingItem.cs │ │ ├── ViewDownloadFinishedViewModel.cs │ │ └── ViewDownloadingViewModel.cs │ ├── Friends │ │ ├── ViewFollowerViewModel.cs │ │ └── ViewFollowingViewModel.cs │ ├── MainWindowViewModel.cs │ ├── PageViewModels │ │ ├── BangumiFollowMedia.cs │ │ ├── ChannelMedia.cs │ │ ├── Favorites.cs │ │ ├── FavoritesMedia.cs │ │ ├── FriendInfo.cs │ │ ├── HistoryMedia.cs │ │ ├── PublicationMedia.cs │ │ ├── SpaceItem.cs │ │ ├── TabHeader.cs │ │ ├── ToViewMedia.cs │ │ ├── VideoInfoView.cs │ │ ├── VideoPage.cs │ │ ├── VideoQuality.cs │ │ └── VideoSection.cs │ ├── Settings │ │ ├── DisplayFileNamePart.cs │ │ ├── ViewAboutViewModel.cs │ │ ├── ViewBasicViewModel.cs │ │ ├── ViewDanmakuViewModel.cs │ │ ├── ViewNetworkViewModel.cs │ │ └── ViewVideoViewModel.cs │ ├── Toolbox │ │ ├── ViewBiliHelperViewModel.cs │ │ ├── ViewDelogoViewModel.cs │ │ └── ViewExtractMediaViewModel.cs │ ├── UserSpace │ │ ├── Channel.cs │ │ ├── PublicationZone.cs │ │ ├── SeasonsSeries.cs │ │ ├── TabLeftBanner.cs │ │ ├── TabRightBanner.cs │ │ ├── ViewArchiveViewModel.cs │ │ ├── ViewChannelViewModel.cs │ │ └── ViewSeasonsSeriesViewModel.cs │ ├── ViewDownloadManagerViewModel.cs │ ├── ViewFriendsViewModel.cs │ ├── ViewIndexViewModel.cs │ ├── ViewLoginViewModel.cs │ ├── ViewModelBase.cs │ ├── ViewMyBangumiFollowViewModel.cs │ ├── ViewMyFavoritesViewModel.cs │ ├── ViewMyHistoryViewModel.cs │ ├── ViewMySpaceViewModel.cs │ ├── ViewMyToViewVideoViewModel.cs │ ├── ViewPublicFavoritesViewModel.cs │ ├── ViewPublicationViewModel.cs │ ├── ViewSeasonsSeriesViewModel.cs │ ├── ViewSettingsViewModel.cs │ ├── ViewToolboxViewModel.cs │ ├── ViewUserSpaceViewModel.cs │ └── ViewVideoDetailViewModel.cs ├── Views │ ├── Dialogs │ │ ├── NewVersionAvailableDialog.axaml │ │ ├── NewVersionAvailableDialog.axaml.cs │ │ ├── ViewAlertDialog.axaml │ │ ├── ViewAlertDialog.axaml.cs │ │ ├── ViewAlreadyDownloadedDialog.axaml │ │ ├── ViewAlreadyDownloadedDialog.axaml.cs │ │ ├── ViewDownloadSetter.axaml │ │ ├── ViewDownloadSetter.axaml.cs │ │ ├── ViewParsingSelector.axaml │ │ └── ViewParsingSelector.axaml.cs │ ├── DownloadManager │ │ ├── ViewDownloadFinished.axaml │ │ ├── ViewDownloadFinished.axaml.cs │ │ ├── ViewDownloading.axaml │ │ └── ViewDownloading.axaml.cs │ ├── Friends │ │ ├── ViewFollower.axaml │ │ ├── ViewFollower.axaml.cs │ │ ├── ViewFollowing.axaml │ │ └── ViewFollowing.axaml.cs │ ├── MainWindow.axaml │ ├── MainWindow.axaml.cs │ ├── Settings │ │ ├── ViewAbout.axaml │ │ ├── ViewAbout.axaml.cs │ │ ├── ViewBasic.axaml │ │ ├── ViewBasic.axaml.cs │ │ ├── ViewDanmaku.axaml │ │ ├── ViewDanmaku.axaml.cs │ │ ├── ViewNetwork.axaml │ │ ├── ViewNetwork.axaml.cs │ │ ├── ViewVideo.axaml │ │ └── ViewVideo.axaml.cs │ ├── Toolbox │ │ ├── ViewBiliHelper.axaml │ │ ├── ViewBiliHelper.axaml.cs │ │ ├── ViewDelogo.axaml │ │ ├── ViewDelogo.axaml.cs │ │ ├── ViewExtractMedia.axaml │ │ └── ViewExtractMedia.axaml.cs │ ├── UserSpace │ │ ├── ViewArchive.axaml │ │ ├── ViewArchive.axaml.cs │ │ ├── ViewSeasonsSeries.axaml │ │ └── ViewSeasonsSeries.axaml.cs │ ├── ViewDownloadManager.axaml │ ├── ViewDownloadManager.axaml.cs │ ├── ViewFriends.axaml │ ├── ViewFriends.axaml.cs │ ├── ViewIndex.axaml │ ├── ViewIndex.axaml.cs │ ├── ViewLogin.axaml │ ├── ViewLogin.axaml.cs │ ├── ViewMyBangumiFollow.axaml │ ├── ViewMyBangumiFollow.axaml.cs │ ├── ViewMyFavorites.axaml │ ├── ViewMyFavorites.axaml.cs │ ├── ViewMyHistory.axaml │ ├── ViewMyHistory.axaml.cs │ ├── ViewMySpace.axaml │ ├── ViewMySpace.axaml.cs │ ├── ViewMyToViewVideo.axaml │ ├── ViewMyToViewVideo.axaml.cs │ ├── ViewPublicFavorites.axaml │ ├── ViewPublicFavorites.axaml.cs │ ├── ViewPublication.axaml │ ├── ViewPublication.axaml.cs │ ├── ViewSeasonsSeries.axaml │ ├── ViewSeasonsSeries.axaml.cs │ ├── ViewSettings.axaml │ ├── ViewSettings.axaml.cs │ ├── ViewToolbox.axaml │ ├── ViewToolbox.axaml.cs │ ├── ViewUserSpace.axaml │ ├── ViewUserSpace.axaml.cs │ ├── ViewVideoDetail.axaml │ └── ViewVideoDetail.axaml.cs └── app.manifest ├── LICENSE ├── README.md ├── cliff.toml ├── script ├── aria2.ps1 ├── aria2.sh ├── ffmpeg.ps1 ├── ffmpeg.sh ├── macos │ ├── DownKyi.entitlements │ ├── Info.plist │ ├── logo.icns │ ├── package.sh │ └── sign.sh └── pupnet │ ├── DownKyi.pupnet.conf │ ├── app.desktop │ └── icons │ ├── logo.1024.png │ ├── logo.128.png │ ├── logo.16.png │ ├── logo.256.png │ ├── logo.32.png │ ├── logo.512.png │ ├── logo.64.png │ ├── logo.icns │ └── logo.ico └── version.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | 3 | # Windows 4 | *.bat text eol=crlf -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vs/ 3 | .vscode/ 4 | **/.DS_Store 5 | 6 | */**/obj 7 | */**/bin 8 | 9 | DownKyi.Core/Binary/* 10 | 11 | script/downloads 12 | script/pupnet/output 13 | script/macos/*.dmg 14 | script/macos/*.app 15 | 16 | *.sln.DotSettings.user -------------------------------------------------------------------------------- /Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | enable 4 | true 5 | 6 | -------------------------------------------------------------------------------- /Directory.Build.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /Directory.Packages.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaAddMetalink.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity; 4 | 5 | [JsonObject] 6 | public class AriaAddMetalink 7 | { 8 | [JsonProperty("id")] public string Id { get; set; } 9 | 10 | [JsonProperty("jsonrpc")] public string Jsonrpc { get; set; } 11 | 12 | [JsonProperty("result")] public string Result { get; set; } 13 | 14 | [JsonProperty("error")] public AriaError Error { get; set; } 15 | 16 | public override string ToString() 17 | { 18 | return JsonConvert.SerializeObject(this); 19 | } 20 | } -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaAddTorrent.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity; 4 | 5 | [JsonObject] 6 | public class AriaAddTorrent 7 | { 8 | [JsonProperty("id")] public string Id { get; set; } 9 | 10 | [JsonProperty("jsonrpc")] public string Jsonrpc { get; set; } 11 | 12 | [JsonProperty("result")] public string Result { get; set; } 13 | 14 | [JsonProperty("error")] public AriaError Error { get; set; } 15 | 16 | public override string ToString() 17 | { 18 | return JsonConvert.SerializeObject(this); 19 | } 20 | } -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaAddUri.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity; 4 | 5 | //{ 6 | //"id": "downkyi", 7 | //"jsonrpc": "2.0", 8 | //"result": "1aac102a4875c8cd" 9 | //} 10 | [JsonObject] 11 | public class AriaAddUri 12 | { 13 | [JsonProperty("id")] public string Id { get; set; } 14 | 15 | [JsonProperty("jsonrpc")] public string Jsonrpc { get; set; } 16 | 17 | [JsonProperty("result")] public string Result { get; set; } 18 | 19 | [JsonProperty("error")] public AriaError Error { get; set; } 20 | 21 | public override string ToString() 22 | { 23 | return JsonConvert.SerializeObject(this); 24 | } 25 | } -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaChangeOption.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity 4 | { 5 | [JsonObject] 6 | public class AriaChangeOption 7 | { 8 | [JsonProperty("id")] 9 | public string Id { get; set; } 10 | 11 | [JsonProperty("jsonrpc")] 12 | public string Jsonrpc { get; set; } 13 | 14 | [JsonProperty("result")] 15 | public string Result { get; set; } 16 | 17 | [JsonProperty("error")] 18 | public AriaError Error { get; set; } 19 | 20 | public override string ToString() 21 | { 22 | return JsonConvert.SerializeObject(this); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaChangePosition.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity 4 | { 5 | [JsonObject] 6 | public class AriaChangePosition 7 | { 8 | [JsonProperty("id")] 9 | public string Id { get; set; } 10 | 11 | [JsonProperty("jsonrpc")] 12 | public string Jsonrpc { get; set; } 13 | 14 | [JsonProperty("result")] 15 | public int Result { get; set; } 16 | 17 | [JsonProperty("error")] 18 | public AriaError Error { get; set; } 19 | 20 | public override string ToString() 21 | { 22 | return JsonConvert.SerializeObject(this); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaChangeUri.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System.Collections.Generic; 3 | 4 | namespace DownKyi.Core.Aria2cNet.Client.Entity 5 | { 6 | [JsonObject] 7 | public class AriaChangeUri 8 | { 9 | [JsonProperty("id")] 10 | public string Id { get; set; } 11 | 12 | [JsonProperty("jsonrpc")] 13 | public string Jsonrpc { get; set; } 14 | 15 | [JsonProperty("result")] 16 | public List Result { get; set; } 17 | 18 | [JsonProperty("error")] 19 | public AriaError Error { get; set; } 20 | 21 | public override string ToString() 22 | { 23 | return JsonConvert.SerializeObject(this); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaError.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity; 4 | 5 | //"error": { 6 | // "code": 1, 7 | // "message": "Unauthorized" 8 | //} 9 | [JsonObject] 10 | public class AriaError 11 | { 12 | [JsonProperty("code")] public int Code { get; set; } 13 | 14 | [JsonProperty("message")] public string Message { get; set; } 15 | 16 | public override string ToString() 17 | { 18 | return JsonConvert.SerializeObject(this); 19 | } 20 | } -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaGetFiles.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System.Collections.Generic; 3 | 4 | namespace DownKyi.Core.Aria2cNet.Client.Entity 5 | { 6 | [JsonObject] 7 | public class AriaGetFiles 8 | { 9 | [JsonProperty("id")] 10 | public string Id { get; set; } 11 | 12 | [JsonProperty("jsonrpc")] 13 | public string Jsonrpc { get; set; } 14 | 15 | [JsonProperty("result")] 16 | public List Result { get; set; } 17 | 18 | [JsonProperty("error")] 19 | public AriaError Error { get; set; } 20 | 21 | public override string ToString() 22 | { 23 | return JsonConvert.SerializeObject(this); 24 | } 25 | } 26 | 27 | [JsonObject] 28 | public class AriaGetFilesResult 29 | { 30 | [JsonProperty("completedLength")] 31 | public string CompletedLength { get; set; } 32 | 33 | [JsonProperty("index")] 34 | public string Index { get; set; } 35 | 36 | [JsonProperty("length")] 37 | public string Length { get; set; } 38 | 39 | [JsonProperty("path")] 40 | public string Path { get; set; } 41 | 42 | [JsonProperty("selected")] 43 | public string Selected { get; set; } 44 | 45 | [JsonProperty("uris")] 46 | public List Uris { get; set; } 47 | 48 | public override string ToString() 49 | { 50 | return JsonConvert.SerializeObject(this); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaGetOption.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity 4 | { 5 | [JsonObject] 6 | public class AriaGetOption 7 | { 8 | [JsonProperty("id")] 9 | public string Id { get; set; } 10 | 11 | [JsonProperty("jsonrpc")] 12 | public string Jsonrpc { get; set; } 13 | 14 | [JsonProperty("result")] 15 | public AriaOption Result { get; set; } 16 | 17 | [JsonProperty("error")] 18 | public AriaError Error { get; set; } 19 | 20 | public override string ToString() 21 | { 22 | return JsonConvert.SerializeObject(this); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaGetSessionInfo.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity 4 | { 5 | [JsonObject] 6 | public class AriaGetSessionInfo 7 | { 8 | [JsonProperty("id")] 9 | public string Id { get; set; } 10 | 11 | [JsonProperty("jsonrpc")] 12 | public string Jsonrpc { get; set; } 13 | 14 | [JsonProperty("result")] 15 | public AriaGetSessionInfoResult Result { get; set; } 16 | 17 | [JsonProperty("error")] 18 | public AriaError Error { get; set; } 19 | 20 | public override string ToString() 21 | { 22 | return JsonConvert.SerializeObject(this); 23 | } 24 | } 25 | 26 | [JsonObject] 27 | public class AriaGetSessionInfoResult 28 | { 29 | [JsonProperty("sessionId")] 30 | public string SessionId { get; set; } 31 | 32 | public override string ToString() 33 | { 34 | return JsonConvert.SerializeObject(this); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaGetUris.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System.Collections.Generic; 3 | 4 | namespace DownKyi.Core.Aria2cNet.Client.Entity 5 | { 6 | [JsonObject] 7 | public class AriaGetUris 8 | { 9 | [JsonProperty("id")] 10 | public string Id { get; set; } 11 | 12 | [JsonProperty("jsonrpc")] 13 | public string Jsonrpc { get; set; } 14 | 15 | [JsonProperty("result")] 16 | public List Result { get; set; } 17 | 18 | [JsonProperty("error")] 19 | public AriaError Error { get; set; } 20 | 21 | public override string ToString() 22 | { 23 | return JsonConvert.SerializeObject(this); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaPause.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity 4 | { 5 | [JsonObject] 6 | public class AriaPause 7 | { 8 | [JsonProperty("id")] 9 | public string Id { get; set; } 10 | 11 | [JsonProperty("jsonrpc")] 12 | public string Jsonrpc { get; set; } 13 | 14 | [JsonProperty("result")] 15 | public string Result { get; set; } 16 | 17 | [JsonProperty("error")] 18 | public AriaError Error { get; set; } 19 | 20 | public override string ToString() 21 | { 22 | return JsonConvert.SerializeObject(this); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaRemove.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity 4 | { 5 | [JsonObject] 6 | public class AriaRemove 7 | { 8 | [JsonProperty("id")] 9 | public string Id { get; set; } 10 | 11 | [JsonProperty("jsonrpc")] 12 | public string Jsonrpc { get; set; } 13 | 14 | [JsonProperty("result")] 15 | public string Result { get; set; } 16 | 17 | [JsonProperty("error")] 18 | public AriaError Error { get; set; } 19 | 20 | public override string ToString() 21 | { 22 | return JsonConvert.SerializeObject(this); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaSaveSession.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity 4 | { 5 | [JsonObject] 6 | public class AriaSaveSession 7 | { 8 | [JsonProperty("id")] 9 | public string Id { get; set; } 10 | 11 | [JsonProperty("jsonrpc")] 12 | public string Jsonrpc { get; set; } 13 | 14 | [JsonProperty("result")] 15 | public string Result { get; set; } 16 | 17 | [JsonProperty("error")] 18 | public AriaError Error { get; set; } 19 | 20 | public override string ToString() 21 | { 22 | return JsonConvert.SerializeObject(this); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaSendData.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System.Collections.Generic; 3 | 4 | namespace DownKyi.Core.Aria2cNet.Client.Entity 5 | { 6 | [JsonObject] 7 | public class AriaSendData 8 | { 9 | [JsonProperty("id")] 10 | public string Id { get; set; } 11 | 12 | [JsonProperty("jsonrpc")] 13 | public string Jsonrpc { get; set; } 14 | 15 | [JsonProperty("method")] 16 | public string Method { get; set; } 17 | 18 | [JsonProperty("params")] 19 | public List Params { get; set; } 20 | 21 | public override string ToString() 22 | { 23 | return JsonConvert.SerializeObject(this); 24 | } 25 | } 26 | 27 | [JsonObject] 28 | public class AriaSendOption 29 | { 30 | [JsonProperty("all-proxy")] 31 | public string HttpProxy { get; set; } 32 | 33 | [JsonProperty("out")] 34 | public string Out { get; set; } 35 | 36 | [JsonProperty("dir")] 37 | public string Dir { get; set; } 38 | 39 | //[JsonProperty("header")] 40 | //public string Header { get; set; } 41 | 42 | //[JsonProperty("use-head")] 43 | //public string UseHead { get; set; } 44 | 45 | [JsonProperty("user-agent")] 46 | public string UserAgent { get; set; } 47 | 48 | public override string ToString() 49 | { 50 | return JsonConvert.SerializeObject(this); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaShutdown.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity 4 | { 5 | [JsonObject] 6 | public class AriaShutdown 7 | { 8 | [JsonProperty("id")] 9 | public string Id { get; set; } 10 | 11 | [JsonProperty("jsonrpc")] 12 | public string Jsonrpc { get; set; } 13 | 14 | [JsonProperty("result")] 15 | public string Result { get; set; } 16 | 17 | [JsonProperty("error")] 18 | public AriaError Error { get; set; } 19 | 20 | public override string ToString() 21 | { 22 | return JsonConvert.SerializeObject(this); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaUri.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity; 4 | 5 | [JsonObject] 6 | public class AriaUri 7 | { 8 | [JsonProperty("status")] public string Status { get; set; } 9 | 10 | [JsonProperty("uri")] public string Uri { get; set; } 11 | 12 | public override string ToString() 13 | { 14 | return JsonConvert.SerializeObject(this); 15 | } 16 | } -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/AriaVersion.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity; 4 | 5 | [JsonObject] 6 | public class AriaVersion 7 | { 8 | [JsonProperty("id")] public string Id { get; set; } 9 | 10 | [JsonProperty("jsonrpc")] public string Jsonrpc { get; set; } 11 | 12 | [JsonProperty("result")] public AriaVersionResult Result { get; set; } 13 | 14 | [JsonProperty("error")] public AriaError Error { get; set; } 15 | 16 | public override string ToString() 17 | { 18 | return JsonConvert.SerializeObject(this); 19 | } 20 | } 21 | 22 | [JsonObject] 23 | public class AriaVersionResult 24 | { 25 | [JsonProperty("enabledFeatures")] public List EnabledFeatures { get; set; } 26 | 27 | [JsonProperty("version")] public string Version { get; set; } 28 | 29 | public override string ToString() 30 | { 31 | return JsonConvert.SerializeObject(this); 32 | } 33 | } -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/SystemListMethods.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity; 4 | 5 | [JsonObject] 6 | public class SystemListMethods 7 | { 8 | [JsonProperty("id")] public string Id { get; set; } 9 | 10 | [JsonProperty("jsonrpc")] public string Jsonrpc { get; set; } 11 | 12 | [JsonProperty("result")] public List Result { get; set; } 13 | 14 | [JsonProperty("error")] public AriaError Error { get; set; } 15 | 16 | public override string ToString() 17 | { 18 | return JsonConvert.SerializeObject(this); 19 | } 20 | } -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/SystemListNotifications.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity; 4 | 5 | [JsonObject] 6 | public class SystemListNotifications 7 | { 8 | [JsonProperty("id")] public string Id { get; set; } 9 | 10 | [JsonProperty("jsonrpc")] public string Jsonrpc { get; set; } 11 | 12 | [JsonProperty("result")] public List Result { get; set; } 13 | 14 | [JsonProperty("error")] public AriaError Error { get; set; } 15 | 16 | public override string ToString() 17 | { 18 | return JsonConvert.SerializeObject(this); 19 | } 20 | } -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/SystemMulticall.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity; 4 | 5 | [JsonObject] 6 | public class SystemMulticall 7 | { 8 | [JsonProperty("id")] public string Id { get; set; } 9 | 10 | [JsonProperty("jsonrpc")] public string Jsonrpc { get; set; } 11 | 12 | [JsonProperty("result")] public string Result { get; set; } 13 | 14 | [JsonProperty("error")] public AriaError Error { get; set; } 15 | 16 | public override string ToString() 17 | { 18 | return JsonConvert.SerializeObject(this); 19 | } 20 | } -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/Entity/SystemMulticallMathod.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.Aria2cNet.Client.Entity; 4 | 5 | [JsonObject] 6 | public class SystemMulticallMathod 7 | { 8 | [JsonProperty("method")] public string Method { get; set; } 9 | 10 | [JsonProperty("params")] public List Params { get; set; } 11 | } -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Client/HowChangePosition.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Aria2cNet.Client; 2 | 3 | /// 4 | /// changePosition函数的how参数 5 | /// 6 | public enum HowChangePosition 7 | { 8 | POS_SET = 1, 9 | POS_CUR, 10 | POS_END 11 | } -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/DownloadResult.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Aria2cNet; 2 | 3 | /// 4 | /// 下载状态 5 | /// 6 | public enum DownloadResult 7 | { 8 | SUCCESS = 1, 9 | FAILED, 10 | ABORT 11 | } -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Server/AriaConfig.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Aria2cNet.Server; 2 | 3 | /// 4 | /// Aria服务器的启动配置 5 | /// 6 | public class AriaConfig 7 | { 8 | public int ListenPort { get; set; } // 服务器端口号,取值:1024-65535 9 | public string Token { get; set; } // 连接服务器的token 10 | public AriaConfigLogLevel LogLevel { get; set; } // 日志等级,debug info notice warn error 11 | public int MaxConcurrentDownloads { get; set; } // 最大同时下载数(任务数),取值:1-* 12 | public int MaxConnectionPerServer { get; set; } // 同服务器连接数,取值:1-16 13 | 14 | public int Split { get; set; } // 单文件最大线程数,取值:1-* 15 | 16 | //public int MaxTries { get; set; } //当服务器返回503错误时,尝试重连;尝试重连次数,0代表无限,默认:5 17 | public int MinSplitSize { get; set; } // 最小文件分片大小, 下载线程数上限取决于能分出多少片, 对于小文件重要,单位MB 18 | public long MaxOverallDownloadLimit { get; set; } // 下载速度限制,取值:1-* 19 | public long MaxDownloadLimit { get; set; } // 下载单文件速度限制,取值:1-* 20 | public bool ContinueDownload { get; set; } // 断点续传 21 | public AriaConfigFileAllocation FileAllocation { get; set; } // 文件预分配, none prealloc 22 | 23 | public List Headers { get; set; } 24 | } -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Server/AriaConfigFileAllocation.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Aria2cNet.Server; 2 | 3 | /// 4 | /// 文件预分配 5 | /// 6 | public enum AriaConfigFileAllocation 7 | { 8 | NOT_SET = 0, 9 | NONE = 1, // 没有预分配 10 | PREALLOC, // 预分配,默认 11 | FALLOC // NTFS建议使用 12 | } -------------------------------------------------------------------------------- /DownKyi.Core/Aria2cNet/Server/AriaConfigLogLevel.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Aria2cNet.Server; 2 | 3 | /// 4 | /// 日志等级 5 | /// 6 | public enum AriaConfigLogLevel 7 | { 8 | NOT_SET = 0, 9 | DEBUG = 1, 10 | INFO, 11 | NOTICE, 12 | WARN, 13 | ERROR 14 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Bangumi/BangumiType.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.BiliApi.Bangumi; 2 | 3 | public static class BangumiType 4 | { 5 | public static readonly Dictionary Type = new() 6 | { 7 | { 1, "Anime" }, 8 | { 2, "Movie" }, 9 | { 3, "Documentary" }, 10 | { 4, "Guochuang" }, 11 | { 5, "TV" }, 12 | { 6, "Unknown" }, 13 | { 7, "Entertainment" }, 14 | { 8, "Unknown" }, 15 | { 9, "Unknown" }, 16 | { 10, "Unknown" } 17 | }; 18 | 19 | public static readonly Dictionary TypeId = new() 20 | { 21 | { 1, 13 }, 22 | { 2, 23 }, 23 | { 3, 177 }, 24 | { 4, 167 }, 25 | { 5, 11 }, 26 | { 6, -1 }, 27 | { 7, -1 }, 28 | { 8, -1 }, 29 | { 9, -1 }, 30 | { 10, -1 } 31 | }; 32 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Bangumi/Models/BangumiArea.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Bangumi.Models; 5 | 6 | public class BangumiArea : BaseModel 7 | { 8 | [JsonProperty("id")] public int Id { get; set; } 9 | [JsonProperty("name")] public string Name { get; set; } 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Bangumi/Models/BangumiEpisode.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Bangumi.Models; 5 | 6 | public class BangumiEpisode : BaseModel 7 | { 8 | [JsonProperty("aid")] public long Aid { get; set; } 9 | 10 | [JsonProperty("badge")] public string Badge { get; set; } 11 | 12 | // badge_info 13 | // badge_type 14 | [JsonProperty("bvid")] public string Bvid { get; set; } 15 | [JsonProperty("cid")] public long Cid { get; set; } 16 | [JsonProperty("cover")] public string Cover { get; set; } 17 | [JsonProperty("dimension")] public Dimension Dimension { get; set; } 18 | [JsonProperty("duration")] public long Duration { get; set; } 19 | [JsonProperty("from")] public string From { get; set; } 20 | [JsonProperty("id")] public long Id { get; set; } 21 | [JsonProperty("link")] public string Link { get; set; } 22 | [JsonProperty("long_title")] public string LongTitle { get; set; } 23 | 24 | [JsonProperty("pub_time")] public long PubTime { get; set; } 25 | 26 | // pv 27 | // release_date 28 | // rights 29 | [JsonProperty("share_copy")] public string ShareCopy { get; set; } 30 | [JsonProperty("share_url")] public string ShareUrl { get; set; } 31 | 32 | [JsonProperty("short_link")] public string ShortLink { get; set; } 33 | 34 | // stat 35 | [JsonProperty("status")] public int Status { get; set; } 36 | [JsonProperty("subtitle")] public string Subtitle { get; set; } 37 | [JsonProperty("title")] public string Title { get; set; } 38 | [JsonProperty("vid")] public string Vid { get; set; } 39 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Bangumi/Models/BangumiMedia.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Bangumi.Models; 5 | 6 | // https://api.bilibili.com/pgc/review/user 7 | public class BangumiMediaOrigin : BaseModel 8 | { 9 | //[JsonProperty("code")] 10 | //public int Code { get; set; } 11 | //[JsonProperty("message")] 12 | //public string Message { get; set; } 13 | //[JsonProperty("ttl")] 14 | //public int Ttl { get; set; } 15 | [JsonProperty("result")] public BangumiMediaData Result { get; set; } 16 | } 17 | 18 | public class BangumiMediaData : BaseModel 19 | { 20 | [JsonProperty("media")] public BangumiMedia Media { get; set; } 21 | } 22 | 23 | public class BangumiMedia : BaseModel 24 | { 25 | [JsonProperty("areas")] public List Areas { get; set; } 26 | [JsonProperty("cover")] public string Cover { get; set; } 27 | 28 | [JsonProperty("media_id")] public long MediaId { get; set; } 29 | 30 | // new_ep 31 | // rating 32 | [JsonProperty("season_id")] public long SeasonId { get; set; } 33 | [JsonProperty("share_url")] public string ShareUrl { get; set; } 34 | [JsonProperty("title")] public string Title { get; set; } 35 | [JsonProperty("type_name")] public string TypeName { get; set; } 36 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Bangumi/Models/BangumiPositive.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Bangumi.Models; 5 | 6 | public class BangumiPositive : BaseModel 7 | { 8 | [JsonProperty("id")] public long Id { get; set; } 9 | [JsonProperty("title")] public string Title { get; set; } 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Bangumi/Models/BangumiSeasonInfo.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Bangumi.Models; 5 | 6 | public class BangumiSeasonInfo : BaseModel 7 | { 8 | [JsonProperty("badge")] public string Badge { get; set; } 9 | 10 | // badge_info 11 | // badge_type 12 | [JsonProperty("cover")] public string Cover { get; set; } 13 | 14 | [JsonProperty("media_id")] public long MediaId { get; set; } 15 | 16 | // new_ep 17 | [JsonProperty("season_id")] public long SeasonId { get; set; } 18 | [JsonProperty("season_title")] public string SeasonTitle { get; set; } 19 | 20 | [JsonProperty("season_type")] public int SeasonType { get; set; } 21 | // stat 22 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Bangumi/Models/BangumiSection.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Bangumi.Models; 5 | 6 | public class BangumiSection : BaseModel 7 | { 8 | [JsonProperty("episode_id")] public long EpisodeId { get; set; } 9 | [JsonProperty("episodes")] public List Episodes { get; set; } 10 | [JsonProperty("id")] public long Id { get; set; } 11 | [JsonProperty("title")] public string Title { get; set; } 12 | [JsonProperty("type")] public int Type { get; set; } 13 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Bangumi/Models/BangumiStat.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Bangumi.Models; 5 | 6 | public class BangumiStat : BaseModel 7 | { 8 | [JsonProperty("coins")] public long Coins { get; set; } 9 | [JsonProperty("danmakus")] public long Danmakus { get; set; } 10 | [JsonProperty("favorite")] public long Favorite { get; set; } 11 | [JsonProperty("favorites")] public long Favorites { get; set; } 12 | [JsonProperty("likes")] public long Likes { get; set; } 13 | [JsonProperty("reply")] public long Reply { get; set; } 14 | [JsonProperty("share")] public long Share { get; set; } 15 | [JsonProperty("views")] public long Views { get; set; } 16 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Bangumi/Models/BangumiUpInfo.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Bangumi.Models; 5 | 6 | public class BangumiUpInfo : BaseModel 7 | { 8 | [JsonProperty("avatar")] public string Avatar { get; set; } 9 | 10 | // follower 11 | // is_follow 12 | [JsonProperty("mid")] public long Mid { get; set; } 13 | 14 | // pendant 15 | // theme_type 16 | [JsonProperty("uname")] public string Name { get; set; } 17 | // verify_type 18 | // vip_status 19 | // vip_type 20 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/BiliUtils/Quality.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.BiliApi.BiliUtils; 2 | 3 | [Serializable] 4 | public class Quality 5 | { 6 | public string Name { get; set; } 7 | public int Id { get; set; } 8 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/BiliUtils/VideoParseType.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.BiliApi.BiliUtils; 2 | 3 | public class VideoParseType 4 | { 5 | public string? Name { get; set; } 6 | public int? Id { get; set; } 7 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Cheese/Models/CheeseBrief.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Cheese.Models; 5 | 6 | public class CheeseBrief : BaseModel 7 | { 8 | // content 9 | [JsonProperty("img")] public List Img { get; set; } 10 | [JsonProperty("title")] public string Title { get; set; } 11 | [JsonProperty("type")] public int Type { get; set; } 12 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Cheese/Models/CheeseEpisode.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Cheese.Models; 5 | 6 | public class CheeseEpisode : BaseModel 7 | { 8 | [JsonProperty("aid")] public long Aid { get; set; } 9 | [JsonProperty("catalogue_index")] public int CatalogueIndex { get; set; } 10 | [JsonProperty("cid")] public long Cid { get; set; } 11 | [JsonProperty("cover")] public string Cover { get; set; } 12 | [JsonProperty("duration")] public long Duration { get; set; } 13 | [JsonProperty("from")] public string From { get; set; } 14 | [JsonProperty("id")] public long Id { get; set; } 15 | [JsonProperty("index")] public int Index { get; set; } 16 | [JsonProperty("page")] public int Page { get; set; } 17 | [JsonProperty("play")] public long Play { get; set; } 18 | [JsonProperty("play_way")] public int PlayWay { get; set; } 19 | [JsonProperty("play_way_format")] public string PlayWayFormat { get; set; } 20 | [JsonProperty("release_date")] public long ReleaseDate { get; set; } 21 | [JsonProperty("status")] public int Status { get; set; } 22 | [JsonProperty("title")] public string Title { get; set; } 23 | [JsonProperty("watched")] public bool Watched { get; set; } 24 | [JsonProperty("watchedHistory")] public int WatchedHistory { get; set; } 25 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Cheese/Models/CheeseEpisodeList.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Cheese.Models; 5 | 6 | // https://api.bilibili.com/pugv/view/web/ep/list 7 | public class CheeseEpisodeListOrigin : BaseModel 8 | { 9 | //[JsonProperty("code")] 10 | //public int Code { get; set; } 11 | //[JsonProperty("message")] 12 | //public string Message { get; set; } 13 | [JsonProperty("data")] public CheeseEpisodeList Data { get; set; } 14 | } 15 | 16 | public class CheeseEpisodeList : BaseModel 17 | { 18 | [JsonProperty("items")] public List Items { get; set; } 19 | [JsonProperty("page")] public CheeseEpisodePage Page { get; set; } 20 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Cheese/Models/CheeseEpisodePage.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Cheese.Models; 5 | 6 | public class CheeseEpisodePage : BaseModel 7 | { 8 | [JsonProperty("next")] public bool Next { get; set; } 9 | [JsonProperty("num")] public int Num { get; set; } 10 | [JsonProperty("size")] public int Size { get; set; } 11 | [JsonProperty("total")] public int Total { get; set; } 12 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Cheese/Models/CheeseImg.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Cheese.Models; 5 | 6 | public class CheeseImg : BaseModel 7 | { 8 | [JsonProperty("aspect_ratio")] public double AspectRatio { get; set; } 9 | [JsonProperty("url")] public string Url { get; set; } 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Cheese/Models/CheeseStat.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Cheese.Models; 5 | 6 | public class CheeseStat : BaseModel 7 | { 8 | [JsonProperty("play")] public long Play { get; set; } 9 | [JsonProperty("play_desc")] public string PlayDesc { get; set; } 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Cheese/Models/CheeseUpInfo.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Cheese.Models; 5 | 6 | public class CheeseUpInfo : BaseModel 7 | { 8 | [JsonProperty("avatar")] public string Avatar { get; set; } 9 | [JsonProperty("brief")] public string Brief { get; set; } 10 | [JsonProperty("follower")] public long Follower { get; set; } 11 | [JsonProperty("is_follow")] public int IsFollow { get; set; } 12 | [JsonProperty("link")] public string Link { get; set; } 13 | [JsonProperty("mid")] public long Mid { get; set; } 14 | [JsonProperty("uname")] public string Name { get; set; } 15 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Danmaku/Models/BiliDanmaku.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.BiliApi.Danmaku.Models; 2 | 3 | public class BiliDanmaku 4 | { 5 | public long Id { get; set; } //弹幕dmID 6 | public int Progress { get; set; } //出现时间 7 | public int Mode { get; set; } //弹幕类型 8 | public int Fontsize { get; set; } //文字大小 9 | public uint Color { get; set; } //弹幕颜色 10 | public string MidHash { get; set; } //发送者UID的HASH 11 | public string Content { get; set; } //弹幕内容 12 | public long Ctime { get; set; } //发送时间 13 | 14 | public int Weight { get; set; } //权重 15 | 16 | //public string Action { get; set; } //动作? 17 | public int Pool { get; set; } //弹幕池 18 | 19 | public override string ToString() 20 | { 21 | string separator = "\n"; 22 | return $"id: {Id}{separator}" + 23 | $"progress: {Progress}{separator}" + 24 | $"mode: {Mode}{separator}" + 25 | $"fontsize: {Fontsize}{separator}" + 26 | $"color: {Color}{separator}" + 27 | $"midHash: {MidHash}{separator}" + 28 | $"content: {Content}{separator}" + 29 | $"ctime: {Ctime}{separator}" + 30 | $"weight: {Weight}{separator}" + 31 | //$"action: {Action}{separator}" + 32 | $"pool: {Pool}"; 33 | } 34 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Favorites/Models/FavStatus.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Favorites.Models; 5 | 6 | public class FavStatus : BaseModel 7 | { 8 | [JsonProperty("collect")] public long Collect { get; set; } 9 | [JsonProperty("play")] public long Play { get; set; } 10 | [JsonProperty("thumb_up")] public long ThumbUp { get; set; } 11 | [JsonProperty("share")] public long Share { get; set; } 12 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Favorites/Models/FavUpper.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Favorites.Models; 5 | 6 | public class FavUpper : BaseModel 7 | { 8 | [JsonProperty("mid")] public long Mid { get; set; } 9 | [JsonProperty("name")] public string Name { get; set; } 10 | [JsonProperty("face")] public string Face { get; set; } 11 | 12 | [JsonProperty("followed")] public bool Followed { get; set; } 13 | // vip_type 14 | // vip_statue 15 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Favorites/Models/FavoritesList.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Favorites.Models; 5 | 6 | // https://api.bilibili.com/x/v3/fav/folder/collected/list 7 | public class FavoritesListOrigin : BaseModel 8 | { 9 | //[JsonProperty("code")] 10 | //public int Code { get; set; } 11 | //[JsonProperty("message")] 12 | //public string Message { get; set; } 13 | //[JsonProperty("ttl")] 14 | //public int Ttl { get; set; } 15 | [JsonProperty("data")] public FavoritesList Data { get; set; } 16 | } 17 | 18 | public class FavoritesList : BaseModel 19 | { 20 | [JsonProperty("count")] public int Count { get; set; } 21 | 22 | [JsonProperty("list")] public List List { get; set; } 23 | //[JsonProperty("has_more")] 24 | //public bool HasMore { get; set; } 25 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Favorites/Models/FavoritesMedia.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Favorites.Models; 5 | 6 | public class FavoritesMedia : BaseModel 7 | { 8 | [JsonProperty("id")] public long Id { get; set; } 9 | [JsonProperty("type")] public int Type { get; set; } 10 | [JsonProperty("title")] public string Title { get; set; } 11 | [JsonProperty("cover")] public string Cover { get; set; } 12 | [JsonProperty("intro")] public string Intro { get; set; } 13 | [JsonProperty("page")] public int Page { get; set; } 14 | [JsonProperty("duration")] public long Duration { get; set; } 15 | 16 | [JsonProperty("upper")] public FavUpper Upper { get; set; } 17 | 18 | // attr 19 | [JsonProperty("cnt_info")] public MediaStatus CntInfo { get; set; } 20 | [JsonProperty("link")] public string Link { get; set; } 21 | [JsonProperty("ctime")] public long Ctime { get; set; } 22 | [JsonProperty("pubtime")] public long Pubtime { get; set; } 23 | [JsonProperty("fav_time")] public long FavTime { get; set; } 24 | [JsonProperty("bv_id")] public string BvId { get; set; } 25 | 26 | [JsonProperty("bvid")] public string Bvid { get; set; } 27 | // season 28 | // ogv 29 | // ugc 30 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Favorites/Models/FavoritesMediaId.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Favorites.Models; 5 | 6 | // https://api.bilibili.com/x/v3/fav/resource/ids 7 | public class FavoritesMediaIdOrigin : BaseModel 8 | { 9 | //[JsonProperty("code")] 10 | //public int Code { get; set; } 11 | //[JsonProperty("message")] 12 | //public string Message { get; set; } 13 | //[JsonProperty("ttl")] 14 | //public int Ttl { get; set; } 15 | [JsonProperty("data")] public List Data { get; set; } 16 | } 17 | 18 | public class FavoritesMediaId : BaseModel 19 | { 20 | [JsonProperty("id")] public long Id { get; set; } 21 | [JsonProperty("type")] public int Type { get; set; } 22 | [JsonProperty("bv_id")] public string BvId { get; set; } 23 | [JsonProperty("bvid")] public string Bvid { get; set; } 24 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Favorites/Models/FavoritesMediaResource.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Favorites.Models; 5 | 6 | // https://api.bilibili.com/x/v3/fav/resource/list 7 | public class FavoritesMediaResourceOrigin : BaseModel 8 | { 9 | //[JsonProperty("code")] 10 | //public int Code { get; set; } 11 | //[JsonProperty("message")] 12 | //public string Message { get; set; } 13 | //[JsonProperty("ttl")] 14 | //public int Ttl { get; set; } 15 | [JsonProperty("data")] public FavoritesMediaResource Data { get; set; } 16 | } 17 | 18 | public class FavoritesMediaResource : BaseModel 19 | { 20 | [JsonProperty("info")] public FavoritesMetaInfo Info { get; set; } 21 | [JsonProperty("medias")] public List Medias { get; set; } 22 | [JsonProperty("has_more")] public bool HasMore { get; set; } 23 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Favorites/Models/FavoritesMetaInfo.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Favorites.Models; 5 | 6 | // https://api.bilibili.com/x/v3/fav/folder/info 7 | public class FavoritesMetaInfoOrigin : BaseModel 8 | { 9 | //[JsonProperty("code")] 10 | //public int Code { get; set; } 11 | //[JsonProperty("message")] 12 | //public string Message { get; set; } 13 | //[JsonProperty("ttl")] 14 | //public int Ttl { get; set; } 15 | [JsonProperty("data")] public FavoritesMetaInfo Data { get; set; } 16 | } 17 | 18 | public class FavoritesMetaInfo : BaseModel 19 | { 20 | [JsonProperty("id")] public long Id { get; set; } 21 | [JsonProperty("fid")] public long Fid { get; set; } 22 | 23 | [JsonProperty("mid")] public long Mid { get; set; } 24 | 25 | // attr 26 | [JsonProperty("title")] public string Title { get; set; } 27 | [JsonProperty("cover")] public string Cover { get; set; } 28 | 29 | [JsonProperty("upper")] public FavUpper Upper { get; set; } 30 | 31 | // cover_type 32 | [JsonProperty("cnt_info")] public FavStatus CntInfo { get; set; } 33 | 34 | // type 35 | [JsonProperty("intro")] public string Intro { get; set; } 36 | [JsonProperty("ctime")] public long Ctime { get; set; } 37 | 38 | [JsonProperty("mtime")] public long Mtime { get; set; } 39 | 40 | // state 41 | [JsonProperty("fav_state")] public int FavState { get; set; } 42 | [JsonProperty("like_state")] public int LikeState { get; set; } 43 | [JsonProperty("media_count")] public int MediaCount { get; set; } 44 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Favorites/Models/MediaStatus.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Favorites.Models; 5 | 6 | public class MediaStatus : BaseModel 7 | { 8 | [JsonProperty("collect")] public long Collect { get; set; } 9 | [JsonProperty("play")] public long Play { get; set; } 10 | [JsonProperty("danmaku")] public long Danmaku { get; set; } 11 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/History/Models/HistoryBusiness.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.BiliApi.History.Models 2 | { 3 | public enum HistoryBusiness 4 | { 5 | ARCHIVE = 1, // 稿件 6 | PGC, // 番剧(影视) 7 | LIVE, // 直播 8 | ARTICLE_LIST, // 文集 9 | ARTICLE, // 文章 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/History/Models/HistoryCursor.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.History.Models 5 | { 6 | public class HistoryCursor : BaseModel 7 | { 8 | [JsonProperty("max")] 9 | public long Max { get; set; } 10 | [JsonProperty("view_at")] 11 | public long ViewAt { get; set; } 12 | [JsonProperty("business")] 13 | public string Business { get; set; } 14 | [JsonProperty("ps")] 15 | public int Ps { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/History/Models/HistoryData.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | using System.Collections.Generic; 4 | 5 | namespace DownKyi.Core.BiliApi.History.Models 6 | { 7 | // https://api.bilibili.com/x/web-interface/history/cursor?max={startId}&view_at={startTime}&ps={ps}&business={businessStr} 8 | public class HistoryOrigin : BaseModel 9 | { 10 | //[JsonProperty("code")] 11 | //public int Code { get; set; } 12 | //[JsonProperty("message")] 13 | //public string Message { get; set; } 14 | //[JsonProperty("ttl")] 15 | //public int Ttl { get; set; } 16 | [JsonProperty("data")] 17 | public HistoryData Data { get; set; } 18 | } 19 | 20 | public class HistoryData : BaseModel 21 | { 22 | [JsonProperty("cursor")] 23 | public HistoryCursor Cursor { get; set; } 24 | //public List tab { get; set; } 25 | [JsonProperty("list")] 26 | public List List { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/History/Models/HistoryList.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.History.Models 5 | { 6 | public class HistoryList : BaseModel 7 | { 8 | [JsonProperty("title")] 9 | public string Title { get; set; } 10 | // long_title 11 | [JsonProperty("cover")] 12 | public string Cover { get; set; } 13 | // covers 14 | [JsonProperty("uri")] 15 | public string Uri { get; set; } 16 | [JsonProperty("history")] 17 | public HistoryListHistory History { get; set; } 18 | [JsonProperty("videos")] 19 | public int Videos { get; set; } 20 | [JsonProperty("author_name")] 21 | public string AuthorName { get; set; } 22 | [JsonProperty("author_face")] 23 | public string AuthorFace { get; set; } 24 | [JsonProperty("author_mid")] 25 | public long AuthorMid { get; set; } 26 | [JsonProperty("view_at")] 27 | public long ViewAt { get; set; } 28 | [JsonProperty("progress")] 29 | public long Progress { get; set; } 30 | // badge 31 | [JsonProperty("show_title")] 32 | public string ShowTitle { get; set; } 33 | [JsonProperty("duration")] 34 | public long Duration { get; set; } 35 | // current 36 | // total 37 | [JsonProperty("new_desc")] 38 | public string NewDesc { get; set; } 39 | // is_finish 40 | // is_fav 41 | // kid 42 | [JsonProperty("tag_name")] 43 | public string TagName { get; set; } 44 | // live_status 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/History/Models/HistoryListHistory.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.History.Models 5 | { 6 | public class HistoryListHistory : BaseModel 7 | { 8 | [JsonProperty("oid")] 9 | public long Oid { get; set; } 10 | [JsonProperty("epid")] 11 | public long Epid { get; set; } 12 | [JsonProperty("bvid")] 13 | public string Bvid { get; set; } 14 | [JsonProperty("page")] 15 | public int Page { get; set; } 16 | [JsonProperty("cid")] 17 | public long Cid { get; set; } 18 | [JsonProperty("part")] 19 | public string Part { get; set; } 20 | [JsonProperty("business")] 21 | public string Business { get; set; } 22 | [JsonProperty("dt")] 23 | public int Dt { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/History/Models/ToViewData.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | using System.Collections.Generic; 4 | 5 | namespace DownKyi.Core.BiliApi.History.Models 6 | { 7 | // https://api.bilibili.com/x/v2/history/toview 8 | public class ToViewOrigin : BaseModel 9 | { 10 | //[JsonProperty("code")] 11 | //public int Code { get; set; } 12 | //[JsonProperty("message")] 13 | //public string Message { get; set; } 14 | //[JsonProperty("ttl")] 15 | //public int Ttl { get; set; } 16 | [JsonProperty("data")] 17 | public ToViewData Data { get; set; } 18 | } 19 | 20 | public class ToViewData : BaseModel 21 | { 22 | [JsonProperty("count")] 23 | public int Count { get; set; } 24 | [JsonProperty("list")] 25 | public List List { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/History/Models/ToViewList.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.History.Models 5 | { 6 | public class ToViewList : BaseModel 7 | { 8 | [JsonProperty("aid")] 9 | public long Aid { get; set; } 10 | // videos 11 | // tid 12 | // tname 13 | // copyright 14 | [JsonProperty("pic")] 15 | public string Pic { get; set; } 16 | [JsonProperty("title")] 17 | public string Title { get; set; } 18 | // pubdate 19 | // ctime 20 | // desc 21 | // state 22 | // duration 23 | // rights 24 | [JsonProperty("owner")] 25 | public VideoOwner Owner { get; set; } 26 | // stat 27 | // dynamic 28 | // dimension 29 | // short_link_v2 30 | // first_frame 31 | // page 32 | // count 33 | [JsonProperty("cid")] 34 | public long Cid { get; set; } 35 | // progress 36 | [JsonProperty("add_at")] 37 | public long AddAt { get; set; } 38 | [JsonProperty("bvid")] 39 | public string Bvid { get; set; } 40 | // uri 41 | // viewed 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/History/ToView.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.History.Models; 2 | using DownKyi.Core.Logging; 3 | using Newtonsoft.Json; 4 | using Console = DownKyi.Core.Utils.Debugging.Console; 5 | 6 | namespace DownKyi.Core.BiliApi.History 7 | { 8 | /// 9 | /// 稍后再看 10 | /// 11 | public static class ToView 12 | { 13 | /// 14 | /// 获取稍后再看视频列表 15 | /// 16 | /// 17 | public static List? GetToView() 18 | { 19 | const string url = "https://api.bilibili.com/x/v2/history/toview"; 20 | const string referer = "https://www.bilibili.com"; 21 | var response = WebClient.RequestWeb(url, referer); 22 | 23 | try 24 | { 25 | var toView = JsonConvert.DeserializeObject(response); 26 | if (toView == null || toView.Data == null) { return null; } 27 | return toView.Data.List; 28 | } 29 | catch (Exception e) 30 | { 31 | Console.PrintLine("GetToView()发生异常: {0}", e); 32 | LogManager.Error("ToView", e); 33 | return null; 34 | } 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Login/Models/LoginStatus.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Login.Models 5 | { 6 | [JsonObject] 7 | public class LoginStatus : BaseModel 8 | { 9 | [JsonProperty("code")] public int Code { get; set; } 10 | [JsonProperty("message")] public string Message { get; set; } 11 | 12 | [JsonProperty("data")] public LoginStatusData Data { get; set; } 13 | } 14 | 15 | [JsonObject] 16 | public class LoginStatusData : BaseModel 17 | { 18 | [JsonProperty("url")] public string Url { get; set; } 19 | [JsonProperty("refresh_token")] public string RefreshToken { get; set; } 20 | [JsonProperty("code")] public int Code { get; set; } 21 | [JsonProperty("message")] public string Message { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Login/Models/LoginUrl.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Login.Models 5 | { 6 | // https://passport.bilibili.com/qrcode/getLoginUrl 7 | [JsonObject] 8 | public class LoginUrlOrigin : BaseModel 9 | { 10 | //public int code { get; set; } 11 | [JsonProperty("data")] public LoginUrl? Data { get; set; } 12 | 13 | [JsonProperty("code")] public int Code { get; set; } 14 | //public long ts { get; set; } 15 | } 16 | 17 | [JsonObject] 18 | public class LoginUrl : BaseModel 19 | { 20 | [JsonProperty("qrcode_key")] public string? QrcodeKey { get; set; } 21 | [JsonProperty("url")] public string? Url { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Models/BaseModel.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.BiliApi.Models; 4 | 5 | public abstract class BaseModel 6 | { 7 | public string ToString(string format = "") 8 | { 9 | // 设置为去掉null 10 | var jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }; 11 | 12 | switch (format) 13 | { 14 | case "": 15 | return JsonConvert.SerializeObject(this); 16 | case "F": 17 | // 整理json格式 18 | return JsonConvert.SerializeObject(this, Formatting.Indented); 19 | case "N": 20 | // 去掉null后,转换为json字符串 21 | return JsonConvert.SerializeObject(this, Formatting.None, jsonSetting); 22 | case "FN": 23 | case "NF": 24 | return JsonConvert.SerializeObject(this, Formatting.Indented, jsonSetting); 25 | default: 26 | return ToString(); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Models/Dimension.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.BiliApi.Models; 4 | 5 | public class Dimension : BaseModel 6 | { 7 | [JsonProperty("width")] public int Width { get; set; } 8 | [JsonProperty("height")] public int Height { get; set; } 9 | [JsonProperty("rotate")] public int Rotate { get; set; } 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Models/Json/SubRipText.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.BiliApi.Models.Json; 4 | 5 | public class SubRipText : BaseModel 6 | { 7 | [JsonProperty("lan")] public string Lan { get; set; } 8 | [JsonProperty("lan_doc")] public string LanDoc { get; set; } 9 | [JsonProperty("srtString")] public string SrtString { get; set; } 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Models/Json/Subtitle.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.BiliApi.Models.Json; 4 | 5 | public class Subtitle : BaseModel 6 | { 7 | [JsonProperty("from")] public float From { get; set; } 8 | [JsonProperty("to")] public float To { get; set; } 9 | [JsonProperty("location")] public int Location { get; set; } 10 | [JsonProperty("content")] public string Content { get; set; } 11 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Models/VideoOwner.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace DownKyi.Core.BiliApi.Models; 4 | 5 | public class VideoOwner : BaseModel 6 | { 7 | [JsonProperty("mid")] public long Mid { get; set; } 8 | [JsonProperty("name")] public string Name { get; set; } 9 | [JsonProperty("face")] public string Face { get; set; } 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/BangumiFollowAreas.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class BangumiFollowAreas : BaseModel 7 | { 8 | [JsonProperty("id")] public int Id { get; set; } 9 | [JsonProperty("name")] public string Name { get; set; } 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/BangumiFollowNewEp.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class BangumiFollowNewEp : BaseModel 7 | { 8 | [JsonProperty("id")] public long Id { get; set; } 9 | [JsonProperty("index_show")] public string IndexShow { get; set; } 10 | [JsonProperty("cover")] public string Cover { get; set; } 11 | [JsonProperty("title")] public string Title { get; set; } 12 | [JsonProperty("long_title")] public string LongTitle { get; set; } 13 | [JsonProperty("pub_time")] public string PubTime { get; set; } 14 | [JsonProperty("duration")] public long Duration { get; set; } 15 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/BangumiFollowOrigin.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/x/space/bangumi/follow/list?vmid={mid}&type={type:D}&pn={pn}&ps={ps} 7 | public class BangumiFollowOrigin : BaseModel 8 | { 9 | [JsonProperty("data")] public BangumiFollowData Data { get; set; } 10 | } 11 | 12 | public class BangumiFollowData : BaseModel 13 | { 14 | [JsonProperty("list")] public List List { get; set; } 15 | [JsonProperty("pn")] public int Pn { get; set; } 16 | [JsonProperty("ps")] public int Ps { get; set; } 17 | [JsonProperty("total")] public int Total { get; set; } 18 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/BangumiType.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.BiliApi.Users.Models; 2 | 3 | public enum BangumiType 4 | { 5 | ANIME = 1, // 番剧 6 | EPISODE = 2 // 剧集、电影 7 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/FollowingGroup.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/x/relation/tags 7 | public class FollowingGroupOrigin : BaseModel 8 | { 9 | [JsonProperty("data")] public List Data { get; set; } 10 | } 11 | 12 | public class FollowingGroup : BaseModel 13 | { 14 | [JsonProperty("tagid")] public int TagId { get; set; } 15 | [JsonProperty("name")] public string Name { get; set; } 16 | [JsonProperty("count")] public int Count { get; set; } 17 | [JsonProperty("tip")] public string Tip { get; set; } 18 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/FollowingGroupContent.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/x/relation/tag?tagid={tagId}&pn={pn}&ps={ps}&order_type={orderType} 7 | public class FollowingGroupContent : BaseModel 8 | { 9 | [JsonProperty("data")] public List Data { get; set; } 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/FollowingOrder.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.BiliApi.Users.Models; 2 | 3 | public enum FollowingOrder 4 | { 5 | DEFAULT = 1, // 按照关注顺序排列,默认 6 | ATTENTION // 按照最常访问排列 7 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/NicknameStatus.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/x/relation/stat?nickName={nickName} 7 | public class NicknameStatus : BaseModel 8 | { 9 | [JsonProperty("code")] public int Code { get; set; } 10 | [JsonProperty("message")] public string Message { get; set; } 11 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/PublicationOrder.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.BiliApi.Users.Models; 2 | 3 | public enum PublicationOrder 4 | { 5 | PUBDATE = 1, // 最新发布,默认 6 | CLICK, // 最多播放 7 | STOW // 最多收藏 8 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/RelationBlack.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/x/relation/blacks?pn={pn}&ps={ps} 7 | public class RelationBlack : BaseModel 8 | { 9 | [JsonProperty("data")] public List Data { get; set; } 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/RelationFollow.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/x/relation/followers?vmid={mid}&pn={pn}&ps={ps} 7 | // https://api.bilibili.com/x/relation/followings?vmid={mid}&pn={pn}&ps={ps}&order_type={orderType} 8 | public class RelationFollowOrigin : BaseModel 9 | { 10 | [JsonProperty("data")] public RelationFollow Data { get; set; } 11 | } 12 | 13 | public class RelationFollow : BaseModel 14 | { 15 | [JsonProperty("list")] public List List { get; set; } 16 | 17 | //[JsonProperty("re_version")] 18 | //public long reVersion { get; set; } 19 | [JsonProperty("total")] public int Total { get; set; } 20 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/RelationFollowInfo.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class RelationFollowInfo : BaseModel 7 | { 8 | [JsonProperty("mid")] public long Mid { get; set; } 9 | [JsonProperty("attribute")] public int Attribute { get; set; } 10 | [JsonProperty("mtime")] public long Mtime { get; set; } 11 | [JsonProperty("tag")] public List Tag { get; set; } 12 | 13 | [JsonProperty("special")] public int Special { get; set; } 14 | 15 | // contract_info 16 | [JsonProperty("uname")] public string Name { get; set; } 17 | [JsonProperty("face")] public string Face { get; set; } 18 | 19 | [JsonProperty("sign")] public string Sign { get; set; } 20 | // face_nft 21 | // official_verify 22 | // vip 23 | // nft_icon 24 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/RelationWhisper.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/x/relation/whispers?pn={pn}&ps={ps} 7 | public class RelationWhisper : BaseModel 8 | { 9 | [JsonProperty("data")] public RelationWhisperData Data { get; set; } 10 | } 11 | 12 | public class RelationWhisperData : BaseModel 13 | { 14 | [JsonProperty("list")] public List List { get; set; } 15 | // re_version 16 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceChannel.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/x/space/channel/list?mid={mid} 7 | public class SpaceChannelOrigin : BaseModel 8 | { 9 | [JsonProperty("data")] 10 | public SpaceChannel Data { get; set; } 11 | } 12 | 13 | public class SpaceChannel : BaseModel 14 | { 15 | [JsonProperty("count")] 16 | public int Count { get; set; } 17 | [JsonProperty("list")] 18 | public List List { get; set; } 19 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceChannelArchive.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class SpaceChannelArchive : BaseModel 7 | { 8 | [JsonProperty("aid")] public long Aid { get; set; } 9 | 10 | // videos 11 | [JsonProperty("tid")] public int Tid { get; set; } 12 | 13 | [JsonProperty("tname")] public string Tname { get; set; } 14 | 15 | // copyright 16 | [JsonProperty("pic")] public string Pic { get; set; } 17 | [JsonProperty("title")] public string Title { get; set; } 18 | [JsonProperty("pubdate")] public long Pubdate { get; set; } 19 | [JsonProperty("ctime")] public long Ctime { get; set; } 20 | 21 | [JsonProperty("desc")] public string Desc { get; set; } 22 | 23 | // state 24 | [JsonProperty("duration")] public long Duration { get; set; } 25 | 26 | // mission_id 27 | // rights 28 | [JsonProperty("owner")] public VideoOwner Owner { get; set; } 29 | 30 | [JsonProperty("stat")] public SpaceChannelArchiveStat Stat { get; set; } 31 | 32 | // dynamic 33 | [JsonProperty("cid")] public long Cid { get; set; } 34 | 35 | [JsonProperty("dimension")] public Dimension Dimension { get; set; } 36 | 37 | // season_id 38 | // short_link_v2 39 | [JsonProperty("bvid")] public string Bvid { get; set; } 40 | // inter_video 41 | // is_live_playback 42 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceChannelArchiveStat.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class SpaceChannelArchiveStat : BaseModel 7 | { 8 | [JsonProperty("aid")] public long Aid { get; set; } 9 | [JsonProperty("view")] public long View { get; set; } 10 | [JsonProperty("danmaku")] public long Danmaku { get; set; } 11 | [JsonProperty("reply")] public long Reply { get; set; } 12 | [JsonProperty("favorite")] public long Favorite { get; set; } 13 | [JsonProperty("coin")] public long Coin { get; set; } 14 | [JsonProperty("share")] public long Share { get; set; } 15 | [JsonProperty("now_rank")] public long NowRank { get; set; } 16 | [JsonProperty("his_rank")] public long HisRank { get; set; } 17 | [JsonProperty("like")] public long Like { get; set; } 18 | [JsonProperty("dislike")] public long Dislike { get; set; } 19 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceChannelList.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class SpaceChannelList : BaseModel 7 | { 8 | [JsonProperty("cid")] public long Cid { get; set; } 9 | [JsonProperty("mid")] public long Mid { get; set; } 10 | [JsonProperty("name")] public string Name { get; set; } 11 | [JsonProperty("intro")] public string Intro { get; set; } 12 | [JsonProperty("mtime")] public long Mtime { get; set; } 13 | [JsonProperty("count")] public int Count { get; set; } 14 | 15 | [JsonProperty("cover")] public string Cover { get; set; } 16 | // is_live_playback 17 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceChannelVideo.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/x/space/channel/video?mid={mid}&cid={cid}&pn={pn}&ps={ps} 7 | public class SpaceChannelVideoOrigin : BaseModel 8 | { 9 | [JsonProperty("data")] public SpaceChannelVideo Data { get; set; } 10 | } 11 | 12 | public class SpaceChannelVideo : BaseModel 13 | { 14 | // episodic_button 15 | [JsonProperty("list")] public SpaceChannelVideoList List { get; set; } 16 | [JsonProperty("page")] public SpaceChannelVideoPage Page { get; set; } 17 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceChannelVideoList.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class SpaceChannelVideoList : BaseModel 7 | { 8 | [JsonProperty("cid")] public long Cid { get; set; } 9 | [JsonProperty("mid")] public long Mid { get; set; } 10 | [JsonProperty("name")] public string Name { get; set; } 11 | [JsonProperty("intro")] public string Intro { get; set; } 12 | [JsonProperty("mtime")] public long Mtime { get; set; } 13 | [JsonProperty("count")] public int Count { get; set; } 14 | 15 | [JsonProperty("cover")] public string Cover { get; set; } 16 | 17 | // is_live_playback 18 | [JsonProperty("archives")] public List Archives { get; set; } 19 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceChannelVideoPage.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class SpaceChannelVideoPage : BaseModel 7 | { 8 | [JsonProperty("count")] public int Count { get; set; } 9 | [JsonProperty("num")] public int Num { get; set; } 10 | [JsonProperty("size")] public int Size { get; set; } 11 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceCheese.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class SpaceCheese : BaseModel 7 | { 8 | [JsonProperty("cover")] public string Cover { get; set; } 9 | [JsonProperty("ep_count")] public int EpCount { get; set; } 10 | [JsonProperty("link")] public string Link { get; set; } 11 | [JsonProperty("page")] public int Page { get; set; } 12 | [JsonProperty("play")] public int Play { get; set; } 13 | [JsonProperty("season_id")] public long SeasonId { get; set; } 14 | [JsonProperty("status")] public string Status { get; set; } 15 | [JsonProperty("subtitle")] public string SubTitle { get; set; } 16 | [JsonProperty("title")] public string Title { get; set; } 17 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceCheeseOrigin.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/pugv/app/web/season/page?mid={mid}&pn={pn}&ps={ps} 7 | public class SpaceCheeseOrigin : BaseModel 8 | { 9 | [JsonProperty("data")] public SpaceCheeseData Data { get; set; } 10 | } 11 | 12 | public class SpaceCheeseData : BaseModel 13 | { 14 | [JsonProperty("items")] public List Items { get; set; } 15 | [JsonProperty("page")] public SpaceCheesePage Page { get; set; } 16 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceCheesePage.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class SpaceCheesePage : BaseModel 7 | { 8 | [JsonProperty("next")] public bool Next { get; set; } 9 | [JsonProperty("num")] public int Num { get; set; } 10 | [JsonProperty("size")] public int Size { get; set; } 11 | [JsonProperty("total")] public int Total { get; set; } 12 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpacePublication.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/x/space/arc/search 7 | public class SpacePublicationOrigin : BaseModel 8 | { 9 | [JsonProperty("data")] public SpacePublication? Data { get; set; } 10 | } 11 | 12 | public class SpacePublication : BaseModel 13 | { 14 | [JsonProperty("list")] public SpacePublicationList List { get; set; } 15 | [JsonProperty("page")] public SpacePublicationPage Page { get; set; } 16 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpacePublicationList.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class SpacePublicationList : BaseModel 7 | { 8 | [JsonProperty("tlist")] public SpacePublicationListType Tlist { get; set; } 9 | [JsonProperty("vlist")] public List? Vlist { get; set; } 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpacePublicationListTypeVideoZone.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class SpacePublicationListTypeVideoZone : BaseModel 7 | { 8 | [JsonProperty("tid")] public int Tid { get; set; } 9 | [JsonProperty("count")] public int Count { get; set; } 10 | [JsonProperty("name")] public string Name { get; set; } 11 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpacePublicationPage.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class SpacePublicationPage : BaseModel 7 | { 8 | [JsonProperty("pn")] public int Pn { get; set; } 9 | [JsonProperty("ps")] public int Ps { get; set; } 10 | [JsonProperty("count")] public int Count { get; set; } 11 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceSeasonsDetail.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/x/polymer/space/seasons_archives_list?mid={mid}&season_id={seasonId}&page_num={pageNum}&page_size={pageSize}&sort_reverse=false 7 | public class SpaceSeasonsDetailOrigin : BaseModel 8 | { 9 | //[JsonProperty("code")] 10 | //public int Code { get; set; } 11 | //[JsonProperty("message")] 12 | //public string Message { get; set; } 13 | //[JsonProperty("ttl")] 14 | //public int Ttl { get; set; } 15 | [JsonProperty("data")] public SpaceSeasonsDetail Data { get; set; } 16 | } 17 | 18 | public class SpaceSeasonsDetail : BaseModel 19 | { 20 | [JsonProperty("aids")] public List Aids { get; set; } 21 | [JsonProperty("archives")] public List Archives { get; set; } 22 | [JsonProperty("meta")] public SpaceSeasonsMeta Meta { get; set; } 23 | [JsonProperty("page")] public SpaceSeasonsSeriesPage Page { get; set; } 24 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceSeasonsSeries.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class SpaceSeasons : BaseModel 7 | { 8 | [JsonProperty("archives")] public List Archives { get; set; } 9 | [JsonProperty("meta")] public SpaceSeasonsMeta Meta { get; set; } 10 | [JsonProperty("recent_aids")] public List RecentAids { get; set; } 11 | } 12 | 13 | public class SpaceSeries : BaseModel 14 | { 15 | [JsonProperty("archives")] public List Archives { get; set; } 16 | [JsonProperty("meta")] public SpaceSeriesMeta Meta { get; set; } 17 | [JsonProperty("recent_aids")] public List RecentAids { get; set; } 18 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceSeasonsSeriesArchives.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class SpaceSeasonsSeriesArchives : BaseModel 7 | { 8 | [JsonProperty("aid")] public long Aid { get; set; } 9 | [JsonProperty("bvid")] public string Bvid { get; set; } 10 | [JsonProperty("ctime")] public long Ctime { get; set; } 11 | [JsonProperty("duration")] public long Duration { get; set; } 12 | [JsonProperty("interactive_video")] public bool InteractiveVideo { get; set; } 13 | [JsonProperty("pic")] public string Pic { get; set; } 14 | [JsonProperty("pubdate")] public long Pubdate { get; set; } 15 | 16 | [JsonProperty("stat")] public SpaceSeasonsSeriesStat Stat { get; set; } 17 | 18 | // state 19 | [JsonProperty("title")] public string Title { get; set; } 20 | // ugc_pay 21 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceSeasonsSeriesMeta.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class SpaceSeasonsSeriesMeta : BaseModel 7 | { 8 | [JsonProperty("category")] public int Category { get; set; } 9 | [JsonProperty("cover")] public string Cover { get; set; } 10 | [JsonProperty("description")] public string Description { get; set; } 11 | [JsonProperty("mid")] public long Mid { get; set; } 12 | [JsonProperty("name")] public string Name { get; set; } 13 | [JsonProperty("total")] public int Total { get; set; } 14 | } 15 | 16 | public class SpaceSeasonsMeta : SpaceSeasonsSeriesMeta 17 | { 18 | [JsonProperty("ptime")] public long Ptime { get; set; } 19 | [JsonProperty("season_id")] public long SeasonId { get; set; } 20 | } 21 | 22 | public class SpaceSeriesMeta : SpaceSeasonsSeriesMeta 23 | { 24 | [JsonProperty("creator")] public string Creator { get; set; } 25 | [JsonProperty("ctime")] public long Ctime { get; set; } 26 | [JsonProperty("keywords")] public List Keywords { get; set; } 27 | [JsonProperty("last_update_ts")] public long LastUpdate { get; set; } 28 | [JsonProperty("mtime")] public long Mtime { get; set; } 29 | [JsonProperty("raw_keywords")] public string RawKeywords { get; set; } 30 | [JsonProperty("series_id")] public long SeriesId { get; set; } 31 | [JsonProperty("state")] public int State { get; set; } 32 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceSeasonsSeriesOrigin.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/x/space/channel/video?mid={mid}&page_num={pageNum}&page_size={pageSize} 7 | public class SpaceSeasonsSeriesOrigin : BaseModel 8 | { 9 | //[JsonProperty("code")] 10 | //public int Code { get; set; } 11 | //[JsonProperty("message")] 12 | //public string Message { get; set; } 13 | //[JsonProperty("ttl")] 14 | //public int Ttl { get; set; } 15 | [JsonProperty("data")] public SpaceSeasonsSeriesData Data { get; set; } 16 | } 17 | 18 | public class SpaceSeasonsSeriesData : BaseModel 19 | { 20 | [JsonProperty("items_lists")] public SpaceSeasonsSeries ItemsLists { get; set; } 21 | } 22 | 23 | public class SpaceSeasonsSeries : BaseModel 24 | { 25 | [JsonProperty("page")] public SpaceSeasonsSeriesPage Page { get; set; } 26 | [JsonProperty("seasons_list")] public List SeasonsList { get; set; } 27 | [JsonProperty("series_list")] public List SeriesList { get; set; } 28 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceSeasonsSeriesPage.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class SpaceSeasonsSeriesPage : BaseModel 7 | { 8 | [JsonProperty("page_num")] public int PageNum; 9 | [JsonProperty("page_size")] public int PageSize; 10 | [JsonProperty("total")] public int Total; 11 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceSeasonsSeriesStat.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class SpaceSeasonsSeriesStat : BaseModel 7 | { 8 | [JsonProperty("view")] public long View { get; set; } 9 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceSeriesDetail.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/x/series/archives?mid={mid}&series_id={seriesId}&only_normal=true&sort=desc&pn={pn}&ps={ps} 7 | public class SpaceSeriesDetailOrigin : BaseModel 8 | { 9 | //[JsonProperty("code")] 10 | //public int Code { get; set; } 11 | //[JsonProperty("message")] 12 | //public string Message { get; set; } 13 | //[JsonProperty("ttl")] 14 | //public int Ttl { get; set; } 15 | [JsonProperty("data")] public SpaceSeriesDetail Data { get; set; } 16 | } 17 | 18 | public class SpaceSeriesDetail : BaseModel 19 | { 20 | [JsonProperty("aids")] public List Aids { get; set; } 21 | 22 | // page 23 | [JsonProperty("archives")] public List Archives { get; set; } 24 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceSeriesMeta.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/x/series/series?series_id={seriesId} 7 | public class SpaceSeriesMetaOrigin : BaseModel 8 | { 9 | //[JsonProperty("code")] 10 | //public int Code { get; set; } 11 | //[JsonProperty("message")] 12 | //public string Message { get; set; } 13 | //[JsonProperty("ttl")] 14 | //public int Ttl { get; set; } 15 | [JsonProperty("data")] public SpaceSeriesMetaData Data { get; set; } 16 | } 17 | 18 | public class SpaceSeriesMetaData : BaseModel 19 | { 20 | [JsonProperty("meta")] public SpaceSeriesMeta Meta { get; set; } 21 | [JsonProperty("recent_aids")] public List RecentAids { get; set; } 22 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceSettings.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://space.bilibili.com/ajax/settings/getSettings?mid={mid} 7 | public class SpaceSettingsOrigin : BaseModel 8 | { 9 | [JsonProperty("status")] public bool Status { get; set; } 10 | [JsonProperty("data")] public SpaceSettings Data { get; set; } 11 | } 12 | 13 | public class SpaceSettings : BaseModel 14 | { 15 | // ... 16 | [JsonProperty("toutu")] public SpaceSettingsToutu Toutu { get; set; } 17 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/SpaceSettingsToutu.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class SpaceSettingsToutu : BaseModel 7 | { 8 | [JsonProperty("sid")] public int Sid { get; set; } 9 | [JsonProperty("expire")] public long Expire { get; set; } 10 | [JsonProperty("s_img")] public string Simg { get; set; } // 完整url为http://i0.hdslb.com/+相对路径 11 | [JsonProperty("l_img")] public string Limg { get; set; } // 完整url为http://i0.hdslb.com/+相对路径 12 | [JsonProperty("android_img")] public string AndroidImg { get; set; } 13 | [JsonProperty("iphone_img")] public string IphoneImg { get; set; } 14 | [JsonProperty("ipad_img")] public string IpadImg { get; set; } 15 | [JsonProperty("thumbnail_img")] public string ThumbnailImg { get; set; } 16 | [JsonProperty("platform")] public int Platform { get; set; } 17 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/UpStat.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/x/space/upstat?mid={mid} 7 | public class UpStatOrigin : BaseModel 8 | { 9 | [JsonProperty("data")] public UpStat Data { get; set; } 10 | } 11 | 12 | public class UpStat : BaseModel 13 | { 14 | [JsonProperty("archive")] public UpStatArchive Archive { get; set; } 15 | [JsonProperty("article")] public UpStatArchive Article { get; set; } 16 | [JsonProperty("likes")] public long Likes { get; set; } 17 | } 18 | 19 | public class UpStatArchive : BaseModel 20 | { 21 | [JsonProperty("view")] public long View { get; set; } // 视频/文章播放量 22 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/UserInfoForSpace.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/x/space/acc/info?mid={mid} 7 | public class UserInfoForSpaceOrigin : BaseModel 8 | { 9 | //[JsonProperty("code")] 10 | //public int Code { get; set; } 11 | //[JsonProperty("message")] 12 | //public string Message { get; set; } 13 | //[JsonProperty("ttl")] 14 | //public int Ttl { get; set; } 15 | [JsonProperty("data")] public UserInfoForSpace? Data { get; set; } 16 | } 17 | 18 | public class UserInfoForSpace : BaseModel 19 | { 20 | [JsonProperty("mid")] public long Mid { get; set; } 21 | [JsonProperty("name")] public string Name { get; set; } 22 | [JsonProperty("sex")] public string Sex { get; set; } 23 | 24 | [JsonProperty("face")] public string Face { get; set; } 25 | 26 | // face_nft 27 | [JsonProperty("sign")] public string Sign { get; set; } 28 | 29 | // rank 30 | [JsonProperty("level")] public int Level { get; set; } 31 | 32 | // jointime 33 | // moral 34 | // silence 35 | // coins 36 | //[JsonProperty("fans_badge")] 37 | //public bool FansBadge { get; set; } 38 | // fans_medal 39 | // official 40 | [JsonProperty("vip")] public UserInfoVip? Vip { get; set; } 41 | 42 | // pendant 43 | // nameplate 44 | // user_honour_info 45 | [JsonProperty("is_followed")] public bool IsFollowed { get; set; } 46 | 47 | [JsonProperty("top_photo")] public string TopPhoto { get; set; } 48 | // ... 49 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/UserInfoLevelExp.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class UserInfoLevelExp : BaseModel 7 | { 8 | [JsonProperty("current_level")] public int CurrentLevel { get; set; } 9 | [JsonProperty("current_min")] public int CurrentMin { get; set; } 10 | [JsonProperty("current_exp")] public int CurrentExp { get; set; } 11 | [JsonProperty("next_exp")] public int NextExp { get; set; } 12 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/UserInfoVip.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | public class UserInfoVip : BaseModel 7 | { 8 | [JsonProperty("type")] public int Type { get; set; } 9 | [JsonProperty("status")] public int Status { get; set; } 10 | 11 | [JsonProperty("due_date")] public long DueDate { get; set; } 12 | 13 | // vip_pay_type 14 | // theme_type 15 | [JsonProperty("label")] public UserInfoVipLabel? Label { get; set; } 16 | [JsonProperty("avatar_subscript")] public int AvatarSubscript { get; set; } 17 | 18 | [JsonProperty("nickname_color")] public string NicknameColor { get; set; } 19 | 20 | // role 21 | [JsonProperty("avatar_subscript_url")] public string AvatarSubscriptUrl { get; set; } 22 | } 23 | 24 | public class UserInfoVipLabel : BaseModel 25 | { 26 | // path 27 | [JsonProperty("text")] public string Text { get; set; } 28 | [JsonProperty("label_theme")] public string LabelTheme { get; set; } 29 | 30 | [JsonProperty("text_color")] public string TextColor { get; set; } 31 | // bg_style 32 | // bg_color 33 | // border_color 34 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Models/UserRelationStat.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Users.Models; 5 | 6 | // https://api.bilibili.com/x/relation/stat?vmid={mid} 7 | public class UserRelationStatOrigin : BaseModel 8 | { 9 | [JsonProperty("data")] public UserRelationStat Data { get; set; } 10 | } 11 | 12 | public class UserRelationStat : BaseModel 13 | { 14 | [JsonProperty("mid")] public long Mid { get; set; } 15 | [JsonProperty("following")] public long Following { get; set; } // 关注数 16 | [JsonProperty("whisper")] public long Whisper { get; set; } 17 | [JsonProperty("black")] public long Black { get; set; } 18 | [JsonProperty("follower")] public long Follower { get; set; } // 粉丝数 19 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Users/Nickname.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Users.Models; 2 | using DownKyi.Core.Logging; 3 | using Newtonsoft.Json; 4 | using Console = DownKyi.Core.Utils.Debugging.Console; 5 | 6 | namespace DownKyi.Core.BiliApi.Users; 7 | 8 | /// 9 | /// 用户昵称 10 | /// 11 | public class Nickname 12 | { 13 | /// 14 | /// 检查昵称 15 | /// 16 | /// 17 | /// 18 | public static NicknameStatus? CheckNickname(string nickName) 19 | { 20 | var url = $"https://api.bilibili.com/x/relation/stat?nickName={nickName}"; 21 | const string referer = "https://www.bilibili.com"; 22 | var response = WebClient.RequestWeb(url, referer); 23 | 24 | try 25 | { 26 | var nickname = JsonConvert.DeserializeObject(response); 27 | return nickname; 28 | } 29 | catch (Exception e) 30 | { 31 | Console.PrintLine("CheckNickname()发生异常: {0}", e); 32 | LogManager.Error("Nickname", e); 33 | return null; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Video/Dynamic.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Video.Models; 2 | using DownKyi.Core.Logging; 3 | using Newtonsoft.Json; 4 | using Console = DownKyi.Core.Utils.Debugging.Console; 5 | 6 | namespace DownKyi.Core.BiliApi.Video; 7 | 8 | public static class Dynamic 9 | { 10 | /// 11 | /// 获取分区最新视频列表 12 | /// 13 | /// 目标分区tid 14 | /// 页码 15 | /// 每页项数(最大50) 16 | /// 17 | public static List? RegionDynamicList(int rid, int pn = 1, int ps = 5) 18 | { 19 | var url = $"https://api.bilibili.com/x/web-interface/dynamic/region?rid={rid}&pn={pn}&ps={ps}"; 20 | const string referer = "https://www.bilibili.com"; 21 | var response = WebClient.RequestWeb(url, referer); 22 | 23 | try 24 | { 25 | var dynamic = JsonConvert.DeserializeObject(response); 26 | if (dynamic != null && dynamic.Data != null) 27 | { 28 | return dynamic.Data.Archives; 29 | } 30 | 31 | return null; 32 | } 33 | catch (Exception e) 34 | { 35 | Console.PrintLine("RegionDynamicList()发生异常: {0}", e); 36 | LogManager.Error("Dynamic", e); 37 | return null; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Video/Models/RankingVideoView.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Video.Models; 5 | 6 | public class RankingVideoView : BaseModel 7 | { 8 | [JsonProperty("aid")] public long Aid { get; set; } 9 | [JsonProperty("bvid")] public string Bvid { get; set; } 10 | [JsonProperty("typename")] public string TypeName { get; set; } 11 | [JsonProperty("title")] public string Title { get; set; } 12 | [JsonProperty("subtitle")] public string Subtitle { get; set; } 13 | [JsonProperty("play")] public long Play { get; set; } 14 | [JsonProperty("review")] public long Review { get; set; } 15 | [JsonProperty("video_review")] public long VideoReview { get; set; } 16 | [JsonProperty("favorites")] public long Favorites { get; set; } 17 | [JsonProperty("mid")] public long Mid { get; set; } 18 | [JsonProperty("author")] public string Author { get; set; } 19 | [JsonProperty("description")] public string Description { get; set; } 20 | [JsonProperty("create")] public string Create { get; set; } 21 | [JsonProperty("pic")] public string Pic { get; set; } 22 | [JsonProperty("coins")] public long Coins { get; set; } 23 | [JsonProperty("duration")] public string Duration { get; set; } 24 | [JsonProperty("badgepay")] public bool Badgepay { get; set; } 25 | [JsonProperty("pts")] public long Pts { get; set; } 26 | [JsonProperty("redirect_url")] public string RedirectUrl { get; set; } 27 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Video/Models/RegionDynamic.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Video.Models; 5 | 6 | // https://api.bilibili.com/x/web-interface/dynamic/region 7 | public class RegionDynamicOrigin : BaseModel 8 | { 9 | //[JsonProperty("code")] 10 | //public int Code { get; set; } 11 | //[JsonProperty("message")] 12 | //public string Message { get; set; } 13 | //[JsonProperty("ttl")] 14 | //public int Ttl { get; set; } 15 | [JsonProperty("data")] public RegionDynamic Data { get; set; } 16 | } 17 | 18 | public class RegionDynamic : BaseModel 19 | { 20 | [JsonProperty("archives")] public List Archives { get; set; } 21 | // page 22 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Video/Models/RegionRanking.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Video.Models; 5 | 6 | // https://api.bilibili.com/x/web-interface/ranking/region 7 | public class RegionRanking : BaseModel 8 | { 9 | //[JsonProperty("code")] 10 | //public int Code { get; set; } 11 | //[JsonProperty("message")] 12 | //public string Message { get; set; } 13 | //[JsonProperty("ttl")] 14 | //public int Ttl { get; set; } 15 | [JsonProperty("data")] public List Data { get; set; } 16 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Video/Models/UgcArc.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Video.Models; 5 | 6 | public class UgcArc : BaseModel 7 | { 8 | [JsonProperty("aid")] public long Aid { get; set; } 9 | [JsonProperty("videos")] public int Videos { get; set; } 10 | [JsonProperty("type_id")] public int TypeId { get; set; } 11 | [JsonProperty("type_name")] public string TypeName { get; set; } 12 | [JsonProperty("copyright")] public int Copyright { get; set; } 13 | [JsonProperty("pic")] public string Pic { get; set; } 14 | [JsonProperty("title")] public string Title { get; set; } 15 | [JsonProperty("pubdate")] public long Pubdate { get; set; } 16 | [JsonProperty("ctime")] public long Ctime { get; set; } 17 | [JsonProperty("desc")] public string Desc { get; set; } 18 | [JsonProperty("state")] public int State { get; set; } 19 | 20 | [JsonProperty("duration")] public long Duration { get; set; } 21 | 22 | //[JsonProperty("rights")] 23 | //public VideoRights Rights { get; set; } 24 | [JsonProperty("author")] public VideoOwner Author { get; set; } 25 | [JsonProperty("stat")] public VideoStat Stat { get; set; } 26 | [JsonProperty("dynamic")] public string Dynamic { get; set; } 27 | [JsonProperty("dimension")] public Dimension Dimension { get; set; } 28 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Video/Models/UgcEpisode.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Video.Models; 5 | 6 | public class UgcEpisode : BaseModel 7 | { 8 | [JsonProperty("season_id")] public long SeasonId { get; set; } 9 | [JsonProperty("section_id")] public long SectionId { get; set; } 10 | [JsonProperty("id")] public long Id { get; set; } 11 | [JsonProperty("aid")] public long Aid { get; set; } 12 | [JsonProperty("cid")] public long Cid { get; set; } 13 | [JsonProperty("title")] public string Title { get; set; } 14 | [JsonProperty("attribute")] public int Attribute { get; set; } 15 | [JsonProperty("arc")] public UgcArc Arc { get; set; } 16 | [JsonProperty("page")] public VideoPage Page { get; set; } 17 | 18 | [JsonProperty("pages")] public List Pages { get; set; } 19 | [JsonProperty("bvid")] public string Bvid { get; set; } 20 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Video/Models/UgcSeason.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Video.Models; 5 | 6 | public class UgcSeason : BaseModel 7 | { 8 | [JsonProperty("id")] public long Id { get; set; } 9 | [JsonProperty("title")] public string Title { get; set; } 10 | [JsonProperty("cover")] public string Cover { get; set; } 11 | [JsonProperty("mid")] public long Mid { get; set; } 12 | [JsonProperty("intro")] public string Intro { get; set; } 13 | [JsonProperty("sign_state")] public int SignState { get; set; } 14 | [JsonProperty("attribute")] public int Attribute { get; set; } 15 | [JsonProperty("sections")] public List? Sections { get; set; } 16 | [JsonProperty("stat")] public UgcStat Stat { get; set; } 17 | [JsonProperty("ep_count")] public int EpCount { get; set; } 18 | [JsonProperty("season_type")] public int SeasonType { get; set; } 19 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Video/Models/UgcSection.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Video.Models; 5 | 6 | public class UgcSection : BaseModel 7 | { 8 | [JsonProperty("season_id")] 9 | public long SeasonId { get; set; } 10 | [JsonProperty("id")] 11 | public long Id { get; set; } 12 | [JsonProperty("title")] 13 | public string Title { get; set; } 14 | [JsonProperty("type")] 15 | public int Type { get; set; } 16 | [JsonProperty("episodes")] 17 | public List Episodes { get; set; } 18 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Video/Models/UgcStat.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Video.Models; 5 | 6 | public class UgcStat : BaseModel 7 | { 8 | [JsonProperty("season_id")] public long SeasonId { get; set; } 9 | [JsonProperty("view")] public long View { get; set; } 10 | [JsonProperty("danmaku")] public long Danmaku { get; set; } 11 | [JsonProperty("reply")] public long Reply { get; set; } 12 | [JsonProperty("fav")] public long Favorite { get; set; } 13 | [JsonProperty("coin")] public long Coin { get; set; } 14 | [JsonProperty("share")] public long Share { get; set; } 15 | [JsonProperty("now_rank")] public long NowRank { get; set; } 16 | [JsonProperty("his_rank")] public long HisRank { get; set; } 17 | [JsonProperty("like")] public long Like { get; set; } 18 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Video/Models/VideoDescription.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Video.Models; 5 | 6 | // https://api.bilibili.com/x/web-interface/archive/desc 7 | public class VideoDescription : BaseModel 8 | { 9 | //[JsonProperty("code")] 10 | //public int Code { get; set; } 11 | //[JsonProperty("message")] 12 | //public string Message { get; set; } 13 | //[JsonProperty("ttl")] 14 | //public int Ttl { get; set; } 15 | [JsonProperty("data")] public string Data { get; set; } 16 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Video/Models/VideoPage.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Video.Models; 5 | 6 | public class VideoPage : BaseModel 7 | { 8 | [JsonProperty("cid")] public long Cid { get; set; } 9 | [JsonProperty("page")] public int Page { get; set; } 10 | [JsonProperty("from")] public string From { get; set; } 11 | [JsonProperty("part")] public string Part { get; set; } 12 | [JsonProperty("duration")] public long Duration { get; set; } 13 | [JsonProperty("vid")] public string Vid { get; set; } 14 | [JsonProperty("weblink")] public string Weblink { get; set; } 15 | [JsonProperty("dimension")] public Dimension Dimension { get; set; } 16 | [JsonProperty("first_frame")] public string FirstFrame { get; set; } 17 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Video/Models/VideoPagelist.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Video.Models; 5 | 6 | // https://api.bilibili.com/x/player/pagelist 7 | public class VideoPagelist : BaseModel 8 | { 9 | //[JsonProperty("code")] 10 | //public int Code { get; set; } 11 | //[JsonProperty("message")] 12 | //public string Message { get; set; } 13 | //[JsonProperty("ttl")] 14 | //public int Ttl { get; set; } 15 | [JsonProperty("data")] public List Data { get; set; } 16 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Video/Models/VideoStat.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Video.Models; 5 | 6 | public class VideoStat : BaseModel 7 | { 8 | [JsonProperty("aid")] public long Aid { get; set; } 9 | [JsonProperty("view")] public long View { get; set; } 10 | [JsonProperty("danmaku")] public long Danmaku { get; set; } 11 | [JsonProperty("reply")] public long Reply { get; set; } 12 | [JsonProperty("favorite")] public long Favorite { get; set; } 13 | [JsonProperty("coin")] public long Coin { get; set; } 14 | [JsonProperty("share")] public long Share { get; set; } 15 | [JsonProperty("now_rank")] public long NowRank { get; set; } 16 | [JsonProperty("his_rank")] public long HisRank { get; set; } 17 | [JsonProperty("like")] public long Like { get; set; } 18 | [JsonProperty("dislike")] public long Dislike { get; set; } 19 | [JsonProperty("evaluation")] public string Evaluation { get; set; } 20 | [JsonProperty("argue_msg")] public string ArgueMsg { get; set; } 21 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Video/Models/VideoSubtitle.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.Video.Models; 5 | 6 | public class VideoSubtitle : BaseModel 7 | { 8 | [JsonProperty("allow_submit")] public bool AllowSubmit { get; set; } 9 | [JsonProperty("list")] public List List { get; set; } 10 | } 11 | 12 | public class Subtitle : BaseModel 13 | { 14 | [JsonProperty("id")] public long Id { get; set; } 15 | [JsonProperty("lan")] public string Lan { get; set; } 16 | [JsonProperty("lan_doc")] public string LanDoc { get; set; } 17 | [JsonProperty("is_lock")] public bool IsLock { get; set; } 18 | [JsonProperty("author_mid")] public long AuthorMid { get; set; } 19 | [JsonProperty("subtitle_url")] public string SubtitleUrl { get; set; } 20 | [JsonProperty("author")] public SubtitleAuthor Author { get; set; } 21 | } 22 | 23 | public class SubtitleAuthor : BaseModel 24 | { 25 | [JsonProperty("mid")] public long Mid { get; set; } 26 | [JsonProperty("name")] public string Name { get; set; } 27 | [JsonProperty("sex")] public string Sex { get; set; } 28 | [JsonProperty("face")] public string Face { get; set; } 29 | 30 | [JsonProperty("sign")] public string Sign { get; set; } 31 | //[JsonProperty("rank")] 32 | //public int Rank { get; set; } 33 | //[JsonProperty("birthday")] 34 | //public int Birthday { get; set; } 35 | //[JsonProperty("is_fake_account")] 36 | //public int IsFakeAccount { get; set; } 37 | //[JsonProperty("is_deleted")] 38 | //public int IsDeleted { get; set; } 39 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Video/Ranking.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Video.Models; 2 | using DownKyi.Core.Logging; 3 | using Newtonsoft.Json; 4 | using Console = DownKyi.Core.Utils.Debugging.Console; 5 | 6 | namespace DownKyi.Core.BiliApi.Video; 7 | 8 | public static class Ranking 9 | { 10 | /// 11 | /// 获取分区视频排行榜列表 12 | /// 13 | /// 目标分区tid 14 | /// 3日榜或周榜(3/7) 15 | /// 16 | /// 17 | public static List? RegionRankingList(int rid, int day = 3, int original = 0) 18 | { 19 | var url = $"https://api.bilibili.com/x/web-interface/ranking/region?rid={rid}&day={day}&ps={original}"; 20 | const string referer = "https://www.bilibili.com"; 21 | var response = WebClient.RequestWeb(url, referer); 22 | 23 | try 24 | { 25 | var ranking = JsonConvert.DeserializeObject(response); 26 | if (ranking != null) 27 | { 28 | return ranking.Data; 29 | } 30 | 31 | return null; 32 | } 33 | catch (Exception e) 34 | { 35 | Console.PrintLine("RegionRankingList()发生异常: {0}", e); 36 | LogManager.Error("Ranking", e); 37 | return null; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/VideoStream/Models/PlayUrl.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.VideoStream.Models; 5 | 6 | public class PlayUrlOrigin : BaseModel 7 | { 8 | //[JsonProperty("code")] 9 | //public int Code { get; set; } 10 | //[JsonProperty("message")] 11 | //public string Message { get; set; } 12 | //[JsonProperty("ttl")] 13 | //public int Ttl { get; set; } 14 | [JsonProperty("data")] public PlayUrl Data { get; set; } 15 | [JsonProperty("result")] public PlayUrl Result { get; set; } 16 | } 17 | 18 | public class PlayUrl : BaseModel 19 | { 20 | // from 21 | // result 22 | // message 23 | // quality 24 | // format 25 | // timelength 26 | // accept_format 27 | [JsonProperty("accept_description")] public List AcceptDescription { get; set; } 28 | 29 | [JsonProperty("accept_quality")] public List AcceptQuality { get; set; } 30 | 31 | // video_codecid 32 | // seek_param 33 | // seek_type 34 | [JsonProperty("durl")] public List Durl { get; set; } 35 | [JsonProperty("dash")] public PlayUrlDash Dash { get; set; } 36 | 37 | [JsonProperty("support_formats")] public List SupportFormats { get; set; } 38 | // high_format 39 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/VideoStream/Models/PlayUrlDash.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.VideoStream.Models; 5 | 6 | public class PlayUrlDash : BaseModel 7 | { 8 | [JsonProperty("duration")] public long Duration { get; set; } 9 | 10 | //[JsonProperty("minBufferTime")] 11 | //public float minBufferTime { get; set; } 12 | //[JsonProperty("min_buffer_time")] 13 | //public float min_buffer_time { get; set; } 14 | [JsonProperty("video")] public List Video { get; set; } 15 | [JsonProperty("audio")] public List Audio { get; set; } 16 | [JsonProperty("dolby")] public PlayUrlDashDolby Dolby { get; set; } 17 | [JsonProperty("flac")] public PlayUrlDashFlac Flac { get; set; } 18 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/VideoStream/Models/PlayUrlDashDolby.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.VideoStream.Models; 5 | 6 | public class PlayUrlDashDolby : BaseModel 7 | { 8 | // type 9 | [JsonProperty("audio")] 10 | public List Audio { get; set; } 11 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/VideoStream/Models/PlayUrlDashFlac.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.VideoStream.Models; 5 | 6 | public class PlayUrlDashFlac : BaseModel 7 | { 8 | [JsonProperty("audio")] public PlayUrlDashVideo Audio { get; set; } 9 | //bool display { get; set; } 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/VideoStream/Models/PlayUrlDashVideo.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.VideoStream.Models; 5 | 6 | public class PlayUrlDashVideo : BaseModel 7 | { 8 | [JsonProperty("id")] public int Id { get; set; } 9 | [JsonProperty("base_url")] public string BaseUrl { get; set; } 10 | 11 | [JsonProperty("backup_url")] public List BackupUrl { get; set; } 12 | 13 | // bandwidth 14 | [JsonProperty("mimeType")] public string MimeType { get; set; } 15 | 16 | // mime_type 17 | [JsonProperty("codecs")] public string Codecs { get; set; } 18 | [JsonProperty("width")] public int Width { get; set; } 19 | [JsonProperty("height")] public int Height { get; set; } 20 | 21 | [JsonProperty("frameRate")] public string FrameRate { get; set; } 22 | 23 | // frame_rate 24 | // sar 25 | // startWithSap 26 | // start_with_sap 27 | // SegmentBase 28 | // segment_base 29 | [JsonProperty("codecid")] public int CodecId { get; set; } 30 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/VideoStream/Models/PlayUrlDurl.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.VideoStream.Models; 5 | 6 | public class PlayUrlDurl : BaseModel 7 | { 8 | [JsonProperty("order")] public int Order { get; set; } 9 | [JsonProperty("length")] public long Length { get; set; } 10 | 11 | [JsonProperty("size")] public long Size { get; set; } 12 | 13 | // ahead 14 | // vhead 15 | [JsonProperty("url")] public string Url { get; set; } 16 | [JsonProperty("backup_url")] public List BackupUrl { get; set; } 17 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/VideoStream/Models/PlayUrlSupportFormat.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.VideoStream.Models; 5 | 6 | public class PlayUrlSupportFormat : BaseModel 7 | { 8 | [JsonProperty("quality")] public int Quality { get; set; } 9 | [JsonProperty("format")] public string Format { get; set; } 10 | [JsonProperty("new_description")] public string NewDescription { get; set; } 11 | [JsonProperty("display_desc")] public string DisplayDesc { get; set; } 12 | [JsonProperty("superscript")] public string Superscript { get; set; } 13 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/VideoStream/Models/PlayerV2.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.VideoStream.Models; 5 | 6 | // https://api.bilibili.com/x/player/v2?cid={cid}&aid={avid}&bvid={bvid} 7 | public class PlayerV2Origin : BaseModel 8 | { 9 | //[JsonProperty("code")] 10 | //public int Code { get; set; } 11 | //[JsonProperty("message")] 12 | //public string Message { get; set; } 13 | //[JsonProperty("ttl")] 14 | //public int Ttl { get; set; } 15 | [JsonProperty("data")] public PlayerV2 Data { get; set; } 16 | } 17 | 18 | public class PlayerV2 : BaseModel 19 | { 20 | [JsonProperty("aid")] public long Aid { get; set; } 21 | 22 | [JsonProperty("bvid")] public string Bvid { get; set; } 23 | 24 | // allow_bp 25 | // no_share 26 | [JsonProperty("cid")] public long Cid { get; set; } 27 | 28 | // ... 29 | [JsonProperty("subtitle")] public SubtitleInfo Subtitle { get; set; } 30 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/VideoStream/Models/Subtitle.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.VideoStream.Models; 5 | 6 | public class Subtitle : BaseModel 7 | { 8 | [JsonProperty("id")] public long Id { get; set; } 9 | [JsonProperty("lan")] public string Lan { get; set; } 10 | [JsonProperty("lan_doc")] public string LanDoc { get; set; } 11 | [JsonProperty("is_lock")] public bool IsLock { get; set; } 12 | [JsonProperty("author_mid")] public long AuthorMid { get; set; } 13 | [JsonProperty("subtitle_url")] public string SubtitleUrl { get; set; } 14 | [JsonProperty("type")] public int Type { get; set; } 15 | [JsonProperty("id_str")] public string IdStr { get; set; } 16 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/VideoStream/Models/SubtitleInfo.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.BiliApi.Models; 2 | using Newtonsoft.Json; 3 | 4 | namespace DownKyi.Core.BiliApi.VideoStream.Models; 5 | 6 | public class SubtitleInfo : BaseModel 7 | { 8 | [JsonProperty("allow_submit")] public bool AllowSubmit { get; set; } 9 | [JsonProperty("lan")] public string Lan { get; set; } 10 | [JsonProperty("lan_doc")] public string LanDoc { get; set; } 11 | [JsonProperty("subtitles")] public List Subtitles { get; set; } 12 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/VideoStream/PlayStreamType.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.BiliApi.VideoStream; 2 | 3 | public enum PlayStreamType 4 | { 5 | Video = 1, // 普通视频 6 | Bangumi, // 番剧、电影、电视剧等 7 | Cheese, // 课程 8 | } -------------------------------------------------------------------------------- /DownKyi.Core/BiliApi/Zone/ZoneAttr.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.BiliApi.Zone; 2 | 3 | public class ZoneAttr 4 | { 5 | public int Id { get; } 6 | public string Type { get; } 7 | public string Name { get; } 8 | public int ParentId { get; } 9 | 10 | public ZoneAttr(int id, string type, string name, int parentId = 0) 11 | { 12 | Id = id; 13 | Type = type; 14 | Name = name; 15 | ParentId = parentId; 16 | } 17 | } -------------------------------------------------------------------------------- /DownKyi.Core/Danmaku2Ass/Collision.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Danmaku2Ass; 2 | 3 | /// 4 | /// 碰撞处理 5 | /// 6 | public class Collision 7 | { 8 | private readonly int lineCount; 9 | private readonly List leaves; 10 | 11 | public Collision(int lineCount) 12 | { 13 | this.lineCount = lineCount; 14 | leaves = Leaves(); 15 | } 16 | 17 | private List Leaves() 18 | { 19 | var ret = new List(lineCount); 20 | for (var i = 0; i < lineCount; i++) ret.Add(0); 21 | return ret; 22 | } 23 | 24 | /// 25 | /// 碰撞检测 26 | /// 返回行号和时间偏移 27 | /// 28 | /// 29 | /// 30 | public Tuple Detect(Display display) 31 | { 32 | var beyonds = new List(); 33 | for (var i = 0; i < leaves.Count; i++) 34 | { 35 | var beyond = display.Danmaku.Start - leaves[i]; 36 | // 某一行有足够空间,直接返回行号和 0 偏移 37 | if (beyond >= 0) 38 | { 39 | return Tuple.Create(i, 0f); 40 | } 41 | 42 | beyonds.Add(beyond); 43 | } 44 | 45 | // 所有行都没有空间了,那么找出哪一行能在最短时间内让出空间 46 | var soon = beyonds.Max(); 47 | var lineIndex = beyonds.IndexOf(soon); 48 | var offset = -soon; 49 | return Tuple.Create(lineIndex, offset); 50 | } 51 | 52 | public void Update(float leave, int lineIndex, float offset) 53 | { 54 | leaves[lineIndex] = Utils.IntCeiling(leave + offset); 55 | } 56 | } -------------------------------------------------------------------------------- /DownKyi.Core/Danmaku2Ass/Danmaku.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Danmaku2Ass; 2 | 3 | public class Danmaku 4 | { 5 | public float Start { get; set; } 6 | public string Style { get; set; } 7 | public int Color { get; set; } 8 | public string Commenter { get; set; } 9 | public string Content { get; set; } 10 | public float SizeRatio { get; set; } 11 | } -------------------------------------------------------------------------------- /DownKyi.Core/Danmaku2Ass/Filter.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Danmaku2Ass; 2 | 3 | /// 4 | /// 过滤器基类 5 | /// 6 | public class Filter 7 | { 8 | public virtual List DoFilter(List danmakus) 9 | { 10 | throw new NotImplementedException("使用了过滤器的未实现的方法。"); 11 | } 12 | } 13 | 14 | /// 15 | /// 顶部样式过滤器 16 | /// 17 | public class TopFilter : Filter 18 | { 19 | public override List DoFilter(List danmakus) 20 | { 21 | return danmakus.Where(danmaku => danmaku.Style != "top").ToList(); 22 | } 23 | } 24 | 25 | /// 26 | /// 底部样式过滤器 27 | /// 28 | public class BottomFilter : Filter 29 | { 30 | public override List DoFilter(List danmakus) 31 | { 32 | return danmakus.Where(danmaku => danmaku.Style != "bottom").ToList(); 33 | } 34 | } 35 | 36 | /// 37 | /// 滚动样式过滤器 38 | /// 39 | public class ScrollFilter : Filter 40 | { 41 | public override List DoFilter(List danmakus) 42 | { 43 | return danmakus.Where(danmaku => danmaku.Style != "scroll").ToList(); 44 | } 45 | } 46 | 47 | /// 48 | /// 自定义过滤器 49 | /// 50 | public class CustomFilter : Filter 51 | { 52 | public override List DoFilter(List danmakus) 53 | { 54 | // TODO 55 | return base.DoFilter(danmakus); 56 | } 57 | } -------------------------------------------------------------------------------- /DownKyi.Core/FileName/FileNamePart.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.FileName; 2 | 3 | public enum FileNamePart 4 | { 5 | // Video 6 | Order = 1, 7 | Section, 8 | MainTitle, 9 | PageTitle, 10 | VideoZone, 11 | AudioQuality, 12 | VideoQuality, 13 | VideoCodec, 14 | 15 | VideoPublishTime, 16 | 17 | Avid, 18 | Bvid, 19 | Cid, 20 | 21 | UpMid, 22 | UpName, 23 | 24 | // 斜杠 25 | Slash = 100, 26 | 27 | // HyphenSeparated 28 | Underscore = 101, // 下划线 29 | Hyphen, // 连字符 30 | Plus, // 加号 31 | Comma, // 逗号 32 | Period, // 句号 33 | And, // and 34 | Number, // # 35 | OpenParen, // 左圆括号 36 | CloseParen, // 右圆括号 37 | OpenBracket, // 左方括号 38 | CloseBracket, // 右方括号 39 | OpenBrace, // 左花括号 40 | CloseBrace, // 右花括号 41 | Blank, // 空白符 42 | } -------------------------------------------------------------------------------- /DownKyi.Core/FileName/HyphenSeparated.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.FileName; 2 | 3 | /// 4 | /// 文件名字段 5 | /// 6 | public static class HyphenSeparated 7 | { 8 | // 文件名的分隔符 9 | public static readonly Dictionary Hyphen = new() 10 | { 11 | { 100, "/" }, 12 | { 101, "_" }, 13 | { 102, "-" }, 14 | { 103, "+" }, 15 | { 104, "," }, 16 | { 105, "." }, 17 | { 106, "&" }, 18 | { 107, "#" }, 19 | { 108, "(" }, 20 | { 109, ")" }, 21 | { 110, "[" }, 22 | { 111, "]" }, 23 | { 112, "{" }, 24 | { 113, "}" }, 25 | { 114, " " }, 26 | }; 27 | } -------------------------------------------------------------------------------- /DownKyi.Core/Logging/LogInfo.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Logging; 2 | 3 | /// 4 | /// 日志信息 5 | /// 6 | public class LogInfo 7 | { 8 | /// 9 | /// 时间 10 | /// 11 | public DateTime Time { get; set; } 12 | 13 | /// 14 | /// 线程id 15 | /// 16 | public int ThreadId { get; set; } 17 | 18 | /// 19 | /// 日志级别 20 | /// 21 | public LogLevel LogLevel { get; set; } 22 | 23 | /// 24 | /// 异常源 25 | /// 26 | public string Source { get; set; } 27 | 28 | /// 29 | /// 异常信息 30 | /// 31 | public string Message { get; set; } 32 | 33 | /// 34 | /// 异常对象 35 | /// 36 | public Exception Exception { get; set; } 37 | 38 | /// 39 | /// 日志类型 40 | /// 41 | public string ExceptionType { get; set; } 42 | 43 | /// 44 | /// 请求路径 45 | /// 46 | public string RequestUrl { get; set; } 47 | 48 | /// 49 | /// 客户端代理 50 | /// 51 | public string UserAgent { get; set; } 52 | } -------------------------------------------------------------------------------- /DownKyi.Core/Logging/LogLevel.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Logging; 2 | 3 | /// 4 | /// 日志级别 5 | /// 6 | public enum LogLevel 7 | { 8 | /// 9 | /// 信息级别 10 | /// 11 | Info, 12 | 13 | /// 14 | /// debug级别 15 | /// 16 | Debug, 17 | 18 | /// 19 | /// 错误级别 20 | /// 21 | Error, 22 | 23 | /// 24 | /// 致命级别 25 | /// 26 | Fatal 27 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/AfterDownloadOperation.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Settings; 2 | 3 | public enum AfterDownloadOperation 4 | { 5 | NotSet = 0, 6 | None = 1, 7 | OpenFolder, 8 | CloseApp, 9 | CloseSystem 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/AllowStatus.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Settings; 2 | 3 | public enum AllowStatus 4 | { 5 | None = 0, 6 | No, 7 | Yes 8 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/DanmakuLayoutAlgorithm.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Settings; 2 | 3 | public enum DanmakuLayoutAlgorithm 4 | { 5 | None = 0, 6 | Async, 7 | Sync 8 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/DownloadFinishedSort.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Settings; 2 | 3 | public enum DownloadFinishedSort 4 | { 5 | NotSet = 0, 6 | DownloadAsc, 7 | DownloadDesc, 8 | Number 9 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/Downloader.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Settings; 2 | 3 | public enum Downloader 4 | { 5 | NotSet = 0, 6 | BuiltIn, 7 | Aria, 8 | CustomAria, 9 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/Models/AboutSettings.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Settings.Models; 2 | 3 | /// 4 | /// 关于 5 | /// 6 | public class AboutSettings 7 | { 8 | public AllowStatus IsReceiveBetaVersion { get; set; } = AllowStatus.None; 9 | public AllowStatus AutoUpdateWhenLaunch { get; set; } = AllowStatus.None; 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/Models/AppSettings.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Settings.Models; 2 | 3 | public class AppSettings 4 | { 5 | public BasicSettings Basic { get; set; } = new(); 6 | public NetworkSettings Network { get; set; } = new(); 7 | public VideoSettings Video { get; set; } = new(); 8 | public DanmakuSettings Danmaku { get; set; } = new(); 9 | public AboutSettings About { get; set; } = new(); 10 | public UserInfoSettings UserInfo { get; set; } = new(); 11 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/Models/BasicSettings.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Settings.Models; 2 | 3 | /// 4 | /// 基本 5 | /// 6 | public class BasicSettings 7 | { 8 | public ThemeMode ThemeMode { get; set; } = ThemeMode.Default; 9 | public AfterDownloadOperation AfterDownload { get; set; } = AfterDownloadOperation.NotSet; 10 | public AllowStatus IsListenClipboard { get; set; } = AllowStatus.None; 11 | public AllowStatus IsAutoParseVideo { get; set; } = AllowStatus.None; 12 | public ParseScope ParseScope { get; set; } = ParseScope.NotSet; 13 | public AllowStatus IsAutoDownloadAll { get; set; } = AllowStatus.None; 14 | public DownloadFinishedSort DownloadFinishedSort { get; set; } = DownloadFinishedSort.NotSet; 15 | public RepeatDownloadStrategy RepeatDownloadStrategy { get; set; } = RepeatDownloadStrategy.Ask; 16 | public bool RepeatFileAutoAddNumberSuffix { get; set; } 17 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/Models/DanmakuSettings.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Settings.Models; 2 | 3 | /// 4 | /// 弹幕 5 | /// 6 | public class DanmakuSettings 7 | { 8 | public AllowStatus DanmakuTopFilter { get; set; } = AllowStatus.None; 9 | public AllowStatus DanmakuBottomFilter { get; set; } = AllowStatus.None; 10 | public AllowStatus DanmakuScrollFilter { get; set; } = AllowStatus.None; 11 | public AllowStatus IsCustomDanmakuResolution { get; set; } = AllowStatus.None; 12 | public int DanmakuScreenWidth { get; set; } = -1; 13 | public int DanmakuScreenHeight { get; set; } = -1; 14 | public string? DanmakuFontName { get; set; } 15 | public int DanmakuFontSize { get; set; } = -1; 16 | public int DanmakuLineCount { get; set; } = -1; 17 | public DanmakuLayoutAlgorithm DanmakuLayoutAlgorithm { get; set; } = DanmakuLayoutAlgorithm.None; 18 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/Models/UserInfoSettings.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Settings.Models; 2 | 3 | public class UserInfoSettings 4 | { 5 | public long Mid { get; set; } 6 | public string Name { get; set; } 7 | public bool IsLogin { get; set; } // 是否登录 8 | public bool IsVip { get; set; } // 是否为大会员,未登录时为false 9 | 10 | public string ImgKey { get; set; } 11 | public string SubKey { get; set; } 12 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/Models/VideoContentSettings.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Settings.Models; 2 | 3 | public class VideoContentSettings 4 | { 5 | public bool DownloadAudio { get; set; } = true; 6 | public bool DownloadVideo { get; set; } = true; 7 | public bool DownloadDanmaku { get; set; } = true; 8 | public bool DownloadSubtitle { get; set; } = true; 9 | public bool DownloadCover { get; set; } = true; 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/Models/VideoSettings.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.FileName; 2 | 3 | namespace DownKyi.Core.Settings.Models; 4 | 5 | /// 6 | /// 视频 7 | /// 8 | public class VideoSettings 9 | { 10 | public int VideoCodecs { get; set; } = -1; // AVC or HEVC 11 | public int Quality { get; set; } = -1; // 画质 12 | public int AudioQuality { get; set; } = -1; // 音质 13 | public int VideoParseType { get; set; } = 1; // 视频解析类型 14 | public AllowStatus IsTranscodingFlvToMp4 { get; set; } = AllowStatus.None; // 是否将flv转为mp4 15 | public AllowStatus IsTranscodingAacToMp3 { get; set; } = AllowStatus.None; // 是否将aac转为mp3 16 | public string? SaveVideoRootPath { get; set; } // 视频保存路径 17 | public List? HistoryVideoRootPaths { get; set; } // 历史视频保存路径 18 | public AllowStatus IsUseSaveVideoRootPath { get; set; } = AllowStatus.None; // 是否使用默认视频保存路径 19 | public VideoContentSettings? VideoContent { get; set; } // 下载内容 20 | public List? FileNameParts { get; set; } // 文件命名格式 21 | public string? FileNamePartTimeFormat { get; set; } // 文件命名中的时间格式 22 | public OrderFormat OrderFormat { get; set; } = OrderFormat.NotSet; // 文件命名中的序号格式 23 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/NetworkProxy.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Settings; 2 | 3 | public enum NetworkProxy 4 | { 5 | None, 6 | System, 7 | Custom 8 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/OrderFormat.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Settings; 2 | 3 | public enum OrderFormat 4 | { 5 | NotSet = 0, 6 | Natural, // 自然数 7 | LeadingZeros, // 前导零填充 8 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/ParseScope.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Settings; 2 | 3 | public enum ParseScope 4 | { 5 | NotSet = 0, 6 | None = 1, 7 | SelectedItem, 8 | CurrentSection, 9 | All 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/RepeatDownloadStrategy.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Settings; 2 | 3 | public enum RepeatDownloadStrategy 4 | { 5 | Ask, 6 | ReDownload, 7 | JumpOver 8 | }; -------------------------------------------------------------------------------- /DownKyi.Core/Settings/SettingsManager.UserInfo.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.Settings.Models; 2 | 3 | namespace DownKyi.Core.Settings; 4 | 5 | public partial class SettingsManager 6 | { 7 | // 登录用户的mid 8 | private readonly UserInfoSettings _userInfo = new() 9 | { 10 | Mid = -1, 11 | Name = "", 12 | IsLogin = false, 13 | IsVip = false 14 | }; 15 | 16 | /// 17 | /// 获取登录用户信息 18 | /// 19 | /// 20 | public UserInfoSettings GetUserInfo() 21 | { 22 | _appSettings = GetSettings(); 23 | if (_appSettings.UserInfo == null) 24 | { 25 | // 第一次获取,先设置默认值 26 | SetUserInfo(_userInfo); 27 | return _userInfo; 28 | } 29 | 30 | return _appSettings.UserInfo; 31 | } 32 | 33 | /// 34 | /// 设置中保存登录用户的信息,在index刷新用户状态时使用 35 | /// 36 | /// 37 | /// 38 | public bool SetUserInfo(UserInfoSettings userInfo) 39 | { 40 | _appSettings.UserInfo = userInfo; 41 | return SetSettings(); 42 | } 43 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/ThemeMode.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Settings; 2 | 3 | public enum ThemeMode 4 | { 5 | Default = 1, 6 | Light, 7 | Dark 8 | } -------------------------------------------------------------------------------- /DownKyi.Core/Settings/VideoCodecs.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Settings; 2 | 3 | public enum VideoCodecs 4 | { 5 | None = 0, 6 | Avc, 7 | Hevc 8 | } -------------------------------------------------------------------------------- /DownKyi.Core/Storage/Database/Download/DownloadBaseDb.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Storage.Database.Download; 2 | 3 | public class DownloadBaseDb : DownloadDb 4 | { 5 | public DownloadBaseDb() 6 | { 7 | tableName = "download_base"; 8 | CreateTable(); 9 | } 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/Storage/Database/Download/DownloadedDb.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Storage.Database.Download; 2 | 3 | public class DownloadedDb : DownloadDb 4 | { 5 | public DownloadedDb() 6 | { 7 | tableName = "downloaded"; 8 | CreateTable(); 9 | } 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/Storage/Database/Download/DownloadingDb.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Core.Storage.Database.Download; 2 | 3 | public class DownloadingDb : DownloadDb 4 | { 5 | public DownloadingDb() 6 | { 7 | tableName = "downloading"; 8 | CreateTable(); 9 | } 10 | } -------------------------------------------------------------------------------- /DownKyi.Core/Storage/StorageUtils.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | using DownKyi.Core.Logging; 3 | using Console = DownKyi.Core.Utils.Debugging.Console; 4 | 5 | namespace DownKyi.Core.Storage; 6 | 7 | public static class StorageUtils 8 | { 9 | /// 10 | /// 下载图片 11 | /// 12 | /// 13 | /// 14 | /// 15 | public static bool DownloadImage(string url, string localFile) 16 | { 17 | try 18 | { 19 | var mywebclient = new WebClient(); 20 | mywebclient.DownloadFile(url, localFile); 21 | } 22 | catch (Exception e) 23 | { 24 | Console.PrintLine("DownloadImage()发生异常: {0}", e); 25 | LogManager.Error("StorageUtils", e); 26 | return false; 27 | } 28 | 29 | return true; 30 | } 31 | 32 | /// 33 | /// Bitmap转BitmapImage 34 | /// 35 | /// 36 | /// 37 | /*public static BitmapImage BitmapToBitmapImage(Bitmap bitmap) 38 | { 39 | BitmapImage result = new BitmapImage(); 40 | using (MemoryStream stream = new MemoryStream()) 41 | { 42 | bitmap.Save(stream, ImageFormat.Bmp); 43 | stream.Position = 0; 44 | result.BeginInit(); 45 | result.CacheOption = BitmapCacheOption.OnLoad; 46 | result.StreamSource = stream; 47 | result.EndInit(); 48 | result.Freeze(); 49 | } 50 | return result; 51 | }*/ 52 | } -------------------------------------------------------------------------------- /DownKyi.Core/Utils/QRCode.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Media.Imaging; 2 | using QRCoder; 3 | 4 | namespace DownKyi.Core.Utils; 5 | 6 | public static class QrCode 7 | { 8 | /// 9 | /// 生成二维码 10 | /// 11 | /// 信息 12 | /// 版本 1 ~ 40 13 | /// 像素点大小 14 | /// 图标路径 15 | /// 图标尺寸 16 | /// 图标边框厚度 17 | /// 二维码白边 18 | /// 位图 19 | public static Bitmap EncodeQrCode(string msg, int version, int pixel, string? iconPath, int iconSize, int iconBorder, bool whiteEdge) 20 | { 21 | var codeGenerator = new QRCodeGenerator(); 22 | 23 | var codeData = codeGenerator.CreateQrCode(msg, QRCodeGenerator.ECCLevel.H /* 这里设置容错率的一个级别 */, true, false, QRCodeGenerator.EciMode.Utf8, version); 24 | 25 | var qrCode = new BitmapByteQRCode(codeData); 26 | var qrCodeAsBitmapByteArr = qrCode.GetGraphic(20); 27 | 28 | // Bitmap icon; 29 | // icon = string.IsNullOrEmpty(iconPath) ? null : new Bitmap(iconPath); 30 | 31 | using var ms = new MemoryStream(qrCodeAsBitmapByteArr); 32 | var bmp = new Bitmap(ms); 33 | 34 | // Bitmap bmp = qrCode.GetGraphic(pixel, Color.FromRgb(0,0,0), Color.FromRgb(255,255,255), icon, icon_size, icon_border, white_edge); 35 | return bmp; 36 | } 37 | } -------------------------------------------------------------------------------- /DownKyi.Core/Utils/Validator/Number.cs: -------------------------------------------------------------------------------- 1 | using System.Text.RegularExpressions; 2 | 3 | namespace DownKyi.Core.Utils.Validator; 4 | 5 | public static class Number 6 | { 7 | /// 8 | /// 字符串转数字(长整型) 9 | /// 10 | /// 11 | /// 12 | public static long GetInt(string value) 13 | { 14 | return IsInt(value) ? long.Parse(value) : -1; 15 | } 16 | 17 | /// 18 | /// 是否为数字 19 | /// 20 | /// 21 | /// 22 | public static bool IsInt(string value) 23 | { 24 | return Regex.IsMatch(value, @"^\d+$"); 25 | } 26 | } -------------------------------------------------------------------------------- /DownKyi/AppConstant.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi; 2 | 3 | public class AppConstant 4 | { 5 | public const string ClipboardId = "32ff00b1-1a09-4b25-9ca7-dcb6914b141c"; 6 | } -------------------------------------------------------------------------------- /DownKyi/Converter/CountConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using Avalonia.Data.Converters; 4 | 5 | namespace DownKyi.Converter 6 | { 7 | public class CountConverter : IValueConverter 8 | { 9 | public int Count { get; set; } 10 | 11 | 12 | public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture) 13 | { 14 | var i = (int?)value > Count; 15 | return (int?)value > Count; 16 | } 17 | 18 | public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) 19 | { 20 | throw new NotImplementedException(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /DownKyi/CustomAction/NumericInputBehavior.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using Avalonia.Controls; 3 | using Avalonia.Input; 4 | using Avalonia.Interactivity; 5 | using Avalonia.Xaml.Interactivity; 6 | 7 | namespace DownKyi.CustomAction; 8 | 9 | public class NumericInputBehavior : Behavior 10 | { 11 | protected override void OnAttached() 12 | { 13 | if (AssociatedObject != null) 14 | { 15 | AssociatedObject.AddHandler(InputElement.TextInputEvent, OnTextInput, RoutingStrategies.Tunnel); 16 | AssociatedObject.TextChanging += OnTextChanging; 17 | } 18 | base.OnAttached(); 19 | } 20 | 21 | protected override void OnDetaching() 22 | { 23 | if (AssociatedObject != null) 24 | { 25 | AssociatedObject.RemoveHandler(InputElement.TextInputEvent, OnTextInput); 26 | AssociatedObject.TextChanging -= OnTextChanging; 27 | } 28 | base.OnDetaching(); 29 | } 30 | 31 | private void OnTextInput(object? sender, TextInputEventArgs e) 32 | { 33 | if (string.IsNullOrEmpty(e.Text) || e.Text.All(char.IsControl)) 34 | return; 35 | 36 | if (!char.IsDigit(e.Text[0])) 37 | e.Handled = true; 38 | } 39 | 40 | private void OnTextChanging(object? sender, TextChangingEventArgs e) 41 | { 42 | if (e.Source is TextBox t && 43 | !string.IsNullOrEmpty(t.Text) && !t.Text.All(char.IsDigit)) 44 | { 45 | t.Text = new string(t.Text.Where(char.IsDigit).ToArray()); 46 | t.CaretIndex = t.Text?.Length ?? 0; 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /DownKyi/CustomControl/AsyncImageLoader/IAsyncImageLoader.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using Avalonia.Media.Imaging; 4 | 5 | namespace DownKyi.CustomControl.AsyncImageLoader; 6 | 7 | public interface IAsyncImageLoader : IDisposable 8 | { 9 | /// 10 | /// Loads image 11 | /// 12 | /// Target url 13 | /// Bitmap 14 | public Task ProvideImageAsync(string url); 15 | } -------------------------------------------------------------------------------- /DownKyi/CustomControl/AsyncImageLoader/Loaders/AdvancedImage.axaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | 20 | -------------------------------------------------------------------------------- /DownKyi/CustomControl/AsyncImageLoader/Loaders/RamCachedWebImageLoader.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Concurrent; 2 | using System.Net.Http; 3 | using System.Threading.Tasks; 4 | using Avalonia.Media.Imaging; 5 | 6 | namespace DownKyi.CustomControl.AsyncImageLoader.Loaders; 7 | 8 | public class RamCachedWebImageLoader : BaseWebImageLoader 9 | { 10 | private readonly ConcurrentDictionary> _memoryCache = new(); 11 | 12 | /// 13 | public RamCachedWebImageLoader() 14 | { 15 | } 16 | 17 | /// 18 | public RamCachedWebImageLoader(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) 19 | { 20 | } 21 | 22 | /// 23 | public override async Task ProvideImageAsync(string url) 24 | { 25 | var bitmap = await _memoryCache.GetOrAdd(url, LoadAsync).ConfigureAwait(false); 26 | // If load failed - remove from cache and return 27 | // Next load attempt will try to load image again 28 | if (bitmap == null) _memoryCache.TryRemove(url, out _); 29 | return bitmap; 30 | } 31 | } -------------------------------------------------------------------------------- /DownKyi/CustomControl/CustomPager.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.CustomControl; 6 | 7 | public partial class CustomPager : UserControl 8 | { 9 | public CustomPager() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Events/MessageEvent.cs: -------------------------------------------------------------------------------- 1 | using Prism.Events; 2 | 3 | namespace DownKyi.Events; 4 | 5 | public class MessageEvent : PubSubEvent 6 | { 7 | } -------------------------------------------------------------------------------- /DownKyi/Events/NavigationEvent.cs: -------------------------------------------------------------------------------- 1 | using Prism.Events; 2 | 3 | namespace DownKyi.Events; 4 | 5 | public class NavigationEvent : PubSubEvent 6 | { 7 | } -------------------------------------------------------------------------------- /DownKyi/Events/NavigationParam.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Events; 2 | 3 | public class NavigationParam 4 | { 5 | public string? ViewName { get; set; } 6 | public string? ParentViewName { get; set; } 7 | public object? Parameter { get; set; } 8 | } -------------------------------------------------------------------------------- /DownKyi/Images/VectorImage.cs: -------------------------------------------------------------------------------- 1 | using Prism.Mvvm; 2 | 3 | namespace DownKyi.Images; 4 | 5 | public class VectorImage : BindableBase 6 | { 7 | private double _width; 8 | 9 | public double Width 10 | { 11 | get => _width; 12 | set => SetProperty(ref _width, value); 13 | } 14 | 15 | private double _height; 16 | 17 | public double Height 18 | { 19 | get => _height; 20 | set => SetProperty(ref _height, value); 21 | } 22 | 23 | private string? _data; 24 | 25 | public string? Data 26 | { 27 | get => _data; 28 | set => SetProperty(ref _data, value); 29 | } 30 | 31 | private string? _fill; 32 | 33 | public string? Fill 34 | { 35 | get => _fill; 36 | set => SetProperty(ref _fill, value); 37 | } 38 | } -------------------------------------------------------------------------------- /DownKyi/Models/AppInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text.RegularExpressions; 3 | 4 | namespace DownKyi.Models; 5 | 6 | public class AppInfo 7 | { 8 | public string Name { get; } = "哔哩下载姬"; 9 | public int VersionCode { get; } 10 | public string VersionName { get; } 11 | 12 | private const int A = 1; 13 | private const int B = 0; 14 | private const int C = 20; 15 | 16 | public AppInfo() 17 | { 18 | VersionCode = A * 10000 + B * 100 + C; 19 | 20 | #if DEBUG 21 | VersionName = $"{A}.{B}.{C}-debug"; 22 | #else 23 | VersionName = $"{A}.{B}.{C}"; 24 | #endif 25 | } 26 | 27 | public static int VersionNameToCode(string versionName) 28 | { 29 | var code = 0; 30 | 31 | var isMatch = Regex.IsMatch(versionName, @"^v?([1-9]\d|\d).([1-9]\d|\d).([1-9]\d|\d)$"); 32 | if (!isMatch) 33 | { 34 | return 0; 35 | } 36 | 37 | var pattern = @"([1-9]\d|\d)"; 38 | var m = Regex.Matches(versionName, pattern); 39 | if (m.Count == 3) 40 | { 41 | var i = 2; 42 | foreach (var item in m) 43 | { 44 | code += int.Parse(item.ToString()!) * (int)Math.Pow(100, i); 45 | i--; 46 | } 47 | } 48 | 49 | return code; 50 | } 51 | } -------------------------------------------------------------------------------- /DownKyi/Models/DownloadStatus.cs: -------------------------------------------------------------------------------- 1 | namespace DownKyi.Models; 2 | 3 | public enum DownloadStatus 4 | { 5 | NotStarted, // 未开始,从未开始下载 6 | WaitForDownload, // 等待下载,下载过,但是启动本次下载周期未开始,如重启程序后未开始 7 | PauseStarted, // 暂停启动下载 8 | Pause, // 暂停 9 | 10 | //PAUSE_TO_WAIT, // 暂停后等待 11 | Downloading, // 下载中 12 | DownloadSucceed, // 下载成功 13 | DownloadFailed, // 下载失败 14 | } -------------------------------------------------------------------------------- /DownKyi/Models/Downloaded.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DownKyi.Models; 4 | 5 | [Serializable] 6 | public class Downloaded // : DownloadBase 7 | { 8 | public Downloaded() : base() 9 | { 10 | } 11 | 12 | // 下载速度 13 | public string? MaxSpeedDisplay { get; set; } 14 | 15 | // 完成时间戳 16 | public long FinishedTimestamp { get; set; } 17 | 18 | public void SetFinishedTimestamp(long finishedTimestamp) 19 | { 20 | FinishedTimestamp = finishedTimestamp; 21 | 22 | var startTime = TimeZoneInfo.ConvertTimeFromUtc(new DateTime(1970, 1, 1), TimeZoneInfo.Local); // 当地时区 23 | var dateTime = startTime.AddSeconds(finishedTimestamp); 24 | FinishedTime = dateTime.ToString("yyyy-MM-dd HH:mm:ss"); 25 | } 26 | 27 | // 完成时间 28 | public string FinishedTime { get; set; } 29 | } -------------------------------------------------------------------------------- /DownKyi/Models/Downloading.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using DownKyi.Core.BiliApi.VideoStream; 4 | using Downloader; 5 | 6 | namespace DownKyi.Models; 7 | 8 | [Serializable] 9 | public class Downloading // : DownloadBase 10 | { 11 | public Downloading() : base() 12 | { 13 | // 初始化下载的文件列表 14 | DownloadFiles = new Dictionary(); 15 | DownloadedFiles = new List(); 16 | } 17 | 18 | // Aria相关 19 | public string? Gid { get; set; } 20 | 21 | // 下载的文件 22 | public Dictionary DownloadFiles { get; set; } 23 | 24 | // 已下载的文件 25 | public List DownloadedFiles { get; set; } 26 | 27 | // 视频类别 28 | public PlayStreamType PlayStreamType { get; set; } 29 | 30 | // 下载状态 31 | public DownloadStatus DownloadStatus { get; set; } 32 | 33 | // 正在下载内容(音频、视频、弹幕、字幕、封面) 34 | public string DownloadContent { get; set; } 35 | 36 | // 下载状态显示 37 | public string DownloadStatusTitle { get; set; } 38 | 39 | // 下载进度 40 | public float Progress { get; set; } 41 | 42 | // 已下载大小/文件大小 43 | public string DownloadingFileSize { get; set; } 44 | 45 | // 下载的最高速度 46 | public long MaxSpeed { get; set; } 47 | 48 | // 下载速度 49 | public string SpeedDisplay { get; set; } 50 | } -------------------------------------------------------------------------------- /DownKyi/Models/OrderFormatDisplay.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.Settings; 2 | 3 | namespace DownKyi.Models; 4 | 5 | public class OrderFormatDisplay 6 | { 7 | public string? Name { get; set; } 8 | public OrderFormat OrderFormat { get; set; } 9 | } -------------------------------------------------------------------------------- /DownKyi/Models/ParseScopeDisplay.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.Settings; 2 | 3 | namespace DownKyi.Models; 4 | 5 | public class ParseScopeDisplay 6 | { 7 | public string? Name { get; set; } 8 | public ParseScope ParseScope { get; set; } 9 | } -------------------------------------------------------------------------------- /DownKyi/Models/RepeatDownloadStrategyDisplay.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.Settings; 2 | 3 | namespace DownKyi.Models; 4 | 5 | public class RepeatDownloadStrategyDisplay 6 | { 7 | public string? Name { get; set; } 8 | public RepeatDownloadStrategy RepeatDownloadStrategy { get; set; } 9 | } -------------------------------------------------------------------------------- /DownKyi/PrismExtension/Dialog/Dialog.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Styling; 3 | 4 | namespace DownKyi.PrismExtension.Dialog; 5 | 6 | public class Dialog : Prism.Services.Dialogs.Dialog 7 | { 8 | public static readonly AvaloniaProperty ThemeProperty = AvaloniaProperty.RegisterAttached("Theme", typeof(Dialog)); 9 | 10 | /// 11 | /// Gets the value for the attached property. 12 | /// 13 | /// The target element. 14 | /// The attached to the element. 15 | public static ControlTheme? GetTheme(AvaloniaObject obj) 16 | { 17 | return (ControlTheme?)obj.GetValue(ThemeProperty); 18 | } 19 | 20 | /// 21 | /// Sets the attached property. 22 | /// 23 | /// The target element. 24 | /// The Style to attach. 25 | public static void SetTheme(AvaloniaObject obj, ControlTheme value) 26 | { 27 | obj.SetValue(ThemeProperty, value); 28 | } 29 | } -------------------------------------------------------------------------------- /DownKyi/PrismExtension/Dialog/DialogWindow.axaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /DownKyi/PrismExtension/Dialog/DialogWindow.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Prism.Services.Dialogs; 3 | 4 | namespace DownKyi.PrismExtension.Dialog; 5 | 6 | public partial class DialogWindow : Window, IDialogWindow 7 | { 8 | public DialogWindow() 9 | { 10 | InitializeComponent(); 11 | } 12 | 13 | public IDialogResult? Result { get; set; } 14 | } -------------------------------------------------------------------------------- /DownKyi/PrismExtension/Dialog/IDialogService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using Prism.Services.Dialogs; 4 | 5 | namespace DownKyi.PrismExtension.Dialog; 6 | 7 | public interface IDialogService : Prism.Services.Dialogs.IDialogService 8 | { 9 | public Task ShowDialogAsync(string name, IDialogParameters? parameters, Action? callback = null, 10 | string? windowName = null); 11 | } -------------------------------------------------------------------------------- /DownKyi/PrismExtension/Dialog/IDialogWindow.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Styling; 2 | 3 | namespace DownKyi.PrismExtension.Dialog; 4 | 5 | public interface IDialogWindow: Prism.Services.Dialogs.IDialogWindow 6 | { 7 | ControlTheme? Theme { get; set; } 8 | } -------------------------------------------------------------------------------- /DownKyi/Program.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using System; 3 | 4 | namespace DownKyi; 5 | 6 | sealed class Program 7 | { 8 | // Initialization code. Don't use any Avalonia, third-party APIs or any 9 | // SynchronizationContext-reliant code before AppMain is called: things aren't initialized 10 | // yet and stuff might break. 11 | [STAThread] 12 | public static void Main(string[] args) => BuildAvaloniaApp() 13 | .StartWithClassicDesktopLifetime(args); 14 | 15 | // Avalonia configuration, don't remove; also used by visual designer. 16 | public static AppBuilder BuildAvaloniaApp() 17 | => AppBuilder.Configure() 18 | .UsePlatformDetect() 19 | #if DEBUG 20 | .LogToTrace() 21 | #endif 22 | .WithInterFont(); 23 | } -------------------------------------------------------------------------------- /DownKyi/Resources/backgound/9-绿荫秘境.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/backgound/9-绿荫秘境.png -------------------------------------------------------------------------------- /DownKyi/Resources/channel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/channel.png -------------------------------------------------------------------------------- /DownKyi/Resources/checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/checked.png -------------------------------------------------------------------------------- /DownKyi/Resources/default_header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/default_header.jpg -------------------------------------------------------------------------------- /DownKyi/Resources/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/favicon.ico -------------------------------------------------------------------------------- /DownKyi/Resources/level/lv0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/level/lv0.png -------------------------------------------------------------------------------- /DownKyi/Resources/level/lv1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/level/lv1.png -------------------------------------------------------------------------------- /DownKyi/Resources/level/lv2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/level/lv2.png -------------------------------------------------------------------------------- /DownKyi/Resources/level/lv3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/level/lv3.png -------------------------------------------------------------------------------- /DownKyi/Resources/level/lv4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/level/lv4.png -------------------------------------------------------------------------------- /DownKyi/Resources/level/lv5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/level/lv5.png -------------------------------------------------------------------------------- /DownKyi/Resources/level/lv6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/level/lv6.png -------------------------------------------------------------------------------- /DownKyi/Resources/level/lv7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/level/lv7.png -------------------------------------------------------------------------------- /DownKyi/Resources/level/lv8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/level/lv8.png -------------------------------------------------------------------------------- /DownKyi/Resources/level/lv9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/level/lv9.png -------------------------------------------------------------------------------- /DownKyi/Resources/loading/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/loading/loading.gif -------------------------------------------------------------------------------- /DownKyi/Resources/login/login_top_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/login/login_top_bar.png -------------------------------------------------------------------------------- /DownKyi/Resources/login/qrcode_login_2233.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/login/qrcode_login_2233.png -------------------------------------------------------------------------------- /DownKyi/Resources/login/qrcode_login_tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/login/qrcode_login_tip.png -------------------------------------------------------------------------------- /DownKyi/Resources/login/scan_succeed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/login/scan_succeed.png -------------------------------------------------------------------------------- /DownKyi/Resources/no-data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/no-data.png -------------------------------------------------------------------------------- /DownKyi/Resources/nodata02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/nodata02.png -------------------------------------------------------------------------------- /DownKyi/Resources/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/play.png -------------------------------------------------------------------------------- /DownKyi/Resources/sex/female.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/sex/female.png -------------------------------------------------------------------------------- /DownKyi/Resources/sex/male.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/sex/male.png -------------------------------------------------------------------------------- /DownKyi/Resources/time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/time.png -------------------------------------------------------------------------------- /DownKyi/Resources/video-placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/DownKyi/Resources/video-placeholder.png -------------------------------------------------------------------------------- /DownKyi/Services/Download/IDownloadService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DownKyi.ViewModels.DownloadManager; 3 | 4 | namespace DownKyi.Services.Download; 5 | 6 | public interface IDownloadService 7 | { 8 | void Parse(DownloadingItem downloading); 9 | string DownloadAudio(DownloadingItem downloading); 10 | string DownloadVideo(DownloadingItem downloading); 11 | string DownloadDanmaku(DownloadingItem downloading); 12 | List DownloadSubtitle(DownloadingItem downloading); 13 | string DownloadCover(DownloadingItem downloading, string coverUrl, string fileName); 14 | string MixedFlow(DownloadingItem downloading, string audioUid, string videoUid); 15 | 16 | void Start(); 17 | void End(); 18 | } -------------------------------------------------------------------------------- /DownKyi/Services/IFavoritesService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | using System.Threading; 4 | using DownKyi.ViewModels.PageViewModels; 5 | using Prism.Events; 6 | using FavoritesMedia = DownKyi.Core.BiliApi.Favorites.Models.FavoritesMedia; 7 | 8 | namespace DownKyi.Services; 9 | 10 | public interface IFavoritesService 11 | { 12 | Favorites? GetFavorites(long mediaId); 13 | 14 | //void GetFavoritesMediaList(long mediaId, ObservableCollection result, IEventAggregator eventAggregator, CancellationToken cancellationToken); 15 | //void GetFavoritesMediaList(long mediaId, int pn, int ps, ObservableCollection result, IEventAggregator eventAggregator, CancellationToken cancellationToken); 16 | void GetFavoritesMediaList(List medias, ObservableCollection result, IEventAggregator eventAggregator, 17 | CancellationToken cancellationToken); 18 | 19 | void GetCreatedFavorites(long mid, ObservableCollection tabHeaders, CancellationToken cancellationToken); 20 | 21 | void GetCollectedFavorites(long mid, ObservableCollection tabHeaders, CancellationToken cancellationToken); 22 | } -------------------------------------------------------------------------------- /DownKyi/Services/IInfoService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DownKyi.ViewModels.PageViewModels; 3 | 4 | namespace DownKyi.Services; 5 | 6 | public interface IInfoService 7 | { 8 | VideoInfoView? GetVideoView(); 9 | 10 | List? GetVideoSections(bool noUgc); 11 | 12 | List? GetVideoPages(); 13 | 14 | void GetVideoStream(VideoPage page); 15 | } -------------------------------------------------------------------------------- /DownKyi/Services/VersionCheckerService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Text.Json; 4 | using System.Threading.Tasks; 5 | 6 | namespace DownKyi.Services 7 | { 8 | public class VersionCheckerService 9 | { 10 | private const string GhReleases = "https://api.github.com/repos/yaobiao131/downkyicore/releases/latest"; 11 | public async Task<(Version?, string?)> GetLatestVersion() 12 | { 13 | Version? version = default; 14 | string? updateNotes = default; 15 | try 16 | { 17 | using var hc = new HttpClient(); 18 | hc.DefaultRequestHeaders.Add("User-Agent", "downkyicore"); 19 | var json =await hc.GetStringAsync(new Uri(GhReleases)); 20 | using var doc = JsonDocument.Parse(json); 21 | var versionString = doc.RootElement.GetProperty("tag_name").GetString()!; 22 | updateNotes = doc.RootElement.GetProperty("body").GetString()!; 23 | version = Version.Parse(versionString.TrimStart('v')); 24 | return (version, updateNotes); 25 | } 26 | catch (Exception e) 27 | { 28 | return (null, null); 29 | } 30 | 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /DownKyi/Themes/Colors/ColorDark.axaml: -------------------------------------------------------------------------------- 1 | 3 | Black 4 | white 5 | #7FD0D0D0 6 | white 7 | black 8 | #FF6ECEF8 9 | #FF30B8F6 10 | #FFF1707A 11 | #FFE81123 12 | #FF00A1D6 13 | #FF00A1D6 14 | #28282800 15 | #FFFFFFFF 16 | #FF00A1D6 17 | #7FD0D0D0 18 | #7FD0D0D0 19 | Black 20 | white 21 | #FF141414 22 | 23 | #096085 24 | 25 | 26 | -------------------------------------------------------------------------------- /DownKyi/Themes/Styles/NormalIcon.axaml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /DownKyi/Themes/Styles/StyleImageBtn.axaml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 16 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /DownKyi/Utils/ClipboardManager.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Avalonia.Controls; 3 | using Avalonia.Input.Platform; 4 | 5 | namespace DownKyi.Utils; 6 | 7 | public static class ClipboardManager 8 | { 9 | private static readonly Window Window = App.Current.MainWindow; 10 | private static readonly IClipboard? Clipboard = Window.Clipboard; 11 | 12 | public static async Task SetText(string text) 13 | { 14 | if (Clipboard != null) 15 | { 16 | await Clipboard.SetTextAsync(text); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /DownKyi/Utils/ImageHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Net.Http; 4 | using System.Threading.Tasks; 5 | using Avalonia.Media.Imaging; 6 | using Avalonia.Platform; 7 | 8 | namespace DownKyi.Utils; 9 | 10 | public static class ImageHelper 11 | { 12 | public static Bitmap LoadFromResource(Uri? resourceUri) 13 | { 14 | return resourceUri?.Scheme switch 15 | { 16 | "avares" => LoadFromAvares(resourceUri), 17 | "file" => LoadFromFile(resourceUri), 18 | _ => new Bitmap("") 19 | }; 20 | } 21 | 22 | private static Bitmap LoadFromAvares(Uri resourceUri) 23 | { 24 | return new Bitmap(AssetLoader.Open(resourceUri)); 25 | } 26 | 27 | private static Bitmap LoadFromFile(Uri resourceUri) 28 | { 29 | return new Bitmap(resourceUri.LocalPath); 30 | } 31 | 32 | public static async Task LoadFromWeb(Uri url) 33 | { 34 | using var httpClient = new HttpClient(); 35 | try 36 | { 37 | var response = await httpClient.GetAsync(url); 38 | response.EnsureSuccessStatusCode(); 39 | var data = await response.Content.ReadAsByteArrayAsync(); 40 | return new Bitmap(new MemoryStream(data)); 41 | } 42 | catch (HttpRequestException ex) 43 | { 44 | Console.WriteLine($"An error occurred while downloading image '{url}' : {ex.Message}"); 45 | return null; 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /DownKyi/Utils/ThemeHelper.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Styling; 2 | using DownKyi.Core.Settings; 3 | 4 | namespace DownKyi.Utils; 5 | 6 | public static class ThemeHelper 7 | { 8 | public static void SetTheme(ThemeMode themeMode) 9 | { 10 | var themeVariant = themeMode switch 11 | { 12 | ThemeMode.Default => ThemeVariant.Default, 13 | ThemeMode.Dark => ThemeVariant.Dark, 14 | ThemeMode.Light => ThemeVariant.Light, 15 | _ => ThemeVariant.Dark 16 | }; 17 | App.Current.RequestedThemeVariant = themeVariant; 18 | } 19 | } -------------------------------------------------------------------------------- /DownKyi/ViewModels/Dialogs/NewVersionAvailableDialogViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.ObjectModel; 2 | using Avalonia.Controls.Documents; 3 | using DownKyi.Utils; 4 | using Prism.Commands; 5 | using Prism.Services.Dialogs; 6 | 7 | namespace DownKyi.ViewModels.Dialogs 8 | { 9 | public class NewVersionAvailableDialogViewModel : BaseDialogViewModel 10 | { 11 | public const string Tag = "NewVersionAvailable"; 12 | 13 | private DelegateCommand? _allowCommand; 14 | public DelegateCommand AllowCommand => _allowCommand ??= new DelegateCommand(ExecuteAllowCommand); 15 | 16 | /// 17 | /// 确认事件 18 | /// 19 | private void ExecuteAllowCommand() 20 | { 21 | const ButtonResult result = ButtonResult.OK; 22 | RaiseRequestClose(new DialogResult(result)); 23 | } 24 | 25 | public ObservableCollection Messages { get; set; } = new(); 26 | 27 | 28 | public override void OnDialogOpened(IDialogParameters parameters) 29 | { 30 | Messages.AddRange(MarkdownUtil.ConvertMarkdownToRuns(parameters.GetValue("body"))); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /DownKyi/ViewModels/PageViewModels/SpaceItem.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Images; 2 | using Prism.Mvvm; 3 | 4 | namespace DownKyi.ViewModels.PageViewModels; 5 | 6 | public class SpaceItem : BindableBase 7 | { 8 | private bool _isEnabled; 9 | 10 | public bool IsEnabled 11 | { 12 | get => _isEnabled; 13 | set => SetProperty(ref _isEnabled, value); 14 | } 15 | 16 | private VectorImage image; 17 | 18 | public VectorImage Image 19 | { 20 | get => image; 21 | set => SetProperty(ref image, value); 22 | } 23 | 24 | private string title; 25 | 26 | public string Title 27 | { 28 | get => title; 29 | set => SetProperty(ref title, value); 30 | } 31 | 32 | private string subtitle; 33 | 34 | public string Subtitle 35 | { 36 | get => subtitle; 37 | set => SetProperty(ref subtitle, value); 38 | } 39 | } -------------------------------------------------------------------------------- /DownKyi/ViewModels/PageViewModels/TabHeader.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Images; 2 | using Prism.Mvvm; 3 | 4 | namespace DownKyi.ViewModels.PageViewModels; 5 | 6 | public class TabHeader : BindableBase 7 | { 8 | private long id; 9 | 10 | public long Id 11 | { 12 | get => id; 13 | set => SetProperty(ref id, value); 14 | } 15 | 16 | private VectorImage image; 17 | 18 | public VectorImage Image 19 | { 20 | get => image; 21 | set => SetProperty(ref image, value); 22 | } 23 | 24 | private string title; 25 | 26 | public string Title 27 | { 28 | get => title; 29 | set => SetProperty(ref title, value); 30 | } 31 | 32 | private string subTitle; 33 | 34 | public string SubTitle 35 | { 36 | get => subTitle; 37 | set => SetProperty(ref subTitle, value); 38 | } 39 | } -------------------------------------------------------------------------------- /DownKyi/ViewModels/PageViewModels/VideoQuality.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Prism.Mvvm; 3 | 4 | namespace DownKyi.ViewModels.PageViewModels; 5 | 6 | public class VideoQuality : BindableBase 7 | { 8 | private int _quality; 9 | 10 | public int Quality 11 | { 12 | get => _quality; 13 | set => SetProperty(ref _quality, value); 14 | } 15 | 16 | private string _qualityFormat; 17 | 18 | public string QualityFormat 19 | { 20 | get => _qualityFormat; 21 | set => SetProperty(ref _qualityFormat, value); 22 | } 23 | 24 | private List _videoCodecList; 25 | 26 | public List VideoCodecList 27 | { 28 | get => _videoCodecList; 29 | set => SetProperty(ref _videoCodecList, value); 30 | } 31 | 32 | private string _selectedVideoCodec; 33 | 34 | public string SelectedVideoCodec 35 | { 36 | get => _selectedVideoCodec; 37 | set 38 | { 39 | if (value != null) 40 | { 41 | SetProperty(ref _selectedVideoCodec, value); 42 | } 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /DownKyi/ViewModels/PageViewModels/VideoSection.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Prism.Mvvm; 3 | 4 | namespace DownKyi.ViewModels.PageViewModels; 5 | 6 | public class VideoSection : BindableBase 7 | { 8 | public long Id { get; set; } 9 | 10 | private string _title; 11 | 12 | public string Title 13 | { 14 | get => _title; 15 | set => SetProperty(ref _title, value); 16 | } 17 | 18 | private bool _isSelected; 19 | 20 | public bool IsSelected 21 | { 22 | get => _isSelected; 23 | set => SetProperty(ref _isSelected, value); 24 | } 25 | 26 | private List _videoPages; 27 | 28 | public List VideoPages 29 | { 30 | get => _videoPages; 31 | set => SetProperty(ref _videoPages, value); 32 | } 33 | } -------------------------------------------------------------------------------- /DownKyi/ViewModels/Settings/DisplayFileNamePart.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Core.FileName; 2 | using Prism.Mvvm; 3 | 4 | namespace DownKyi.ViewModels.Settings; 5 | 6 | public class DisplayFileNamePart : BindableBase 7 | { 8 | public FileNamePart Id { get; set; } 9 | 10 | private string _title; 11 | 12 | public string Title 13 | { 14 | get => _title; 15 | set => SetProperty(ref _title, value); 16 | } 17 | } -------------------------------------------------------------------------------- /DownKyi/ViewModels/UserSpace/Channel.cs: -------------------------------------------------------------------------------- 1 | using Prism.Mvvm; 2 | 3 | namespace DownKyi.ViewModels.UserSpace; 4 | 5 | public class Channel : BindableBase 6 | { 7 | public long Cid { get; set; } 8 | 9 | /*private ImageSource cover; 10 | public ImageSource Cover 11 | { 12 | get => cover; 13 | set => SetProperty(ref cover, value); 14 | }*/ 15 | 16 | private string name; 17 | 18 | public string Name 19 | { 20 | get => name; 21 | set => SetProperty(ref name, value); 22 | } 23 | 24 | private int count; 25 | 26 | public int Count 27 | { 28 | get => count; 29 | set => SetProperty(ref count, value); 30 | } 31 | 32 | private string ctime; 33 | 34 | public string Ctime 35 | { 36 | get => ctime; 37 | set => SetProperty(ref ctime, value); 38 | } 39 | } -------------------------------------------------------------------------------- /DownKyi/ViewModels/UserSpace/PublicationZone.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Media; 2 | using Prism.Mvvm; 3 | 4 | namespace DownKyi.ViewModels.UserSpace; 5 | 6 | public class PublicationZone : BindableBase 7 | { 8 | public int Tid { get; set; } 9 | 10 | private DrawingImage icon; 11 | 12 | public DrawingImage Icon 13 | { 14 | get => icon; 15 | set => SetProperty(ref icon, value); 16 | } 17 | 18 | private string name; 19 | 20 | public string Name 21 | { 22 | get => name; 23 | set => SetProperty(ref name, value); 24 | } 25 | 26 | private int count; 27 | 28 | public int Count 29 | { 30 | get => count; 31 | set => SetProperty(ref count, value); 32 | } 33 | } -------------------------------------------------------------------------------- /DownKyi/ViewModels/UserSpace/SeasonsSeries.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Media.Imaging; 2 | using DownKyi.Images; 3 | using Prism.Mvvm; 4 | 5 | namespace DownKyi.ViewModels.UserSpace; 6 | 7 | public class SeasonsSeries : BindableBase 8 | { 9 | public long Id { get; set; } 10 | 11 | private string _cover; 12 | 13 | public string Cover 14 | { 15 | get => _cover; 16 | set => SetProperty(ref _cover, value); 17 | } 18 | 19 | private VectorImage typeImage; 20 | 21 | public VectorImage TypeImage 22 | { 23 | get => typeImage; 24 | set => SetProperty(ref typeImage, value); 25 | } 26 | 27 | private string name; 28 | 29 | public string Name 30 | { 31 | get => name; 32 | set => SetProperty(ref name, value); 33 | } 34 | 35 | private int count; 36 | 37 | public int Count 38 | { 39 | get => count; 40 | set => SetProperty(ref count, value); 41 | } 42 | 43 | private string ctime; 44 | 45 | public string Ctime 46 | { 47 | get => ctime; 48 | set => SetProperty(ref ctime, value); 49 | } 50 | } -------------------------------------------------------------------------------- /DownKyi/ViewModels/UserSpace/TabLeftBanner.cs: -------------------------------------------------------------------------------- 1 | using DownKyi.Images; 2 | using Prism.Mvvm; 3 | 4 | namespace DownKyi.ViewModels.UserSpace; 5 | 6 | public class TabLeftBanner : BindableBase 7 | { 8 | public object Object { get; set; } 9 | 10 | public int Id { get; set; } 11 | 12 | private bool isSelected; 13 | 14 | public bool IsSelected 15 | { 16 | get => isSelected; 17 | set => SetProperty(ref isSelected, value); 18 | } 19 | 20 | private VectorImage icon; 21 | 22 | public VectorImage Icon 23 | { 24 | get => icon; 25 | set => SetProperty(ref icon, value); 26 | } 27 | 28 | private string iconColor; 29 | 30 | public string IconColor 31 | { 32 | get => iconColor; 33 | set => SetProperty(ref iconColor, value); 34 | } 35 | 36 | private string title; 37 | 38 | public string Title 39 | { 40 | get => title; 41 | set => SetProperty(ref title, value); 42 | } 43 | } -------------------------------------------------------------------------------- /DownKyi/ViewModels/UserSpace/TabRightBanner.cs: -------------------------------------------------------------------------------- 1 | using Prism.Mvvm; 2 | 3 | namespace DownKyi.ViewModels.UserSpace; 4 | 5 | public class TabRightBanner : BindableBase 6 | { 7 | public int Id { get; set; } 8 | 9 | private bool isEnabled; 10 | 11 | public bool IsEnabled 12 | { 13 | get => isEnabled; 14 | set => SetProperty(ref isEnabled, value); 15 | } 16 | 17 | private string labelColor; 18 | 19 | public string LabelColor 20 | { 21 | get => labelColor; 22 | set => SetProperty(ref labelColor, value); 23 | } 24 | 25 | private string countColor; 26 | 27 | public string CountColor 28 | { 29 | get => countColor; 30 | set => SetProperty(ref countColor, value); 31 | } 32 | 33 | private string label; 34 | 35 | public string Label 36 | { 37 | get => label; 38 | set => SetProperty(ref label, value); 39 | } 40 | 41 | private string count; 42 | 43 | public string Count 44 | { 45 | get => count; 46 | set => SetProperty(ref count, value); 47 | } 48 | } -------------------------------------------------------------------------------- /DownKyi/Views/Dialogs/NewVersionAvailableDialog.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.Dialogs; 6 | 7 | public partial class NewVersionAvailableDialog : UserControl 8 | { 9 | public NewVersionAvailableDialog() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/Dialogs/ViewAlertDialog.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.Dialogs; 6 | 7 | public partial class ViewAlertDialog : UserControl 8 | { 9 | public ViewAlertDialog() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/Dialogs/ViewAlreadyDownloadedDialog.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.Dialogs; 6 | 7 | public partial class ViewAlreadyDownloadedDialog : UserControl 8 | { 9 | public ViewAlreadyDownloadedDialog() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/Dialogs/ViewDownloadSetter.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.Dialogs; 6 | 7 | public partial class ViewDownloadSetter : UserControl 8 | { 9 | public ViewDownloadSetter() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/Dialogs/ViewParsingSelector.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.Dialogs; 6 | 7 | public partial class ViewParsingSelector : UserControl 8 | { 9 | public ViewParsingSelector() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/DownloadManager/ViewDownloadFinished.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.DownloadManager; 6 | 7 | public partial class ViewDownloadFinished : UserControl 8 | { 9 | public ViewDownloadFinished() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/DownloadManager/ViewDownloading.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.DownloadManager; 6 | 7 | public partial class ViewDownloading : UserControl 8 | { 9 | public ViewDownloading() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/Friends/ViewFollower.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.Friends; 6 | 7 | public partial class ViewFollower : UserControl 8 | { 9 | public ViewFollower() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/Friends/ViewFollowing.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.Friends; 6 | 7 | public partial class ViewFollowing : UserControl 8 | { 9 | public ViewFollowing() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/MainWindow.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace DownKyi.Views; 4 | 5 | public partial class MainWindow : Window 6 | { 7 | public MainWindow() 8 | { 9 | InitializeComponent(); 10 | } 11 | } -------------------------------------------------------------------------------- /DownKyi/Views/Settings/ViewAbout.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.Settings; 6 | 7 | public partial class ViewAbout : UserControl 8 | { 9 | public ViewAbout() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/Settings/ViewBasic.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.Settings; 6 | 7 | public partial class ViewBasic : UserControl 8 | { 9 | public ViewBasic() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/Settings/ViewDanmaku.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.Settings; 6 | 7 | public partial class ViewDanmaku : UserControl 8 | { 9 | public ViewDanmaku() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/Settings/ViewNetwork.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.Settings; 6 | 7 | public partial class ViewNetwork : UserControl 8 | { 9 | public ViewNetwork() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/Settings/ViewVideo.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.Settings; 6 | 7 | public partial class ViewVideo : UserControl 8 | { 9 | public ViewVideo() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/Toolbox/ViewBiliHelper.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.Toolbox; 6 | 7 | public partial class ViewBiliHelper : UserControl 8 | { 9 | public ViewBiliHelper() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/Toolbox/ViewDelogo.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.Toolbox; 6 | 7 | public partial class ViewDelogo : UserControl 8 | { 9 | public ViewDelogo() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/Toolbox/ViewExtractMedia.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.Toolbox; 6 | 7 | public partial class ViewExtractMedia : UserControl 8 | { 9 | public ViewExtractMedia() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/UserSpace/ViewArchive.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.UserSpace; 6 | 7 | public partial class ViewArchive : UserControl 8 | { 9 | public ViewArchive() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/UserSpace/ViewSeasonsSeries.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views.UserSpace; 6 | 7 | public partial class ViewSeasonsSeries : UserControl 8 | { 9 | public ViewSeasonsSeries() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/ViewDownloadManager.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views; 6 | 7 | public partial class ViewDownloadManager : UserControl 8 | { 9 | public ViewDownloadManager() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/ViewFriends.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views; 6 | 7 | public partial class ViewFriends : UserControl 8 | { 9 | public ViewFriends() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/ViewIndex.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views; 6 | 7 | public partial class ViewIndex : UserControl 8 | { 9 | public ViewIndex() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/ViewLogin.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views; 6 | 7 | public partial class ViewLogin : UserControl 8 | { 9 | public ViewLogin() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/ViewMyBangumiFollow.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views; 6 | 7 | public partial class ViewMyBangumiFollow : UserControl 8 | { 9 | public ViewMyBangumiFollow() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/ViewMyFavorites.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views; 6 | 7 | public partial class ViewMyFavorites : UserControl 8 | { 9 | public ViewMyFavorites() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/ViewMyHistory.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views; 6 | 7 | public partial class ViewMyHistory : UserControl 8 | { 9 | public ViewMyHistory() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/ViewMySpace.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views; 6 | 7 | public partial class ViewMySpace : UserControl 8 | { 9 | public ViewMySpace() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/ViewMyToViewVideo.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views; 6 | 7 | public partial class ViewMyToViewVideo : UserControl 8 | { 9 | public ViewMyToViewVideo() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/ViewPublicFavorites.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views; 6 | 7 | public partial class ViewPublicFavorites : UserControl 8 | { 9 | public ViewPublicFavorites() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/ViewPublication.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views; 6 | 7 | public partial class ViewPublication : UserControl 8 | { 9 | public ViewPublication() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/ViewSeasonsSeries.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views; 6 | 7 | public partial class ViewSeasonsSeries : UserControl 8 | { 9 | public ViewSeasonsSeries() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/ViewSettings.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views; 6 | 7 | public partial class ViewSettings : UserControl 8 | { 9 | public ViewSettings() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/ViewToolbox.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views; 6 | 7 | public partial class ViewToolbox : UserControl 8 | { 9 | public ViewToolbox() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/ViewUserSpace.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views; 6 | 7 | public partial class ViewUserSpace : UserControl 8 | { 9 | public ViewUserSpace() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/Views/ViewVideoDetail.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace DownKyi.Views; 6 | 7 | public partial class ViewVideoDetail : UserControl 8 | { 9 | public ViewVideoDetail() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /DownKyi/app.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /script/aria2.ps1: -------------------------------------------------------------------------------- 1 | param($arch) 2 | function Create-Dir($dir) { 3 | if (!(Test-Path -Path $dir)) { 4 | New-Item $dir -ItemType "directory" 5 | } 6 | } 7 | 8 | Create-Dir ".\downloads" 9 | 10 | $url=""; 11 | if ($arch -eq "x86") { 12 | $url="https://github.com/yaobiao131/downkyi-aria2-static-build/releases/download/1.37.0/aria2-i686-w64-mingw32_static.zip"; 13 | } 14 | 15 | if ($arch -eq "x64") { 16 | $url="https://github.com/yaobiao131/downkyi-aria2-static-build/releases/download/1.37.0/aria2-x86_64-w64-mingw32_static.zip"; 17 | } 18 | 19 | Start-BitsTransfer -Source $url -Destination ".\downloads\aria2-$arch.zip"; 20 | 21 | $destDir="..\DownKyi.Core\Binary\win-$arch\aria2\"; 22 | 23 | Expand-Archive -Path ".\downloads\aria2-$arch.zip" -DestinationPath ".\aria2" -Force 24 | Create-Dir $destDir 25 | 26 | Copy-Item ".\aria2\aria2c.exe" "$destDir\aria2c.exe" -Force 27 | 28 | Remove-Item ".\aria2" -Recurse -Force -------------------------------------------------------------------------------- /script/aria2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | download_dir="./downloads" 3 | save_path="../DownKyi.Core/Binary" 4 | 5 | if [ ! -d "$download_dir" ]; then 6 | mkdir "$download_dir" 7 | fi 8 | 9 | create_dir() { 10 | if [ ! -d "$1" ]; then 11 | mkdir -p "$1" 12 | fi 13 | } 14 | 15 | download_aria2() { 16 | local download_url 17 | local save 18 | case $1 in 19 | linux-x64) 20 | save="$save_path/$1/aria2" 21 | download_url="https://github.com/yaobiao131/downkyi-aria2-static-build/releases/download/1.37.0/aria2-x86_64-linux-musl_static.zip" 22 | ;; 23 | linux-arm64) 24 | save="$save_path/$1/aria2" 25 | download_url="https://github.com/yaobiao131/downkyi-aria2-static-build/releases/download/1.37.0/aria2-aarch64-linux-musl_static.zip" 26 | ;; 27 | osx-x64) 28 | save="$save_path/$1/aria2" 29 | download_url="https://github.com/yaobiao131/downkyi-aria2-static-build/releases/download/1.37.0/aria2-x86_64-apple-darwin_static.zip" 30 | ;; 31 | osx-arm64) 32 | save="$save_path/$1/aria2" 33 | download_url="https://github.com/yaobiao131/downkyi-aria2-static-build/releases/download/1.37.0/aria2-aarch64-apple-darwin_static.zip" 34 | ;; 35 | esac 36 | 37 | curl -kL "$download_url" -o "$download_dir/aria2.zip" 38 | create_dir "$save" 39 | unzip -o -d "$save" "$download_dir/aria2.zip" 40 | chmod +x "$save/aria2c" 41 | } 42 | 43 | download_aria2 "$@" 44 | -------------------------------------------------------------------------------- /script/ffmpeg.ps1: -------------------------------------------------------------------------------- 1 | param($arch) 2 | function Create-Dir($dir) { 3 | if (!(Test-Path -Path $dir)) { 4 | New-Item $dir -ItemType "directory" 5 | } 6 | } 7 | 8 | Create-Dir ".\downloads" 9 | $url=""; 10 | $dir=""; 11 | if ($arch -eq "x86") { 12 | $url="https://github.com/yaobiao131/downkyi-ffmpeg-build/releases/download/continuous/ffmpeg-i686-w64-mingw32_static.zip"; 13 | } 14 | 15 | if ($arch -eq "x64") { 16 | $url="https://github.com/yaobiao131/downkyi-ffmpeg-build/releases/download/continuous/ffmpeg-x86_64-w64-mingw32_static.zip"; 17 | } 18 | 19 | Start-BitsTransfer -Source $url -Destination ".\downloads\ffmpeg-$arch.zip"; 20 | 21 | $destDir="..\DownKyi.Core\Binary\win-$arch\ffmpeg\"; 22 | 23 | Expand-Archive -Path ".\downloads\ffmpeg-$arch.zip" -DestinationPath $destDir -Force 24 | -------------------------------------------------------------------------------- /script/ffmpeg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | os=$1 3 | arch=$2 4 | 5 | ffmpeg_save_path="../DownKyi.Core/Binary" 6 | download_dir="./downloads" 7 | 8 | create_dir() { 9 | if [ ! -d "$1" ]; then 10 | mkdir -p "$1" 11 | fi 12 | } 13 | 14 | create_dir "$download_dir" 15 | 16 | download_ffmpeg_macos() { 17 | local filename="" 18 | case $arch in 19 | x64) 20 | filename=ffmpeg-x86_64-apple-darwin_static.zip 21 | ;; 22 | arm64) 23 | filename=ffmpeg-aarch64-apple-darwin_static.zip 24 | ;; 25 | esac 26 | local url="https://github.com/yaobiao131/downkyi-ffmpeg-build/releases/download/continuous/$filename" 27 | create_dir "$ffmpeg_save_path/osx-$arch/ffmpeg" 28 | curl -kL "$url" -o "$download_dir/ffmpeg.zip" 29 | unzip -d "$ffmpeg_save_path/osx-$arch/ffmpeg/" -o "$download_dir/ffmpeg.zip" 30 | chmod +x "$ffmpeg_save_path/osx-$arch/ffmpeg/ffmpeg" 31 | } 32 | 33 | download_ffmpeg_linux() { 34 | local filename="" 35 | case $arch in 36 | x64) 37 | filename=ffmpeg-x86_64-linux-musl_static.zip 38 | ;; 39 | arm64) 40 | filename=ffmpeg-aarch64-linux-musl_static.zip 41 | ;; 42 | esac 43 | local url="https://github.com/yaobiao131/downkyi-ffmpeg-build/releases/download/continuous/$filename" 44 | create_dir "$ffmpeg_save_path/linux-$arch/ffmpeg" 45 | curl -kL "$url" -o "$download_dir/ffmpeg.zip" 46 | unzip -d "$ffmpeg_save_path/linux-$arch/ffmpeg/" -o "$download_dir/ffmpeg.zip" 47 | chmod +x "$ffmpeg_save_path/linux-$arch/ffmpeg/ffmpeg" 48 | } 49 | 50 | if [ "$os" == "mac" ]; then 51 | download_ffmpeg_macos 52 | elif [ "$os" == "linux" ]; then 53 | download_ffmpeg_linux 54 | else 55 | echo "不支持的操作系统" 56 | fi 57 | -------------------------------------------------------------------------------- /script/macos/DownKyi.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.cs.allow-jit 6 | 7 | com.apple.security.automation.apple-events 8 | 9 | 10 | -------------------------------------------------------------------------------- /script/macos/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIconFile 6 | logo.icns 7 | CFBundleIdentifier 8 | cn.bzdrs.downkyi 9 | CFBundleName 10 | 哔哩下载姬 11 | CFBundleVersion 12 | 1.0.20 13 | LSMinimumSystemVersion 14 | 10.15 15 | CFBundleExecutable 16 | DownKyi 17 | CFBundleInfoDictionaryVersion 18 | 6.0 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | NSHighResolutionCapable 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /script/macos/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/script/macos/logo.icns -------------------------------------------------------------------------------- /script/macos/package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | arch=$1 3 | APP_NAME="./哔哩下载姬.app" 4 | PUBLISH_OUTPUT_DIRECTORY="../../DownKyi/bin/Release/net6.0/osx-$arch/publish/." 5 | 6 | INFO_PLIST="./Info.plist" 7 | ICON_FILE="./logo.icns" 8 | 9 | if [ -d "$APP_NAME" ]; then 10 | rm -rf "$APP_NAME" 11 | fi 12 | 13 | mkdir "$APP_NAME" 14 | 15 | mkdir "$APP_NAME/Contents" 16 | mkdir "$APP_NAME/Contents/MacOS" 17 | mkdir "$APP_NAME/Contents/Resources" 18 | 19 | cp "$INFO_PLIST" "$APP_NAME/Contents/Info.plist" 20 | cp "$ICON_FILE" "$APP_NAME/Contents/Resources/$ICON_FILE" 21 | cp -a "$PUBLISH_OUTPUT_DIRECTORY" "$APP_NAME/Contents/MacOS" 22 | if [ ! -x $APP_NAME/Contents/MacOS/aria2/aria2c ]; then 23 | chmod +x $APP_NAME/Contents/MacOS/aria2/aria2c 24 | fi 25 | if [ ! -x $APP_NAME/Contents/MacOS/aria2/aria2c ]; then 26 | chmod +x $APP_NAME/Contents/MacOS/aria2/aria2c 27 | fi 28 | -------------------------------------------------------------------------------- /script/macos/sign.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | APP_NAME="哔哩下载姬.app" 3 | ENTITLEMENTS="DownKyi.entitlements" 4 | SIGNING_IDENTITY="biao yao" # matches Keychain Access certificate name 5 | 6 | find "$APP_NAME/Contents/MacOS/" | while read fname; do 7 | if [[ -f $fname ]]; then 8 | echo "[INFO] Signing $fname" 9 | codesign --force --timestamp --options=runtime --entitlements "$ENTITLEMENTS" --sign "$SIGNING_IDENTITY" "$fname" 10 | fi 11 | done 12 | 13 | echo "[INFO] Signing app file" 14 | 15 | codesign --force --timestamp --options=runtime --entitlements "$ENTITLEMENTS" --sign "$SIGNING_IDENTITY" "$APP_NAME" 16 | -------------------------------------------------------------------------------- /script/pupnet/app.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=${APP_FRIENDLY_NAME} 4 | Icon=${APP_ID} 5 | Comment=${APP_SHORT_SUMMARY} 6 | Exec=env LANG=zn_CN.UTF-8 ${INSTALL_EXEC} 7 | TryExec=${INSTALL_EXEC} 8 | NoDisplay=${DESKTOP_NODISPLAY} 9 | X-AppImage-Integrate=${DESKTOP_INTEGRATE} 10 | Terminal=${DESKTOP_TERMINAL} 11 | Categories=${PRIME_CATEGORY} 12 | MimeType= 13 | Keywords= -------------------------------------------------------------------------------- /script/pupnet/icons/logo.1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/script/pupnet/icons/logo.1024.png -------------------------------------------------------------------------------- /script/pupnet/icons/logo.128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/script/pupnet/icons/logo.128.png -------------------------------------------------------------------------------- /script/pupnet/icons/logo.16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/script/pupnet/icons/logo.16.png -------------------------------------------------------------------------------- /script/pupnet/icons/logo.256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/script/pupnet/icons/logo.256.png -------------------------------------------------------------------------------- /script/pupnet/icons/logo.32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/script/pupnet/icons/logo.32.png -------------------------------------------------------------------------------- /script/pupnet/icons/logo.512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/script/pupnet/icons/logo.512.png -------------------------------------------------------------------------------- /script/pupnet/icons/logo.64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/script/pupnet/icons/logo.64.png -------------------------------------------------------------------------------- /script/pupnet/icons/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/script/pupnet/icons/logo.icns -------------------------------------------------------------------------------- /script/pupnet/icons/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yaobiao131/downkyicore/1d78a57b41760b49829d2990b4b3125e93715f05/script/pupnet/icons/logo.ico -------------------------------------------------------------------------------- /version.txt: -------------------------------------------------------------------------------- 1 | 1.0.20 --------------------------------------------------------------------------------