diff --git a/android/gradle.properties b/android/gradle.properties index 952ab614..005807b4 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -35,7 +35,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 # your application. You should enable this flag either if you want # to write custom TurboModules/Fabric components OR use libraries that # are providing them. -newArchEnabled=true +newArchEnabled=false # Use this property to enable or disable the Hermes JS engine. # If set to false, you will be using JSC instead. diff --git a/src/components/login/SiteSelector.tsx b/src/components/login/SiteSelector.tsx index 2cf9715b..2192e19f 100644 --- a/src/components/login/SiteSelector.tsx +++ b/src/components/login/SiteSelector.tsx @@ -70,6 +70,7 @@ export default ({ {sites.map(site => ( [] = [ match: biliFavlistFetch.regexSearchMatch2, fetch: biliFavlistFetch.regexFetch, }, - { match: steriatkFetch.regexSearchMatch, fetch: steriatkFetch.regexFetch }, - { match: steriatkFetch.regexSearchMatch2, fetch: steriatkFetch.regexFetch }, { match: ytbMixlistFetch.regexSearchMatch, fetch: ytbMixlistFetch.regexFetch, diff --git a/src/utils/mediafetch/resolveURL.ts b/src/utils/mediafetch/resolveURL.ts index ff2efd42..d2c0e9b5 100644 --- a/src/utils/mediafetch/resolveURL.ts +++ b/src/utils/mediafetch/resolveURL.ts @@ -1,4 +1,3 @@ -import steriatkFetch from './steriatk'; import biliaudioFetch from './biliaudio'; import ytbvideoFetch, { fetchAudioInfo } from '@utils/mediafetch/ytbvideo'; import bililiveFetch from './bililive'; @@ -21,7 +20,6 @@ type RegResolve = NoxUtils.RegexMatchResolve< const regexResolveURLs: RegResolve = [ [acfunFetch.regexResolveURLMatch, acfunFetch.resolveURL], - [steriatkFetch.regexResolveURLMatch, steriatkFetch.resolveURL], [biliaudioFetch.regexResolveURLMatch, biliaudioFetch.resolveURL], [ytbvideoFetch.regexResolveURLMatch, ytbvideoFetch.resolveURL], [ytbvideoFetch.regexResolveURLMatch2, ytbvideoFetch.resolveURL], diff --git a/src/utils/mediafetch/steriatk.ts b/src/utils/mediafetch/steriatk.ts deleted file mode 100644 index 27402a8c..00000000 --- a/src/utils/mediafetch/steriatk.ts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * refactor: - * bilisearch workflow: - * reExtractSearch matches regex patterns and use the corresponding fetch functions; - * fetch function takes extracted and calls a dataProcess.js fetch function; - * dataprocess fetch function fetches VIDEOINFO using data.js fetch function, then parses into SONGS - * data.js fetch function fetches VIDEOINFO. - * steps to refactor: - * each site needs a fetch to parse regex extracted, a videoinfo fetcher and a song fetcher. - */ -import { Source } from '@enums/MediaFetch'; -import { fetchAwaitPaginatedAPI } from './paginatedfetch'; -import SongTS from '@objects/Song'; - -const pagesize = 500; - -const VIDEOINFO_API = `https://steria.vplayer.tk/api/musics/{pn}?size=${pagesize}`; -// https://steria.vplayer.tk/api/musics/1 -const CIDPREFIX = 'steriatk-'; - -const paginatedFetch = ({ - progressEmitter, - favList = [], -}: Partial) => { - return fetchAwaitPaginatedAPI({ - url: VIDEOINFO_API, - getMediaCount: json => json.total, - getPageSize: () => pagesize, - getItems: json => json.data, - resolveBiliBVID: async BVobjs => - BVobjs.map(videoinfo => - SongTS({ - cid: `${CIDPREFIX}${videoinfo.url}`, - bvid: `${CIDPREFIX}${videoinfo.id}`, - name: videoinfo.name, - nameRaw: videoinfo.name, - singer: videoinfo.artist, - singerId: 'steria.vplayer.tk', - cover: - 'https://i2.hdslb.com/bfs/face/b70f6e62e4582d4fa5d48d86047e64eb57d7504e.jpg', - lyric: '', - page: 0, - duration: 0, - album: videoinfo.name, - source: Source.steriatk, - }), - ), - progressEmitter, - favList, - getBVID: item => `${CIDPREFIX}${item.id}`, - getJSONData: val => val, - }); -}; - -const regexFetch = async ({ - progressEmitter, - favList, -}: Partial): Promise => ({ - songList: await paginatedFetch({ progressEmitter, favList }), -}); - -const resolveURL = async (song: NoxMedia.Song) => { - return { url: song.id.slice(9) }; -}; - -const refreshSong = (song: NoxMedia.Song) => song; - -export default { - regexSearchMatch: /steria.vplayer.tk/, - regexSearchMatch2: /Steria.vplayer.tk/, - regexFetch, - regexResolveURLMatch: /^steriatk-/, - resolveURL, - refreshSong, -}; diff --git a/src/utils/mediafetch/ytbChannel.ts b/src/utils/mediafetch/ytbChannel.ts deleted file mode 100644 index 04c4a314..00000000 --- a/src/utils/mediafetch/ytbChannel.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { get_channel } from 'libmuse'; -// eslint-disable-next-line import/no-unresolved -import { Innertube } from 'youtubei.js'; - -import { fetchAudioInfo } from '@utils/mediafetch/ytbvideo'; -import bfetch from '@utils/BiliFetch'; -import SongTS from '@objects/Song'; -import { Source } from '@enums/MediaFetch'; -import { timestampToSeconds } from '../Utils'; - -const innertune2NoxSong = (v: any, channel?: any) => - SongTS({ - cid: `${Source.ytbvideo}-${v.id}`, - bvid: v.id, - name: v.title.text, - nameRaw: v.title.text, - singer: channel?.metadata?.title ?? v.author.name, - singerId: channel?.metadata?.url ?? v.author.id, - cover: v.thumbnails[0].url, - lyric: '', - page: 1, - duration: timestampToSeconds( - v.thumbnail_overlays.filter( - (overlay: any) => overlay.type === 'ThumbnailOverlayTimeStatus', - )[0]?.text, - ), - album: v.title.text, - source: Source.ytbvideo, - metadataOnLoad: true, - }); - -const resolveYTChannelPlaylistId = async (channelUsername: string) => { - const res = await bfetch(`https://www.youtube.com/c/${channelUsername}`); - const text = await res.text(); - return /meta property="og:url" content="https:\/\/www.youtube.com\/channel\/(.+)">