mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-01-11 20:10:25 +00:00
Merge branch 'main' of https://github.com/tapframe/NuvioStreaming
This commit is contained in:
commit
97c400130c
2 changed files with 11 additions and 6 deletions
0
android/gradlew
vendored
Normal file → Executable file
0
android/gradlew
vendored
Normal file → Executable file
|
|
@ -700,7 +700,7 @@ const AddonsScreen = () => {
|
|||
};
|
||||
|
||||
const handleAddAddon = async (url?: string) => {
|
||||
const urlToInstall = url || addonUrl;
|
||||
let urlToInstall = url || addonUrl;
|
||||
if (!urlToInstall) {
|
||||
setAlertTitle('Error');
|
||||
setAlertMessage('Please enter an addon URL or select a community addon');
|
||||
|
|
@ -709,6 +709,11 @@ const AddonsScreen = () => {
|
|||
return;
|
||||
}
|
||||
|
||||
// Replace stremio:// with https:// if present
|
||||
if (urlToInstall.startsWith('stremio://')) {
|
||||
urlToInstall = urlToInstall.replace(/^stremio:\/\//, 'https://');
|
||||
}
|
||||
|
||||
try {
|
||||
setInstalling(true);
|
||||
const manifest = await stremioService.getManifest(urlToInstall);
|
||||
|
|
@ -716,11 +721,11 @@ const AddonsScreen = () => {
|
|||
setAddonUrl(urlToInstall);
|
||||
setShowConfirmModal(true);
|
||||
} catch (error) {
|
||||
logger.error('Failed to fetch addon details:', error);
|
||||
setAlertTitle('Error');
|
||||
setAlertMessage(`Failed to fetch addon details from ${urlToInstall}`);
|
||||
setAlertActions([{ label: 'OK', onPress: () => setAlertVisible(false) }]);
|
||||
setAlertVisible(true);
|
||||
logger.error('Failed to fetch addon details:', error);
|
||||
setAlertTitle('Error');
|
||||
setAlertMessage(`Failed to fetch addon details from ${urlToInstall}`);
|
||||
setAlertActions([{ label: 'OK', onPress: () => setAlertVisible(false) }]);
|
||||
setAlertVisible(true);
|
||||
} finally {
|
||||
setInstalling(false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue