mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-14 03:41:46 +00:00
chore(deps): remove node-fetch, migration to node v18 fetch API
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
const { ipcMain } = require('electron');
|
||||
const fetch = require('node-fetch');
|
||||
const is = require('electron-is');
|
||||
|
||||
const { sortSegments } = require('./segments');
|
||||
@ -38,11 +37,9 @@ const fetchSegments = async (apiURL, categories) => {
|
||||
}
|
||||
|
||||
const segments = await resp.json();
|
||||
const sortedSegments = sortSegments(
|
||||
return sortSegments(
|
||||
segments.map((submission) => submission.segment),
|
||||
);
|
||||
|
||||
return sortedSegments;
|
||||
} catch (error) {
|
||||
if (is.dev()) {
|
||||
console.log('error on sponsorblock request:', error);
|
||||
|
||||
Reference in New Issue
Block a user