Switch streaming embeds from vidsrc to vsembed.ru / vsembed.su
This commit is contained in:
parent
a4f5389fb1
commit
67280dc701
1 changed files with 6 additions and 7 deletions
13
index.html
13
index.html
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue