Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bilicolle #681

Merged
merged 3 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ module.exports = {
plugins: ['prettier'],
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
'@typescript-eslint/no-unused-expressions': [
'error',
{ allowShortCircuit: true, allowTernary: true },
],
// RN does require to load local src
'@typescript-eslint/no-require-imports': 'off',
// HACK: i'm too lazy to build bilibili data types so off it goes

'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/consistent-type-definitions': 'error',
'react/react-in-jsx-scope': 'off',
Expand Down
4 changes: 1 addition & 3 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@
android:maxSdkVersion="28" />
<application
android:name=".MainApplication"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="false"
tools:replace="android:allowBackup">
android:usesCleartextTraffic="false">
<receiver
android:name=".APMWidget"
android:exported="false">
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"deepmerge": "^4.3.1",
"dropbox": "git+https://[email protected]/lovegaoshi/dropbox-sdk-js.git",
"event-target-polyfill": "^0.0.4",
"expo": "^52.0.14",
"expo": "^52.0.15",
"expo-auth-session": "~6.0.1",
"expo-clipboard": "~7.0.0",
"expo-crypto": "~14.0.1",
Expand All @@ -73,7 +73,8 @@
"fflate": "^0.8.2",
"ffmpeg-kit-react-native": "^6.0.2",
"he": "^1.2.0",
"i18next": "^24.0.5",
"i18next": "23.16.8",
"intl-pluralrules": "^2.0.1",
"js-base64": "^3.7.7",
"libmuse": "https://github.com/lovegaoshi/muse.git#commit=0bffe2319baf825037bece6869d360d6d307eb72",
"lodash": "^4.17.21",
Expand All @@ -100,14 +101,14 @@
"react-native-lyric": "https://[email protected]/lovegaoshi/react-native-lyric.git#commit=6f20e83948c29b0d46833ab9173cd81f99d0ab48",
"react-native-pager-view": "6.6.1",
"react-native-paper": "^5.12.5",
"react-native-purchases": "^8.3.0",
"react-native-purchases": "^8.4.0",
"react-native-qrcode-svg": "^6.3.12",
"react-native-reanimated": "3.16.3",
"react-native-safe-area-context": "^4.14.0",
"react-native-screens": "4.3.0",
"react-native-shadow-2": "^7.1.1",
"react-native-share-menu": "git+https://github.com/Expensify/react-native-share-menu.git",
"react-native-svg": "15.10.0",
"react-native-svg": "15.10.1",
"react-native-svga-player": "https://[email protected]/lovegaoshi/react-native-svga-player.git#commit=f8c6303fddb528a1a94d2ab4696c9318c0002cfd",
"react-native-text-ticker": "https://[email protected]/lovegaoshi/react-native-text-ticker.git#commit=b9eb454b18bb621a769ce4b57b4603a81501b477",
"react-native-track-player": "https://github.com/lovegaoshi/react-native-track-player.git#commit=71b08733e6f680db10613036c450509c855917ea",
Expand Down Expand Up @@ -149,8 +150,8 @@
"@types/react-native-share-menu": "^5.0.5",
"@types/react-test-renderer": "^18.3.0",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"@welldone-software/why-did-you-render": "^8.0.3",
"argparse": "^2.0.1",
"babel-jest": "^29.7.0",
Expand Down
1 change: 1 addition & 0 deletions src/localization/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// src/localization/i18n.ts
import 'intl-pluralrules';
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import translationEN from './en/translation.json';
Expand Down
2 changes: 1 addition & 1 deletion src/utils/BiliFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import Bottleneck from 'bottleneck';

export const DEFAULT_UA =
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0';
'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0';

export const parseBodyParams = (body: any) => {
const formBody = [];
Expand Down
1 change: 1 addition & 0 deletions src/utils/mediafetch/biliuser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const API = 'https://api.bilibili.com/x/space/wbi/acc/info?mid={mid}';
export const getBiliUser = async (mid: string) => {
const res = await wbiQuery(
API.replace('{mid}', mid) + `${getDm()}${await getWebid(mid)}`,
{ headers: { Referer: 'https://space.bilibili.com/' } },
);
const json = await res.json();
return json.data;
Expand Down
Loading
Loading