fix: change fl2.moveonjoy to fl6.moveonjoy

This commit is contained in:
2025-06-01 09:51:42 -07:00
parent 1363ed4f8a
commit e0c9df41d7

View File

@@ -1522,11 +1522,34 @@ async function serveM3U( res, req )
const updatedContent = formattedContent
.replace( /(https?:\/\/[^\s]*thetvapp[^\s]*)/g, ( fullUrl ) =>
{
Log.debug( `.m3u`, chalk.yellow( `[rewriter]` ), chalk.white( `⚙️` ),
chalk.blueBright( `<msg>` ), chalk.gray( `Rewriting url for keyword` ),
chalk.blueBright( `<keyword>` ), chalk.gray( `*thetvapp` ),
chalk.blueBright( `<from>` ), chalk.gray( `${ fullUrl }` ),
chalk.blueBright( `<to>` ), chalk.gray( `${ baseUrl }/channel?url=${ encodeURIComponent( fullUrl ) }` ) );
return `${ baseUrl }/channel?url=${ encodeURIComponent( fullUrl ) }`;
})
.replace( /(https?:\/\/[^\s]*tvpass[^\s]*)/g, ( fullUrl ) =>
{
Log.debug( `.m3u`, chalk.yellow( `[rewriter]` ), chalk.white( `⚙️` ),
chalk.blueBright( `<msg>` ), chalk.gray( `Rewriting url for keyword` ),
chalk.blueBright( `<keyword>` ), chalk.gray( `*tvpass` ),
chalk.blueBright( `<from>` ), chalk.gray( `${ fullUrl }` ),
chalk.blueBright( `<to>` ), chalk.gray( `${ baseUrl }/channel?url=${ encodeURIComponent( fullUrl ) }` ) );
return `${ baseUrl }/channel?url=${ encodeURIComponent( fullUrl ) }`;
})
.replace( /(https?:\/\/[^\s]*fl2.moveonjoy[^\s]*)/g, ( fullUrl ) =>
{
const urlRewrite = fullUrl.replace( 'fl2.moveonjoy', 'fl6.moveonjoy' );
Log.debug( `.m3u`, chalk.yellow( `[rewriter]` ), chalk.white( `⚙️` ),
chalk.blueBright( `<msg>` ), chalk.gray( `Rewriting url for keyword` ),
chalk.blueBright( `<keyword>` ), chalk.gray( `*fl2.moveonjoy` ),
chalk.blueBright( `<from>` ), chalk.gray( `${ fullUrl }` ),
chalk.blueBright( `<to>` ), chalk.gray( `${ urlRewrite }` ) );
return `${ urlRewrite }`;
});
res.writeHead( 200, {