Switch streaming embeds from vidsrc to vsembed.ru / vsembed.su

This commit is contained in:
maverick 2026-05-30 23:48:14 +10:00
parent a4f5389fb1
commit 67280dc701

View file

@ -760,7 +760,7 @@
let currentImdbId = null;
let currentSeason = 1;
let currentEpisode = 1;
let currentSource = 'vidsrc.cc'; // Default source
let currentSource = 'vsembed.ru'; // Default source
// Genre IDs mapping for creating meaningful categories
const genreMap = {
@ -1235,16 +1235,15 @@
// Function to load video from current source
function loadVideoSource() {
let videoUrl;
if (currentSource === 'vidsrc.cc') {
videoUrl = 'https://vidsrc.cc/v2/embed/';
if (currentSource === 'vsembed.ru') {
videoUrl = 'https://vsembed.ru/embed/';
if (currentMediaType === 'movie') {
videoUrl += `movie/${currentImdbId}`;
} else if (currentMediaType === 'tv') {
videoUrl += `tv/${currentImdbId}/${currentSeason}/${currentEpisode}`;
}
} else {
// vidsrc.xyz format - exactly as in the original code
videoUrl = 'https://vidsrc.xyz/embed/';
videoUrl = 'https://vsembed.su/embed/';
if (currentMediaType === 'movie') {
videoUrl += `movie/${currentTmdbId}`;
} else if (currentMediaType === 'tv') {
@ -1346,8 +1345,8 @@
// Set up alternate source button
document.getElementById('altSourceBtn').addEventListener('click', function() {
// Toggle between sources
currentSource = currentSource === 'vidsrc.cc' ? 'vidsrc.xyz' : 'vidsrc.cc';
this.textContent = `Try ${currentSource === 'vidsrc.cc' ? 'vidsrc.xyz' : 'vidsrc.cc'}`;
currentSource = currentSource === 'vsembed.ru' ? 'vsembed.su' : 'vsembed.ru';
this.textContent = `Try ${currentSource === 'vsembed.ru' ? 'vsembed.su' : 'vsembed.ru'}`;
// Reload with new source
loadVideoSource();