mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-16 23:12:12 +00:00
Changing stremio addon URL to correct wanted format
This commit is contained in:
parent
c91546dc1e
commit
04d22e0eca
1 changed files with 11 additions and 6 deletions
|
|
@ -700,7 +700,7 @@ const AddonsScreen = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleAddAddon = async (url?: string) => {
|
const handleAddAddon = async (url?: string) => {
|
||||||
const urlToInstall = url || addonUrl;
|
let urlToInstall = url || addonUrl;
|
||||||
if (!urlToInstall) {
|
if (!urlToInstall) {
|
||||||
setAlertTitle('Error');
|
setAlertTitle('Error');
|
||||||
setAlertMessage('Please enter an addon URL or select a community addon');
|
setAlertMessage('Please enter an addon URL or select a community addon');
|
||||||
|
|
@ -709,6 +709,11 @@ const AddonsScreen = () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Replace stremio:// with https:// if present
|
||||||
|
if (urlToInstall.startsWith('stremio://')) {
|
||||||
|
urlToInstall = urlToInstall.replace(/^stremio:\/\//, 'https://');
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
setInstalling(true);
|
setInstalling(true);
|
||||||
const manifest = await stremioService.getManifest(urlToInstall);
|
const manifest = await stremioService.getManifest(urlToInstall);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue