diff --git a/src/extractors/gogocdn.ts b/src/extractors/gogocdn.ts index ae5493daf..31d50e321 100644 --- a/src/extractors/gogocdn.ts +++ b/src/extractors/gogocdn.ts @@ -36,7 +36,7 @@ class GogoCDN extends VideoExtractor { // console.log(decryptedData.track.tracks); if (!decryptedData.source) throw new Error('No source found. Try a different server.'); - const subtitles: ISubtitle[] = decryptedData.track.tracks.map((track: any) => ({ + const subtitles: ISubtitle[] = decryptedData.track.tracks?.map((track: any) => ({ url: track.file, lang: track.kind, })); diff --git a/src/providers/movies/sflix.ts b/src/providers/movies/sflix.ts index 69a44820e..5aadf35c8 100644 --- a/src/providers/movies/sflix.ts +++ b/src/providers/movies/sflix.ts @@ -503,15 +503,5 @@ class SFlix extends MovieParser { }; } -(async () => { - const movie = new SFlix(); - console.time('recentTv'); - // const search = await movie.fetchEpisodeSources("1167571","tv/free-vincenzo-hd-67955",StreamingServers.Voe); - const movieInfo = await movie.search('vincenzo'); - // const recentTv = await movie.fetchTrendingMovies(); - console.timeEnd('recentTv'); - // const genre = await movie.fetchEpisodeServers("1167571","tv/free-vincenzo-hd-67955"); - console.log(movieInfo); -})(); export default SFlix; diff --git a/test/anime/gogoanime.test.ts b/test/anime/gogoanime.test.ts index a275ae4ab..268c9b28f 100644 --- a/test/anime/gogoanime.test.ts +++ b/test/anime/gogoanime.test.ts @@ -27,7 +27,10 @@ test('returns a filled array of servers', async () => { }); test('returns a filled object of episode sources', async () => { - const data = await gogoanime.fetchEpisodeSources('spy-x-family-episode-9', StreamingServers.StreamWish); + const data = await gogoanime.fetchEpisodeSources( + 'arifureta-shokugyou-de-sekai-saikyou-season-3-episode-1', + StreamingServers.GogoCDN + ); expect(data.sources).not.toEqual([]); expect(data.subtitles).not.toEqual([]); });