Skip to content

Commit

Permalink
fix: ytb channel
Browse files Browse the repository at this point in the history
  • Loading branch information
lovegaoshi committed Dec 17, 2024
1 parent 2d5efa9 commit 197321a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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
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 197321a

Please sign in to comment.