Update store.js

Disables guides downloading
This commit is contained in:
Arhey 2023-05-04 05:47:37 +03:00
parent f3d4efea6b
commit c67831571c

View file

@ -143,11 +143,12 @@ async function loadAPI() {
.then(data => _.groupBy(data, 'channel')) .then(data => _.groupBy(data, 'channel'))
.catch(console.error) .catch(console.error)
api.guides = await fetch('https://iptv-org.github.io/api/guides.json') api.guides = {}
.then(r => r.json()) // api.guides = await fetch('https://iptv-org.github.io/api/guides.json')
.then(data => (data.length ? data : [])) // .then(r => r.json())
.then(data => _.groupBy(data, 'channel')) // .then(data => (data.length ? data : []))
.catch(console.error) // .then(data => _.groupBy(data, 'channel'))
// .catch(console.error)
api.channels = await fetch('https://iptv-org.github.io/api/channels.json') api.channels = await fetch('https://iptv-org.github.io/api/channels.json')
.then(r => r.json()) .then(r => r.json())
@ -202,8 +203,8 @@ function getStreams() {
export function createPlaylist() { export function createPlaylist() {
const playlist = new Playlist() const playlist = new Playlist()
let guides = getGuides() // let guides = getGuides()
playlist.header = { 'x-tvg-url': guides.sort().join(',') } // playlist.header = { 'x-tvg-url': guides.sort().join(',') }
let streams = getStreams() let streams = getStreams()
streams.forEach(stream => { streams.forEach(stream => {