Skip to content

Commit

Permalink
Merge pull request #697 from lovegaoshi/dev
Browse files Browse the repository at this point in the history
fix: ytb chan
  • Loading branch information
lovegaoshi authored Dec 17, 2024
2 parents faace41 + 197321a commit a3d2be2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 5 additions & 1 deletion src/utils/BiliSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import biliChannelAudioFetch from './mediafetch/bilichannelAudio';
import ytbPlaylistFetch from './mediafetch/ytbPlaylist';
import ytbMixlistFetch from './mediafetch/ytbmixlist';
import ytbLiveFetch from './mediafetch/ytbLive';
import ytbChannelFetch from './mediafetch/ytbChannel';
import ytbChannelFetch from './mediafetch/ytbChannel.ytbi';
import { fetchInnerTuneSearch } from './mediafetch/ytbSearch.muse';
import {
fetchYtbiSearch,
Expand Down Expand Up @@ -170,6 +170,10 @@ const reExtractions: ReExtraction<NoxNetwork.NoxRegexFetch>[] = [
match: ytbChannelFetch.regexSearchMatch,
fetch: ytbChannelFetch.regexFetch,
},
{
match: ytbChannelFetch.regexSearchMatch2,
fetch: ytbChannelFetch.regexFetch,
},
{
match: biliFavColleFetch.regexSearchMatch,
fetch: biliFavColleFetch.regexFetch,
Expand Down
3 changes: 0 additions & 3 deletions src/utils/mediafetch/mainbackgroundfetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ export default async (backgroundImage?: string | NoxTheme.backgroundImage) => {
backgroundImage,
);
case RESOLVE_TYPE.biliNFTVideo: {
logger.warn(
`[backgroundFetch] ${RESOLVE_TYPE.biliNFTVideo} is no longer supported.`,
);
const [act_id, index] = JSON.parse(backgroundImage.identifier);
return BackgroundVideoWrapper(
await cacheWrapper(
Expand Down
5 changes: 3 additions & 2 deletions src/utils/mediafetch/ytbChannel.ytbi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const getYtbSong = async (
playlistData: Channel | ChannelListContinuation,
songs: NoxMedia.Song[],
favList: string[],
) => {
): Promise<NoxMedia.Song[]> => {
const videos = playlistData.videos as Video[];
for (const video of videos) {
if (!favList.includes(video.id)) {
Expand Down Expand Up @@ -56,6 +56,7 @@ const regexFetch = async ({
};
export default {
// https://www.youtube.com/c/MioriCelesta
regexSearchMatch: /youtube\.com\/c\/([^&/]+)/,
regexSearchMatch: /youtube\.com\/c\/([^&\/]+)/,
regexSearchMatch2: /youtube\.com\/(@[^&\/]+)/,
regexFetch,
};

0 comments on commit a3d2be2

Please sign in to comment.