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