Skip to content

Commit

Permalink
fix: deal with etv new cache busting system with images
Browse files Browse the repository at this point in the history
  • Loading branch information
liam8888999 committed Sep 29, 2024
1 parent 34b61da commit f099684
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions server/generators/channel-logo.generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ const CHANNEL_LOGO = async () => {
const channels = result.tv.channel;
channels.forEach((channel) => {
const channelId = channel.$.id;
const channelLogo = channel.icon && channel.icon[0].$.src;

const channelLogo1 = channel.icon && channel.icon[0].$.src;
console.log(channelLogo1)
const channelLogo = channelLogo1.split('?')[0]
console.log(channelLogo)
const filename = `${channelLogo}`
const lastIndex = filename.lastIndexOf(".");
if (lastIndex !== -1) {
Expand Down
3 changes: 2 additions & 1 deletion server/generators/channel-offline.generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ const CHANNEL_OFFLINE = async () => {
const channels = result.tv.channel;
channels.forEach((channel) => {
const channelId = channel.$.id;
const channelLogo = channel.icon && channel.icon[0].$.src;
const channelLogo1 = channel.icon && channel.icon[0].$.src;
const channelLogo = channelLogo1.split('?')[0]

const filename = `${channelLogo}`
const lastIndex = filename.lastIndexOf(".");
Expand Down

0 comments on commit f099684

Please sign in to comment.