Skip to content

Commit

Permalink
write sorted list to cache
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Oct 20, 2021
1 parent d3ef0ef commit e0c6f28
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions PlutoIPTV/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,11 @@ const plutoIPTV = {
});

fullChannels = Object.values(channelsList);
console.log("[DEBUG] Using api.pluto.tv, writing cache.json.");
fs.writeFileSync("cache.json", JSON.stringify(fullChannels));

sortedChannels = fullChannels.sort(
({ number: a }, { number: b }) => a - b
);
console.log("[DEBUG] Using api.pluto.tv, writing cache.json.");
fs.writeFileSync("cache.json", JSON.stringify(sortedChannels));
callback(sortedChannels);
return;
});
Expand Down

0 comments on commit e0c6f28

Please sign in to comment.