├── .github └── workflows │ ├── android-test.yml │ └── main.yaml ├── .gitignore ├── .vscode └── extensions.json ├── LICENSE ├── README.md ├── auto-imports.d.ts ├── bun.lockb ├── components.d.ts ├── eslint.config.js ├── index.html ├── package.json ├── postcss.config.js ├── src-tauri ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── build.rs ├── capabilities │ └── default.json ├── gen │ └── android │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── app │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ ├── proguard-rules.pro │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── tech │ │ │ │ └── lq0 │ │ │ │ └── biliresourcedownloader │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── drawable │ │ │ └── ic_launcher_background.xml │ │ │ ├── layout │ │ │ └── activity_main.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── values-night │ │ │ └── themes.xml │ │ │ ├── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── themes.xml │ │ │ └── xml │ │ │ └── file_paths.xml │ │ ├── build.gradle.kts │ │ ├── buildSrc │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── tech │ │ │ └── lq0 │ │ │ └── biliresourcedownloader │ │ │ └── kotlin │ │ │ ├── BuildTask.kt │ │ │ └── RustPlugin.kt │ │ ├── gradle.properties │ │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle ├── icons │ ├── 128x128.png │ ├── 128x128@2x.png │ ├── 32x32.png │ ├── Square107x107Logo.png │ ├── Square142x142Logo.png │ ├── Square150x150Logo.png │ ├── Square284x284Logo.png │ ├── Square30x30Logo.png │ ├── Square310x310Logo.png │ ├── Square44x44Logo.png │ ├── Square71x71Logo.png │ ├── Square89x89Logo.png │ ├── StoreLogo.png │ ├── android │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ └── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ ├── icon.icns │ ├── icon.ico │ ├── icon.png │ └── ios │ │ ├── AppIcon-20x20@1x.png │ │ ├── AppIcon-20x20@2x-1.png │ │ ├── AppIcon-20x20@2x.png │ │ ├── AppIcon-20x20@3x.png │ │ ├── AppIcon-29x29@1x.png │ │ ├── AppIcon-29x29@2x-1.png │ │ ├── AppIcon-29x29@2x.png │ │ ├── AppIcon-29x29@3x.png │ │ ├── AppIcon-40x40@1x.png │ │ ├── AppIcon-40x40@2x-1.png │ │ ├── AppIcon-40x40@2x.png │ │ ├── AppIcon-40x40@3x.png │ │ ├── AppIcon-512@2x.png │ │ ├── AppIcon-60x60@2x.png │ │ ├── AppIcon-60x60@3x.png │ │ ├── AppIcon-76x76@1x.png │ │ ├── AppIcon-76x76@2x.png │ │ └── AppIcon-83.5x83.5@2x.png ├── src │ ├── invoke │ │ └── mod.rs │ ├── lib.rs │ └── main.rs └── tauri.conf.json ├── src ├── APIFetch.ts ├── App.vue ├── components │ ├── AppBackground.vue │ ├── BatchDownloadButton.vue │ ├── CustomDivider.vue │ ├── DebugButton.vue │ ├── DownloadManager.vue │ ├── GarbSearchCard.vue │ ├── ImageVideoCard.vue │ ├── LoginManager.vue │ ├── LoginRequired.vue │ ├── LottieAnimationCard.vue │ ├── QRCodeDialogButton.vue │ ├── SVGACard.vue │ ├── SingleLotteryPage.vue │ ├── UPInfo.vue │ └── VideoCard.vue ├── env.d.ts ├── main.ts ├── pages │ ├── [...path].vue │ ├── about.vue │ ├── dynamic │ │ └── [id].vue │ ├── emoji │ │ └── [id].vue │ ├── index.vue │ ├── liveroom │ │ └── [id].vue │ ├── lottery.vue │ ├── search │ │ ├── emoji.vue │ │ ├── garb.vue │ │ └── general.vue │ ├── settings.vue │ ├── space │ │ └── [id].vue │ ├── suit │ │ └── [id].vue │ ├── tool │ │ ├── lottie.vue │ │ ├── svga.vue │ │ └── webp.vue │ └── video │ │ └── [id].vue ├── store │ └── useWbiStore │ │ ├── api │ │ └── index.ts │ │ ├── hooks │ │ └── useWbi.ts │ │ ├── index.ts │ │ ├── internal.ts │ │ └── types.d.ts ├── style.css ├── types.ts ├── utils │ ├── cliboardListener.ts │ ├── debug.ts │ ├── deviceUtils.ts │ ├── downloadManager.ts │ ├── globalConfig.ts │ ├── image.ts │ ├── linkResolver.ts │ ├── loginManager.ts │ └── wbi.ts └── vite-env.d.ts ├── tailwind.config.js ├── tsconfig.json ├── tsconfig.node.json ├── typed-router.d.ts └── vite.config.ts /.github/workflows/android-test.yml: -------------------------------------------------------------------------------- 1 | name: 'release' 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | tags: 7 | - "v*" 8 | 9 | jobs: 10 | publish-tauri: 11 | permissions: 12 | contents: write 13 | strategy: 14 | fail-fast: false 15 | matrix: 16 | include: 17 | - platform: 'macos-latest' # for Arm based macs (M1 and above). 18 | args: '--target aarch64-apple-darwin' 19 | - platform: 'macos-latest' # for Intel based macs. 20 | args: '--target x86_64-apple-darwin' 21 | - platform: 'ubuntu-22.04' 22 | args: '' 23 | mobile: true 24 | - platform: 'windows-latest' 25 | args: '' 26 | 27 | runs-on: ${{ matrix.platform }} 28 | steps: 29 | - uses: actions/checkout@v4 30 | 31 | - name: install dependencies (ubuntu only) 32 | if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above. 33 | run: | 34 | sudo apt-get update 35 | sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf 36 | - name: setup bun 37 | uses: oven-sh/setup-bun@v1 38 | 39 | - name: install Rust stable 40 | uses: dtolnay/rust-toolchain@stable 41 | with: 42 | targets: | 43 | ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} 44 | ${{ matrix.platform == 'ubuntu-22.04' && 'aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android' || '' }} 45 | 46 | - name: Rust cache 47 | uses: swatinem/rust-cache@v2 48 | with: 49 | workspaces: './src-tauri -> target' 50 | 51 | - name: Setup Java (Android only) 52 | if: matrix.mobile 53 | uses: actions/setup-java@v4 54 | with: 55 | distribution: 'zulu' 56 | java-version: '17' 57 | 58 | - name: Setup Android SDK (Android only) 59 | if: matrix.mobile 60 | uses: android-actions/setup-android@v3 61 | 62 | - name: Install NDK (Android only) 63 | if: matrix.mobile 64 | run: sdkmanager "ndk;27.0.11902837" 65 | 66 | 67 | - name: setup Android signing (Android only) 68 | if: matrix.mobile 69 | run: | 70 | cd src-tauri/gen/android 71 | echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" > keystore.properties 72 | echo "password=${{ secrets.ANDROID_KEY_PASSWORD }}" >> keystore.properties 73 | base64 -d <<< "${{ secrets.ANDROID_KEY_BASE64 }}" > $RUNNER_TEMP/keystore.jks 74 | echo "storeFile=$RUNNER_TEMP/keystore.jks" >> keystore.properties 75 | 76 | - name: install frontend dependencies 77 | # If you don't have `beforeBuildCommand` configured you may want to build your frontend here too. 78 | run: bun install # change this to npm or pnpm depending on which one you use. 79 | 80 | - uses: tauri-apps/tauri-action@3c20edcd47f6c6fa6d7bd17d279e1c1b454ff57d 81 | env: 82 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 83 | NDK_HOME: ${{ env.ANDROID_HOME }}/ndk/27.0.11902837 84 | with: 85 | tagName: app-android-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. 86 | releaseName: 'App android v__VERSION__' 87 | releaseBody: 'See the assets to download this version and install.' 88 | releaseDraft: true 89 | prerelease: false 90 | includeAndroid: ${{ matrix.mobile || false }} 91 | args: ${{ matrix.args }} -------------------------------------------------------------------------------- /.github/workflows/main.yaml: -------------------------------------------------------------------------------- 1 | name: 'release' 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | tags: 7 | - "v*" 8 | 9 | jobs: 10 | publish-tauri: 11 | permissions: 12 | contents: write 13 | strategy: 14 | fail-fast: false 15 | matrix: 16 | include: 17 | - platform: 'macos-latest' # for Arm based macs (M1 and above). 18 | args: '--target aarch64-apple-darwin' 19 | - platform: 'macos-latest' # for Intel based macs. 20 | args: '--target x86_64-apple-darwin' 21 | - platform: 'ubuntu-22.04' 22 | args: '' 23 | - platform: 'windows-latest' 24 | args: '' 25 | 26 | runs-on: ${{ matrix.platform }} 27 | steps: 28 | - uses: actions/checkout@v4 29 | 30 | - name: install dependencies (ubuntu only) 31 | if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above. 32 | run: | 33 | sudo apt-get update 34 | sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf 35 | - name: setup bun 36 | uses: oven-sh/setup-bun@v1 37 | 38 | - name: install Rust stable 39 | uses: dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly 40 | with: 41 | # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. 42 | targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} 43 | 44 | - name: Rust cache 45 | uses: swatinem/rust-cache@v2 46 | with: 47 | workspaces: './src-tauri -> target' 48 | 49 | - name: install frontend dependencies 50 | # If you don't have `beforeBuildCommand` configured you may want to build your frontend here too. 51 | run: bun install # change this to npm or pnpm depending on which one you use. 52 | 53 | - uses: tauri-apps/tauri-action@v0 54 | env: 55 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 56 | with: 57 | tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. 58 | releaseName: 'App v__VERSION__' 59 | releaseBody: 'See the assets to download this version and install.' 60 | releaseDraft: true 61 | prerelease: false 62 | args: ${{ matrix.args }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "Vue.volar", 4 | "tauri-apps.tauri-vscode", 5 | "rust-lang.rust-analyzer" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 LightQuanta and other contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BiliResourceDownloader 2 | 3 | ![MIT](https://img.shields.io/github/license/LightQuanta/BiliResourceDownloader 4 | ) 5 | ![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/LightQuanta/BiliResourceDownloader/total) 6 | ![GitHub Release](https://img.shields.io/github/v/release/LightQuanta/BiliResourceDownloader) 7 | ![Platform](https://img.shields.io/badge/Platform-%20win%20|%20linux%20|%20mac-lightgrey.svg) 8 | ![GitHub last commit](https://img.shields.io/github/last-commit/LightQuanta/BiliResourceDownloader) 9 | 10 | 多功能B站资源下载器 11 | 12 | ## 功能 13 | 14 | - 收藏集搜索、解析与下载(包括收藏集图片、视频、表情包、对应的装扮等) 15 | - 个性装扮搜索、解析与下载(包括空间背景图、App端皮肤、评论/动态背景、表情包、加载进度条、点赞动画等) 16 | - 站内评论区表情包搜索、解析与下载 17 | - 直播间:直播间封面、网页端和App端直播间背景图、UP主大表情、房间专属表情解析与下载 18 | - 个人主页:头像、网页端和App端空间背景图、充电表情、收藏集卡牌、头像框、粉丝装扮解析与下载 19 | - 视频封面下载 20 | - 动态使用装扮解析,动态图片批量下载,动态九宫格图片拼接 21 | - 部分装扮进度条使用的 [SVGA动画](https://svga.dev/) 、点赞动画使用的 [Lottie动画](https://airbnb.io/lottie/#/) 22 | 的预览、解析与导出为序列帧图片 23 | - ~~自定义软件背景图~~ 24 | 25 | ## 下载 26 | 27 | 1. [蓝奏云(仅Windows版)](https://lightquanta.lanzn.com/inQGh2ggo60f),密码:cx01 28 | 29 | 2. 查看项目发行版(Release),Windows用户请下载 ` 30 | biliresourcedownloader_版本号_x64-setup.exe` 31 | 32 | ## 文档 33 | 34 | WIP 35 | 36 | ## 主要技术栈 37 | 38 | - 软件本体使用 [Tauri框架](https://tauri.app/zh-cn/) 进行搭建 39 | - 前端包管理使用 [bun](https://bun.sh/) 40 | - 前端页面使用 [Vue.js](https://cn.vuejs.org/) 和 [ElementPlus](https://cn.element-plus.org/zh-CN/) 进行构建 41 | - Wbi签名算法,App 42 | API签名算法,部分API的文档参考 [bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect) 43 | 44 | ## TODO 45 | 46 | - Android端支持(缺布局适配,缺文件选择、下载适配) 47 | 48 | - 视频下载(也许会做?) 49 | 50 | - 专栏解析 51 | 52 | ## 开源协议 53 | 54 | 本项目基于 [MIT协议](./LICENSE) 进行开源 -------------------------------------------------------------------------------- /bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/bun.lockb -------------------------------------------------------------------------------- /components.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // @ts-nocheck 3 | // Generated by unplugin-vue-components 4 | // Read more: https://github.com/vuejs/core/pull/3399 5 | export {} 6 | 7 | /* prettier-ignore */ 8 | declare module 'vue' { 9 | export interface GlobalComponents { 10 | AppBackground: typeof import('./src/components/AppBackground.vue')['default'] 11 | BatchDownloadButton: typeof import('./src/components/BatchDownloadButton.vue')['default'] 12 | CustomDivider: typeof import('./src/components/CustomDivider.vue')['default'] 13 | DebugButton: typeof import('./src/components/DebugButton.vue')['default'] 14 | DownloadManager: typeof import('./src/components/DownloadManager.vue')['default'] 15 | ElButton: typeof import('element-plus/es')['ElButton'] 16 | ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup'] 17 | ElCard: typeof import('element-plus/es')['ElCard'] 18 | ElCarousel: typeof import('element-plus/es')['ElCarousel'] 19 | ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem'] 20 | ElDescriptions: typeof import('element-plus/es')['ElDescriptions'] 21 | ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem'] 22 | ElDialog: typeof import('element-plus/es')['ElDialog'] 23 | ElDivider: typeof import('element-plus/es')['ElDivider'] 24 | ElDrawer: typeof import('element-plus/es')['ElDrawer'] 25 | ElForm: typeof import('element-plus/es')['ElForm'] 26 | ElFormItem: typeof import('element-plus/es')['ElFormItem'] 27 | ElIcon: typeof import('element-plus/es')['ElIcon'] 28 | ElImage: typeof import('element-plus/es')['ElImage'] 29 | ElInput: typeof import('element-plus/es')['ElInput'] 30 | ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] 31 | ElLink: typeof import('element-plus/es')['ElLink'] 32 | ElMenu: typeof import('element-plus/es')['ElMenu'] 33 | ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] 34 | ElOption: typeof import('element-plus/es')['ElOption'] 35 | ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] 36 | ElPopover: typeof import('element-plus/es')['ElPopover'] 37 | ElProgress: typeof import('element-plus/es')['ElProgress'] 38 | ElRadio: typeof import('element-plus/es')['ElRadio'] 39 | ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] 40 | ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] 41 | ElResult: typeof import('element-plus/es')['ElResult'] 42 | ElSelect: typeof import('element-plus/es')['ElSelect'] 43 | ElSlider: typeof import('element-plus/es')['ElSlider'] 44 | ElSpace: typeof import('element-plus/es')['ElSpace'] 45 | ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] 46 | ElSwitch: typeof import('element-plus/es')['ElSwitch'] 47 | ElTabPane: typeof import('element-plus/es')['ElTabPane'] 48 | ElTabs: typeof import('element-plus/es')['ElTabs'] 49 | ElTag: typeof import('element-plus/es')['ElTag'] 50 | ElText: typeof import('element-plus/es')['ElText'] 51 | ElTooltip: typeof import('element-plus/es')['ElTooltip'] 52 | ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] 53 | ElUpload: typeof import('element-plus/es')['ElUpload'] 54 | GarbSearchCard: typeof import('./src/components/GarbSearchCard.vue')['default'] 55 | IEpArrowLeftBold: typeof import('~icons/ep/arrow-left-bold')['default'] 56 | IEpArrowRightBold: typeof import('~icons/ep/arrow-right-bold')['default'] 57 | IEpClose: typeof import('~icons/ep/close')['default'] 58 | IEpDownload: typeof import('~icons/ep/download')['default'] 59 | IEpFullScreen: typeof import('~icons/ep/full-screen')['default'] 60 | IEpHomeFilled: typeof import('~icons/ep/home-filled')['default'] 61 | IEpInfoFilled: typeof import('~icons/ep/info-filled')['default'] 62 | IEpMinus: typeof import('~icons/ep/minus')['default'] 63 | IEpRefresh: typeof import('~icons/ep/refresh')['default'] 64 | IEpSearch: typeof import('~icons/ep/search')['default'] 65 | IEpSetting: typeof import('~icons/ep/setting')['default'] 66 | IEpTools: typeof import('~icons/ep/tools')['default'] 67 | IEpUploadFilled: typeof import('~icons/ep/upload-filled')['default'] 68 | IEpUserFilled: typeof import('~icons/ep/user-filled')['default'] 69 | IEpVideoPause: typeof import('~icons/ep/video-pause')['default'] 70 | IEpVideoPlay: typeof import('~icons/ep/video-play')['default'] 71 | ImageVideoCard: typeof import('./src/components/ImageVideoCard.vue')['default'] 72 | LoginManager: typeof import('./src/components/LoginManager.vue')['default'] 73 | LoginRequired: typeof import('./src/components/LoginRequired.vue')['default'] 74 | LottieAnimationCard: typeof import('./src/components/LottieAnimationCard.vue')['default'] 75 | QRCodeDialogButton: typeof import('./src/components/QRCodeDialogButton.vue')['default'] 76 | RouterLink: typeof import('vue-router')['RouterLink'] 77 | RouterView: typeof import('vue-router')['RouterView'] 78 | SingleLotteryPage: typeof import('./src/components/SingleLotteryPage.vue')['default'] 79 | SVGACard: typeof import('./src/components/SVGACard.vue')['default'] 80 | UPInfo: typeof import('./src/components/UPInfo.vue')['default'] 81 | VideoCard: typeof import('./src/components/VideoCard.vue')['default'] 82 | } 83 | export interface ComponentCustomProperties { 84 | vInfiniteScroll: typeof import('element-plus/es')['ElInfiniteScroll'] 85 | vLoading: typeof import('element-plus/es')['ElLoadingDirective'] 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | import globals from "globals"; 2 | import pluginJs from "@eslint/js"; 3 | import tseslint from "typescript-eslint"; 4 | import pluginVue from "eslint-plugin-vue"; 5 | 6 | 7 | export default [ 8 | { files: ["**/*.{js,mjs,cjs,ts,vue}"] }, 9 | { languageOptions: { globals: globals.browser } }, 10 | pluginJs.configs.recommended, 11 | ...tseslint.configs.strict, 12 | ...tseslint.configs.stylistic, 13 | { 14 | // 解决auto-import的报错 15 | rules: { "no-undef": "off" }, 16 | }, 17 | ...pluginVue.configs["flat/strongly-recommended"], 18 | { 19 | // 关闭pages下的命名检查 20 | files: ["src/pages/**"], 21 | rules: { 22 | 'vue/multi-word-component-names': 'off', 23 | } 24 | }, 25 | { files: ["**/*.vue"], languageOptions: { parserOptions: { parser: tseslint.parser } } }, 26 | ]; -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | BiliResourceDownloader 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "biliresourcedownloader", 3 | "private": true, 4 | "version": "1.2.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview", 10 | "tauri": "tauri", 11 | "buildAll": "tauri build -b" 12 | }, 13 | "dependencies": { 14 | "@element-plus/icons-vue": "^2.3.1", 15 | "@tauri-apps/api": "^2.0.3", 16 | "@tauri-apps/plugin-clipboard-manager": "^2.0.0", 17 | "@tauri-apps/plugin-dialog": "~2.0.1", 18 | "@tauri-apps/plugin-fs": "~2", 19 | "@tauri-apps/plugin-http": "^2.0.1", 20 | "@tauri-apps/plugin-os": "~2", 21 | "@tauri-apps/plugin-shell": "^2.0.1", 22 | "@tauri-apps/plugin-store": "~2.1.0", 23 | "@tauri-apps/plugin-upload": "~2.0.0", 24 | "@vueuse/core": "^11.1.0", 25 | "element-plus": "^2.8.6", 26 | "eslint": "^9.13.0", 27 | "eslint-plugin-vue": "^9.30.0", 28 | "fuse.js": "^7.0.0", 29 | "json-editor-vue": "^0.17.3", 30 | "lottie-web": "^5.12.2", 31 | "md5": "^2.3.0", 32 | "mitt": "^3.0.1", 33 | "pinia": "^2.2.4", 34 | "qrcode": "^1.5.4", 35 | "svga": "^2.1.1", 36 | "vue": "^3.5.12", 37 | "vue-router": "^4.4.5" 38 | }, 39 | "devDependencies": { 40 | "@eslint/js": "^9.13.0", 41 | "@iconify-json/ep": "^1.2.1", 42 | "@tauri-apps/cli": "^2.0.4", 43 | "@types/md5": "^2.3.5", 44 | "@types/qrcode": "^1.5.5", 45 | "@vitejs/plugin-vue": "^5.1.4", 46 | "autoprefixer": "^10.4.20", 47 | "globals": "^15.11.0", 48 | "postcss": "^8.4.47", 49 | "tailwindcss": "^3.4.14", 50 | "typescript": "^5.6.3", 51 | "typescript-eslint": "^8.12.1", 52 | "unplugin-auto-import": "^0.18.3", 53 | "unplugin-icons": "^0.19.3", 54 | "unplugin-vue-components": "^0.27.4", 55 | "unplugin-vue-router": "^0.10.8", 56 | "vite": "^5.4.10", 57 | "vite-plugin-vue-devtools": "^7.5.4", 58 | "vue-tsc": "^2.1.8" 59 | }, 60 | "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" 61 | } 62 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | # Generated by Tauri 6 | # will have schema files for capabilities auto-completion 7 | /gen/schemas 8 | 9 | keystore.properties 10 | -------------------------------------------------------------------------------- /src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "biliresourcedownloader" 3 | version = "1.2.0" 4 | description = "A Resource Downloader" 5 | authors = ["Light_Quanta"] 6 | edition = "2021" 7 | 8 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 9 | 10 | [lib] 11 | # The `_lib` suffix may seem redundant but it is necessary 12 | # to make the lib name unique and wouldn't conflict with the bin name. 13 | # This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519 14 | name = "biliresourcedownloader_lib" 15 | crate-type = ["staticlib", "cdylib", "rlib"] 16 | 17 | [build-dependencies] 18 | tauri-build = { version = "2.0.0", features = [] } 19 | 20 | [dependencies] 21 | tauri = { version = "2.1.1", features = ["devtools"] } 22 | tauri-plugin-shell = "2.0.2" 23 | serde = { version = "1.0.215", features = ["derive"] } 24 | serde_json = "1.0.133" 25 | tauri-plugin-http = { version = "2.0.3", features = ["unsafe-headers"] } 26 | tauri-plugin-store = "2.1.0" 27 | tauri-plugin-dialog = "2.0.3" 28 | tauri-plugin-upload = "2.1.0" 29 | tauri-plugin-clipboard-manager = "2.0.1" 30 | base64 = "0.22.1" 31 | tauri-plugin-fs = "2.0.3" 32 | tauri-plugin-os = "2" 33 | image = "0.25.5" 34 | gif = "0.13.1" 35 | 36 | [profile.dev] 37 | incremental = true # Compile your binary in smaller steps. 38 | 39 | [profile.release] 40 | panic = "abort" # Strip expensive panic clean-up logic 41 | codegen-units = 1 # Compile crates one after another so the compiler can optimize better 42 | lto = true # Enables link to optimizations 43 | opt-level = "z" # Optimize for binary size 44 | strip = true # Remove debug symbols 45 | -------------------------------------------------------------------------------- /src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /src-tauri/capabilities/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../gen/schemas/desktop-schema.json", 3 | "identifier": "default", 4 | "description": "Capability for the main window", 5 | "windows": [ 6 | "main" 7 | ], 8 | "permissions": [ 9 | "core:default", 10 | "shell:allow-open", 11 | { 12 | "identifier": "http:default", 13 | "allow": [ 14 | { 15 | "url": "https://*.*" 16 | } 17 | ] 18 | }, 19 | "store:default", 20 | "dialog:default", 21 | "upload:default", 22 | "clipboard-manager:allow-read-text", 23 | "core:window:default", 24 | "core:window:allow-toggle-maximize", 25 | "core:window:allow-minimize", 26 | "core:window:allow-close", 27 | "core:window:allow-start-dragging", 28 | "fs:default", 29 | "fs:allow-download-write-recursive", 30 | { 31 | "identifier": "fs:allow-read-file", 32 | "path": "*.*" 33 | }, 34 | "fs:allow-write", 35 | "os:default" 36 | ] 37 | } -------------------------------------------------------------------------------- /src-tauri/gen/android/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = false 12 | insert_final_newline = false -------------------------------------------------------------------------------- /src-tauri/gen/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | key.properties 17 | 18 | /.tauri 19 | /tauri.settings.gradle -------------------------------------------------------------------------------- /src-tauri/gen/android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /src/main/java/tech/lq0/biliresourcedownloader/generated 2 | /src/main/jniLibs/**/*.so 3 | /src/main/assets/tauri.conf.json 4 | /tauri.build.gradle.kts 5 | /proguard-tauri.pro 6 | /tauri.properties -------------------------------------------------------------------------------- /src-tauri/gen/android/app/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import java.io.FileInputStream 2 | import java.util.Properties 3 | 4 | plugins { 5 | id("com.android.application") 6 | id("org.jetbrains.kotlin.android") 7 | id("rust") 8 | } 9 | 10 | val tauriProperties = Properties().apply { 11 | val propFile = file("tauri.properties") 12 | if (propFile.exists()) { 13 | propFile.inputStream().use { load(it) } 14 | } 15 | } 16 | 17 | android { 18 | compileSdk = 34 19 | namespace = "tech.lq0.biliresourcedownloader" 20 | defaultConfig { 21 | manifestPlaceholders["usesCleartextTraffic"] = "false" 22 | applicationId = "tech.lq0.biliresourcedownloader" 23 | minSdk = 24 24 | targetSdk = 34 25 | versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt() 26 | versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0") 27 | ndk { 28 | abiFilters.addAll(listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")) // Add this line 29 | } 30 | } 31 | signingConfigs { 32 | create("release") { 33 | val keystorePropertiesFile = rootProject.file("keystore.properties") 34 | val keystoreProperties = Properties() 35 | if (!keystorePropertiesFile.exists()) { 36 | throw IllegalStateException("未找到 keystore.properties 文件。请在项目根目录中创建该文件。") 37 | } 38 | 39 | keystoreProperties.load(FileInputStream(keystorePropertiesFile)) 40 | keyAlias = keystoreProperties["keyAlias"] as String 41 | keyPassword = keystoreProperties["password"] as String 42 | storeFile = file(keystoreProperties["storeFile"] as String) 43 | storePassword = keystoreProperties["password"] as String 44 | } 45 | } 46 | buildTypes { 47 | getByName("debug") { 48 | manifestPlaceholders["usesCleartextTraffic"] = "true" 49 | isDebuggable = true 50 | isJniDebuggable = true 51 | isMinifyEnabled = false 52 | packaging { 53 | jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so") 54 | jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so") 55 | jniLibs.keepDebugSymbols.add("*/x86/*.so") 56 | jniLibs.keepDebugSymbols.add("*/x86_64/*.so") 57 | } 58 | } 59 | getByName("release") { 60 | signingConfig = signingConfigs.getByName("release") 61 | isMinifyEnabled = true 62 | proguardFiles( 63 | *fileTree(".") { include("**/*.pro") } 64 | .plus(getDefaultProguardFile("proguard-android-optimize.txt")) 65 | .toList().toTypedArray() 66 | ) 67 | } 68 | } 69 | // splits { // Add this block 70 | // abi { 71 | // isEnable = true 72 | // reset() 73 | // include("armeabi-v7a", "arm64-v8a", "x86", "x86_64") 74 | // isUniversalApk = true 75 | // } 76 | // } 77 | kotlinOptions { 78 | jvmTarget = "1.8" 79 | } 80 | buildFeatures { 81 | buildConfig = true 82 | } 83 | } 84 | 85 | rust { 86 | rootDirRel = "../../../" 87 | } 88 | 89 | dependencies { 90 | implementation("androidx.webkit:webkit:1.6.1") 91 | implementation("androidx.appcompat:appcompat:1.6.1") 92 | implementation("com.google.android.material:material:1.8.0") 93 | testImplementation("junit:junit:4.13.2") 94 | androidTestImplementation("androidx.test.ext:junit:1.1.4") 95 | androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0") 96 | } 97 | 98 | apply(from = "tauri.build.gradle.kts") 99 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 19 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 38 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/java/tech/lq0/biliresourcedownloader/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package tech.lq0.biliresourcedownloader 2 | 3 | class MainActivity : TauriActivity() -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 9 | 10 | 16 | 19 | 22 | 23 | 24 | 25 | 31 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | biliresourcedownloader 3 | biliresourcedownloader 4 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src-tauri/gen/android/build.gradle.kts: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | dependencies { 7 | classpath("com.android.tools.build:gradle:8.5.1") 8 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25") 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | mavenCentral() 16 | } 17 | } 18 | 19 | tasks.register("clean").configure { 20 | delete("build") 21 | } 22 | 23 | -------------------------------------------------------------------------------- /src-tauri/gen/android/buildSrc/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `kotlin-dsl` 3 | } 4 | 5 | gradlePlugin { 6 | plugins { 7 | create("pluginsForCoolKids") { 8 | id = "rust" 9 | implementationClass = "RustPlugin" 10 | } 11 | } 12 | } 13 | 14 | repositories { 15 | google() 16 | mavenCentral() 17 | } 18 | 19 | dependencies { 20 | compileOnly(gradleApi()) 21 | implementation("com.android.tools.build:gradle:8.5.1") 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src-tauri/gen/android/buildSrc/src/main/java/tech/lq0/biliresourcedownloader/kotlin/BuildTask.kt: -------------------------------------------------------------------------------- 1 | import java.io.File 2 | import org.apache.tools.ant.taskdefs.condition.Os 3 | import org.gradle.api.DefaultTask 4 | import org.gradle.api.GradleException 5 | import org.gradle.api.logging.LogLevel 6 | import org.gradle.api.tasks.Input 7 | import org.gradle.api.tasks.TaskAction 8 | 9 | open class BuildTask : DefaultTask() { 10 | @Input 11 | var rootDirRel: String? = null 12 | @Input 13 | var target: String? = null 14 | @Input 15 | var release: Boolean? = null 16 | 17 | @TaskAction 18 | fun assemble() { 19 | val executable = """bun"""; 20 | try { 21 | runTauriCli(executable) 22 | } catch (e: Exception) { 23 | if (Os.isFamily(Os.FAMILY_WINDOWS)) { 24 | runTauriCli("$executable.cmd") 25 | } else { 26 | throw e; 27 | } 28 | } 29 | } 30 | 31 | fun runTauriCli(executable: String) { 32 | val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null") 33 | val target = target ?: throw GradleException("target cannot be null") 34 | val release = release ?: throw GradleException("release cannot be null") 35 | val args = listOf("tauri", "android", "android-studio-script"); 36 | 37 | project.exec { 38 | workingDir(File(project.projectDir, rootDirRel)) 39 | executable(executable) 40 | args(args) 41 | if (project.logger.isEnabled(LogLevel.DEBUG)) { 42 | args("-vv") 43 | } else if (project.logger.isEnabled(LogLevel.INFO)) { 44 | args("-v") 45 | } 46 | if (release) { 47 | args("--release") 48 | } 49 | args(listOf("--target", target)) 50 | }.assertNormalExitValue() 51 | } 52 | } -------------------------------------------------------------------------------- /src-tauri/gen/android/buildSrc/src/main/java/tech/lq0/biliresourcedownloader/kotlin/RustPlugin.kt: -------------------------------------------------------------------------------- 1 | import com.android.build.api.dsl.ApplicationExtension 2 | import org.gradle.api.DefaultTask 3 | import org.gradle.api.Plugin 4 | import org.gradle.api.Project 5 | import org.gradle.kotlin.dsl.configure 6 | import org.gradle.kotlin.dsl.get 7 | 8 | const val TASK_GROUP = "rust" 9 | 10 | open class Config { 11 | lateinit var rootDirRel: String 12 | } 13 | 14 | open class RustPlugin : Plugin { 15 | private lateinit var config: Config 16 | 17 | override fun apply(project: Project) = with(project) { 18 | config = extensions.create("rust", Config::class.java) 19 | 20 | val defaultAbiList = listOf("arm64-v8a", "armeabi-v7a", "x86", "x86_64"); 21 | val abiList = (findProperty("abiList") as? String)?.split(',') ?: defaultAbiList 22 | 23 | val defaultArchList = listOf("arm64", "arm", "x86", "x86_64"); 24 | val archList = (findProperty("archList") as? String)?.split(',') ?: defaultArchList 25 | 26 | val targetsList = (findProperty("targetList") as? String)?.split(',') ?: listOf("aarch64", "armv7", "i686", "x86_64") 27 | 28 | extensions.configure { 29 | @Suppress("UnstableApiUsage") 30 | flavorDimensions.add("abi") 31 | productFlavors { 32 | create("universal") { 33 | dimension = "abi" 34 | ndk { 35 | abiFilters += abiList 36 | } 37 | } 38 | defaultArchList.forEachIndexed { index, arch -> 39 | create(arch) { 40 | dimension = "abi" 41 | ndk { 42 | abiFilters.add(defaultAbiList[index]) 43 | } 44 | } 45 | } 46 | } 47 | } 48 | 49 | afterEvaluate { 50 | for (profile in listOf("debug", "release")) { 51 | val profileCapitalized = profile.replaceFirstChar { it.uppercase() } 52 | val buildTask = tasks.maybeCreate( 53 | "rustBuildUniversal$profileCapitalized", 54 | DefaultTask::class.java 55 | ).apply { 56 | group = TASK_GROUP 57 | description = "Build dynamic library in $profile mode for all targets" 58 | } 59 | 60 | tasks["mergeUniversal${profileCapitalized}JniLibFolders"].dependsOn(buildTask) 61 | 62 | for (targetPair in targetsList.withIndex()) { 63 | val targetName = targetPair.value 64 | val targetArch = archList[targetPair.index] 65 | val targetArchCapitalized = targetArch.replaceFirstChar { it.uppercase() } 66 | val targetBuildTask = project.tasks.maybeCreate( 67 | "rustBuild$targetArchCapitalized$profileCapitalized", 68 | BuildTask::class.java 69 | ).apply { 70 | group = TASK_GROUP 71 | description = "Build dynamic library in $profile mode for $targetArch" 72 | rootDirRel = config.rootDirRel 73 | target = targetName 74 | release = profile == "release" 75 | } 76 | 77 | buildTask.dependsOn(targetBuildTask) 78 | tasks["merge$targetArchCapitalized${profileCapitalized}JniLibFolders"].dependsOn( 79 | targetBuildTask 80 | ) 81 | } 82 | } 83 | } 84 | } 85 | } -------------------------------------------------------------------------------- /src-tauri/gen/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Kotlin code style for this project: "official" or "obsolete": 19 | kotlin.code.style=official 20 | # Enables namespacing of each library's R class so that its R class includes only the 21 | # resources declared in the library itself and none from the library's dependencies, 22 | # thereby reducing the size of the R class for that library 23 | android.nonTransitiveRClass=true 24 | android.nonFinalResIds=false -------------------------------------------------------------------------------- /src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue May 10 19:22:52 CST 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /src-tauri/gen/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | 86 | # Determine the Java command to use to start the JVM. 87 | if [ -n "$JAVA_HOME" ] ; then 88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 89 | # IBM's JDK on AIX uses strange locations for the executables 90 | JAVACMD="$JAVA_HOME/jre/sh/java" 91 | else 92 | JAVACMD="$JAVA_HOME/bin/java" 93 | fi 94 | if [ ! -x "$JAVACMD" ] ; then 95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 96 | 97 | Please set the JAVA_HOME variable in your environment to match the 98 | location of your Java installation." 99 | fi 100 | else 101 | JAVACMD="java" 102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 103 | 104 | Please set the JAVA_HOME variable in your environment to match the 105 | location of your Java installation." 106 | fi 107 | 108 | # Increase the maximum file descriptors if we can. 109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 110 | MAX_FD_LIMIT=`ulimit -H -n` 111 | if [ $? -eq 0 ] ; then 112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 113 | MAX_FD="$MAX_FD_LIMIT" 114 | fi 115 | ulimit -n $MAX_FD 116 | if [ $? -ne 0 ] ; then 117 | warn "Could not set maximum file descriptor limit: $MAX_FD" 118 | fi 119 | else 120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 121 | fi 122 | fi 123 | 124 | # For Darwin, add options to specify how the application appears in the dock 125 | if $darwin; then 126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 127 | fi 128 | 129 | # For Cygwin or MSYS, switch paths to Windows format before running java 130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 133 | 134 | JAVACMD=`cygpath --unix "$JAVACMD"` 135 | 136 | # We build the pattern for arguments to be converted via cygpath 137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 138 | SEP="" 139 | for dir in $ROOTDIRSRAW ; do 140 | ROOTDIRS="$ROOTDIRS$SEP$dir" 141 | SEP="|" 142 | done 143 | OURCYGPATTERN="(^($ROOTDIRS))" 144 | # Add a user-defined pattern to the cygpath arguments 145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 147 | fi 148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 149 | i=0 150 | for arg in "$@" ; do 151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 153 | 154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 156 | else 157 | eval `echo args$i`="\"$arg\"" 158 | fi 159 | i=`expr $i + 1` 160 | done 161 | case $i in 162 | 0) set -- ;; 163 | 1) set -- "$args0" ;; 164 | 2) set -- "$args0" "$args1" ;; 165 | 3) set -- "$args0" "$args1" "$args2" ;; 166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 172 | esac 173 | fi 174 | 175 | # Escape application args 176 | save () { 177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 178 | echo " " 179 | } 180 | APP_ARGS=`save "$@"` 181 | 182 | # Collect all arguments for the java command, following the shell quoting and substitution rules 183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 184 | 185 | exec "$JAVACMD" "$@" 186 | -------------------------------------------------------------------------------- /src-tauri/gen/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /src-tauri/gen/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | apply from: 'tauri.settings.gradle' 4 | -------------------------------------------------------------------------------- /src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-20x20@1x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-20x20@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-20x20@2x-1.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-20x20@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-20x20@3x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-29x29@1x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-29x29@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-29x29@2x-1.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-29x29@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-29x29@3x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-40x40@1x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-40x40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-40x40@2x-1.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-40x40@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-40x40@3x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-512@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-60x60@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-60x60@3x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-76x76@1x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-76x76@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LightQuanta/BiliResourceDownloader/dea326e0a0829ea3a38d40d530e7882d94426f0a/src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png -------------------------------------------------------------------------------- /src-tauri/src/invoke/mod.rs: -------------------------------------------------------------------------------- 1 | use std::fs::File; 2 | use std::io::{BufReader, BufWriter}; 3 | use image::codecs::webp::WebPDecoder; 4 | use image::{AnimationDecoder, ImageDecoder}; 5 | use gif::{Encoder, Frame, Repeat }; 6 | 7 | #[tauri::command] 8 | pub fn open_webview_devtools(webview_window: tauri::WebviewWindow) { 9 | webview_window.open_devtools(); 10 | } 11 | 12 | #[tauri::command] 13 | pub fn convert_webp2gif(input_path: String, output_path: String) -> Result<(), String> { 14 | // 打开WebP文件 15 | let webp_file = File::open(&input_path).map_err(|e| e.to_string())?; 16 | let webp_reader = BufReader::new(webp_file); 17 | let decoder = WebPDecoder::new(webp_reader).map_err(|e| e.to_string())?; 18 | let (width, height) = decoder.dimensions(); 19 | 20 | // 创建输出 GIF 文件 21 | let gif_file = File::create(&output_path).map_err(|e| e.to_string())?; 22 | let mut gif_encoder = Encoder::new(BufWriter::new(gif_file), width as u16, height as u16, &[]).map_err(|e| e.to_string())?; 23 | gif_encoder.set_repeat(Repeat::Infinite).map_err(|e| e.to_string())?; 24 | 25 | // 解码 WebP 帧并将其编码为 GIF 帧 26 | for frame in decoder.into_frames() { 27 | let frame = frame.map_err(|e| e.to_string())?; 28 | let buffer = frame.into_buffer(); 29 | let gif_frame = Frame::from_rgba_speed(buffer.width() as u16, buffer.height() as u16, &mut buffer.into_raw(), 10); 30 | gif_encoder.write_frame(&gif_frame).map_err(|e| e.to_string())?; 31 | } 32 | Ok(()) 33 | } -------------------------------------------------------------------------------- /src-tauri/src/lib.rs: -------------------------------------------------------------------------------- 1 | mod invoke; 2 | use base64::prelude::BASE64_STANDARD; 3 | use base64::Engine; 4 | // Learn more about Tauri commands at https://tauri.app/v1/guides/features/command 5 | use std::fs; 6 | 7 | #[tauri::command] 8 | fn create_dir(path: &str) -> &str { 9 | let result = fs::create_dir_all(path); 10 | if result.is_err() { 11 | return "error"; 12 | } 13 | "ok" 14 | } 15 | 16 | #[tauri::command] 17 | fn save_data_url<'a>(path: &'a str, data: &'a str) -> String { 18 | let base64 = data.split(',').collect::>()[1]; 19 | let bytes = BASE64_STANDARD.decode(base64).unwrap_or(vec![]); 20 | 21 | let result = fs::write(path, bytes); 22 | if let Err(e) = result { 23 | return e.to_string(); 24 | } 25 | "ok".to_string() 26 | } 27 | 28 | #[cfg_attr(mobile, tauri::mobile_entry_point)] 29 | pub fn run() { 30 | tauri::Builder::default() 31 | .plugin(tauri_plugin_os::init()) 32 | .plugin(tauri_plugin_fs::init()) 33 | .plugin(tauri_plugin_clipboard_manager::init()) 34 | .plugin(tauri_plugin_upload::init()) 35 | .plugin(tauri_plugin_dialog::init()) 36 | .plugin(tauri_plugin_store::Builder::new().build()) 37 | .plugin(tauri_plugin_http::init()) 38 | .plugin(tauri_plugin_shell::init()) 39 | .invoke_handler(tauri::generate_handler![create_dir, save_data_url, invoke::open_webview_devtools, invoke::convert_webp2gif]) 40 | .run(tauri::generate_context!()) 41 | .expect("error while running tauri application"); 42 | } 43 | -------------------------------------------------------------------------------- /src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!! 2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] 3 | 4 | fn main() { 5 | biliresourcedownloader_lib::run() 6 | } 7 | -------------------------------------------------------------------------------- /src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.tauri.app/config/2.0.0", 3 | "productName": "biliresourcedownloader", 4 | "version": "1.2.0", 5 | "identifier": "tech.lq0.biliresourcedownloader", 6 | "build": { 7 | "beforeDevCommand": "bun run dev", 8 | "devUrl": "http://localhost:1420", 9 | "beforeBuildCommand": "bun run build", 10 | "frontendDist": "../dist" 11 | }, 12 | "app": { 13 | "windows": [ 14 | { 15 | "title": "BiliResourceDownloader", 16 | "width": 1200, 17 | "height": 800, 18 | "minWidth": 600, 19 | "minHeight": 500, 20 | "decorations": false 21 | } 22 | ], 23 | "security": { 24 | "csp": null 25 | } 26 | }, 27 | "bundle": { 28 | "active": true, 29 | "targets": "all", 30 | "icon": [ 31 | "icons/32x32.png", 32 | "icons/128x128.png", 33 | "icons/128x128@2x.png", 34 | "icons/icon.icns", 35 | "icons/icon.ico" 36 | ] 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/APIFetch.ts: -------------------------------------------------------------------------------- 1 | import { LazyStore } from '@tauri-apps/plugin-store'; 2 | import { clearLoginCookie, getLoginCookie, userLoggedIn } from "./utils/loginManager.ts"; 3 | import { GeneralAPIResponse } from "./types.ts"; 4 | import { encWbiWithFetch } from "./utils/wbi.ts"; 5 | import { useWbiStore } from "./store/useWbiStore"; 6 | import { setDebugInfo } from "./utils/debug.ts"; 7 | import md5 from "md5"; 8 | import { ClientOptions, fetch } from "@tauri-apps/plugin-http"; 9 | import { globalConfig } from "./utils/globalConfig.ts"; 10 | 11 | const store = new LazyStore('APIResponseCache', { 12 | // 不要持久化请求缓存 13 | autoSave: false 14 | }) 15 | 16 | // 请求缓存 17 | const CACHE_TIME = computed(() => globalConfig.value.requestCacheTime) 18 | 19 | interface CachedJSONResponse { 20 | cachedTime: number 21 | response: T 22 | } 23 | 24 | 25 | interface ExtraAPIFetchOptions { 26 | wbiSign?: boolean 27 | appSign?: boolean 28 | useCache?: boolean 29 | useCookie?: boolean 30 | debug?: { 31 | name: string 32 | extraParams?: Record 33 | } 34 | } 35 | 36 | // 对URL搜索参数进行app签名,原地更新搜索参数 37 | function paramsAppSign(params: URLSearchParams) { 38 | params.set('build', '8160400') 39 | // params.set('ts', Math.floor(Date.now() / 1000).toString()) 40 | // 不使用正确的时间戳似乎也能过验证,为了避免缓存失效,这里直接使用固定时间戳 41 | params.set('ts', '1700000000') 42 | params.set('appkey', '1d8b6e7d45233436') 43 | 44 | const appSec = '560c52ccd288fed045859ed18bffd973' 45 | params.sort() 46 | 47 | params.set('sign', md5(params.toString() + appSec)) 48 | } 49 | 50 | async function APIFetch(url: URL | string, init?: RequestInit, extraOptions?: ExtraAPIFetchOptions): Promise> { 51 | const parsedURL = new URL(url) 52 | const getURLStr = () => parsedURL.toString() 53 | 54 | const { useCache, wbiSign, appSign, useCookie, debug: debugInfo } = { 55 | useCache: true, 56 | wbiSign: false, 57 | appSign: false, 58 | useCookie: true, 59 | ...extraOptions 60 | } 61 | 62 | // wbi签名参数 63 | if (wbiSign) { 64 | const params: Record = {} 65 | for (const [key, value] of parsedURL.searchParams) { 66 | params[key] = value 67 | } 68 | parsedURL.search = await encWbiWithFetch(params) 69 | console.debug(`wbi signed url: ${getURLStr()}`) 70 | } 71 | 72 | // app签名参数 73 | if (appSign) { 74 | paramsAppSign(parsedURL.searchParams) 75 | } 76 | 77 | if (useCache && await store.has(getURLStr())) { 78 | const cacheData = await store.get(getURLStr()) as CachedJSONResponse 79 | if ((cacheData.cachedTime + CACHE_TIME.value * 1000) > Date.now()) { 80 | console.debug(`using cached ${getURLStr()}`) 81 | 82 | if (debugInfo) { 83 | setDebugInfo(debugInfo.name, parsedURL, JSON.stringify(cacheData.response, null, 2), debugInfo.extraParams, cacheData.cachedTime) 84 | } 85 | return cacheData.response as GeneralAPIResponse 86 | } else { 87 | await store.delete(getURLStr()) 88 | console.debug(`expired cache ${getURLStr()}`) 89 | } 90 | } 91 | 92 | let cookie: string | undefined 93 | if (useCookie) { 94 | cookie = await getLoginCookie() 95 | } 96 | 97 | const options: RequestInit & ClientOptions = { 98 | headers: { 99 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0', 100 | // 无cookie时,填写这几个参数貌似也能过一些验证 101 | 'Cookie': cookie ?? 'bili_ticket=1; b_nut=1; buvid3=1; buvid4=1', 102 | 'Origin': 'https://www.bilibili.com', 103 | }, 104 | } 105 | 106 | const finalOptions = { ...options, ...init } 107 | 108 | 109 | let retryCount = 0 110 | let json: GeneralAPIResponse 111 | 112 | do { 113 | json = await fetch(parsedURL, finalOptions).then(r => r.json()) as GeneralAPIResponse 114 | 115 | if (json.code !== 0) { 116 | if ((json.code === -352 || json.code === -403) && retryCount < 1) { 117 | // 假设是wbi校验失败,刷新wbi后进行重试 118 | const store = useWbiStore() 119 | await store.refreshWbi() 120 | 121 | retryCount++ 122 | continue 123 | } 124 | 125 | // 账号登录失效时清空登录信息 126 | if (json.code === -101) { 127 | userLoggedIn.value = false 128 | await clearLoginCookie() 129 | } 130 | 131 | if (debugInfo) { 132 | setDebugInfo(debugInfo.name, parsedURL, JSON.stringify(json, null, 2), debugInfo.extraParams) 133 | } 134 | throw { 135 | ...json, 136 | toString() { 137 | return JSON.stringify(this) 138 | } 139 | } 140 | } 141 | break 142 | } while (retryCount < 1) 143 | 144 | if (debugInfo) { 145 | setDebugInfo(debugInfo.name, parsedURL, JSON.stringify(json, null, 2), debugInfo.extraParams) 146 | } 147 | 148 | if (useCache) { 149 | await store.set(getURLStr(), { 150 | cachedTime: Date.now(), 151 | response: json, 152 | }) 153 | console.debug(`cached ${getURLStr()}`) 154 | } 155 | 156 | return json 157 | } 158 | 159 | async function clearAPICache() { 160 | await store.clear() 161 | } 162 | 163 | export { APIFetch, clearAPICache } -------------------------------------------------------------------------------- /src/components/AppBackground.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | -------------------------------------------------------------------------------- /src/components/BatchDownloadButton.vue: -------------------------------------------------------------------------------- 1 | 173 | 174 | 243 | 244 | -------------------------------------------------------------------------------- /src/components/CustomDivider.vue: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /src/components/DebugButton.vue: -------------------------------------------------------------------------------- 1 | 39 | 40 | -------------------------------------------------------------------------------- /src/components/DownloadManager.vue: -------------------------------------------------------------------------------- 1 | 96 | 97 | 153 | 154 | -------------------------------------------------------------------------------- /src/components/GarbSearchCard.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | -------------------------------------------------------------------------------- /src/components/ImageVideoCard.vue: -------------------------------------------------------------------------------- 1 | 89 | 90 | -------------------------------------------------------------------------------- /src/components/LoginManager.vue: -------------------------------------------------------------------------------- 1 | 142 | 143 | 177 | -------------------------------------------------------------------------------- /src/components/LoginRequired.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /src/components/LottieAnimationCard.vue: -------------------------------------------------------------------------------- 1 | 192 | 193 | -------------------------------------------------------------------------------- /src/components/QRCodeDialogButton.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 43 | -------------------------------------------------------------------------------- /src/components/UPInfo.vue: -------------------------------------------------------------------------------- 1 | 62 | 63 | 92 | -------------------------------------------------------------------------------- /src/components/VideoCard.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 76 | -------------------------------------------------------------------------------- /src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from "vue"; 2 | import App from "./App.vue"; 3 | import "./style.css"; 4 | import { createRouter, createWebHistory } from 'vue-router' 5 | import { handleHotUpdate, routes } from 'vue-router/auto-routes' 6 | import mitt from "mitt"; 7 | import { continueUnfinishedDownloadTasks } from "./utils/downloadManager.ts"; 8 | import { BiliResourceDownloadEventEmitter } from "./types.ts"; 9 | import { checkLoginState } from "./utils/loginManager.ts"; 10 | import { createPinia } from 'pinia' 11 | import './utils/cliboardListener.ts' 12 | import './utils/globalConfig.ts' 13 | import JsonEditorVue from 'json-editor-vue' 14 | 15 | const pinia = createPinia() 16 | 17 | const emitter = mitt() 18 | 19 | const router = createRouter({ 20 | history: createWebHistory(), 21 | routes 22 | }) 23 | 24 | if (import.meta.hot) { 25 | handleHotUpdate(router) 26 | } 27 | 28 | // 自动生成的路由 29 | console.debug(routes) 30 | 31 | const app = createApp(App) 32 | app.use(pinia) 33 | app.use(router) 34 | app.use(JsonEditorVue) 35 | 36 | app.config.errorHandler = (err, instance, info) => { 37 | console.error(err) 38 | console.error(instance) 39 | console.error(info) 40 | 41 | ElMessage({ 42 | message: `出现未知错误:${err}`, 43 | type: 'error', 44 | }) 45 | } 46 | 47 | app.mount("#app"); 48 | 49 | // 若批量下载未完成,自动重新发起下载 50 | continueUnfinishedDownloadTasks() 51 | 52 | checkLoginState() 53 | 54 | export { emitter, router } 55 | -------------------------------------------------------------------------------- /src/pages/[...path].vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 24 | -------------------------------------------------------------------------------- /src/pages/about.vue: -------------------------------------------------------------------------------- 1 | 53 | 54 | 87 | -------------------------------------------------------------------------------- /src/pages/emoji/[id].vue: -------------------------------------------------------------------------------- 1 | 155 | 156 | 257 | -------------------------------------------------------------------------------- /src/pages/index.vue: -------------------------------------------------------------------------------- 1 | 76 | 77 | -------------------------------------------------------------------------------- /src/pages/search/emoji.vue: -------------------------------------------------------------------------------- 1 | 126 | 127 | 192 | 193 | -------------------------------------------------------------------------------- /src/pages/search/garb.vue: -------------------------------------------------------------------------------- 1 | 128 | 129 | 193 | 194 | 211 | -------------------------------------------------------------------------------- /src/pages/search/general.vue: -------------------------------------------------------------------------------- 1 | 145 | 146 | 237 | 238 | -------------------------------------------------------------------------------- /src/pages/settings.vue: -------------------------------------------------------------------------------- 1 | 73 | 74 | 231 | -------------------------------------------------------------------------------- /src/pages/tool/lottie.vue: -------------------------------------------------------------------------------- 1 | 47 | 48 | -------------------------------------------------------------------------------- /src/pages/tool/svga.vue: -------------------------------------------------------------------------------- 1 | 47 | 48 | -------------------------------------------------------------------------------- /src/pages/tool/webp.vue: -------------------------------------------------------------------------------- 1 | 47 | 48 | 104 | 105 | -------------------------------------------------------------------------------- /src/pages/video/[id].vue: -------------------------------------------------------------------------------- 1 | 59 | -------------------------------------------------------------------------------- /src/store/useWbiStore/api/index.ts: -------------------------------------------------------------------------------- 1 | // 获取最新的 img_key 和 sub_key 2 | export async function getWbiKeys() { 3 | const res = await fetch('https://api.bilibili.com/x/web-interface/nav', { 4 | headers: { 5 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3', 6 | Referer: 'https://www.bilibili.com/' 7 | } 8 | }) 9 | const { 10 | data: { 11 | wbi_img: { img_url, sub_url }, 12 | }, 13 | } = (await res.json()) as { 14 | data: { 15 | wbi_img: { img_url: string; sub_url: string }; 16 | }; 17 | }; 18 | 19 | const htmlResp = await fetch('https://space.bilibili.com/1',).then(d => d.text()) 20 | const regex = /