mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-01-11 20:10:25 +00:00
update beta 10
This commit is contained in:
parent
950e38a20b
commit
28752791ae
6 changed files with 43 additions and 56 deletions
8
App.tsx
8
App.tsx
|
|
@ -40,10 +40,10 @@ Sentry.init({
|
|||
// For more information, visit: https://docs.sentry.io/platforms/react-native/data-management/data-collected/
|
||||
sendDefaultPii: true,
|
||||
|
||||
// Configure Session Replay (disabled for performance)
|
||||
replaysSessionSampleRate: 0,
|
||||
replaysOnErrorSampleRate: 0,
|
||||
integrations: [Sentry.feedbackIntegration()],
|
||||
// Configure Session Replay
|
||||
replaysSessionSampleRate: 0.1,
|
||||
replaysOnErrorSampleRate: 1,
|
||||
integrations: [Sentry.mobileReplayIntegration(), Sentry.feedbackIntegration()],
|
||||
|
||||
// uncomment the line below to enable Spotlight (https://spotlightjs.com)
|
||||
// spotlight: __DEV__,
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 6fda05ee03e39bd6bd1ee9d15be00cb33b491574
|
||||
Subproject commit 5c3e2d8bccf7d076e392fdc397233f392e2a1563
|
||||
|
|
@ -41,7 +41,6 @@ const { width, height } = Dimensions.get('window');
|
|||
const isTablet = width >= 768;
|
||||
|
||||
// Ultra-optimized animation constants
|
||||
const PARALLAX_FACTOR = 0.3;
|
||||
const SCALE_FACTOR = 1.02;
|
||||
const FADE_THRESHOLD = 200;
|
||||
|
||||
|
|
@ -933,13 +932,11 @@ const HeroSection: React.FC<HeroSectionProps> = memo(({
|
|||
// Enhanced backdrop with smooth loading animation
|
||||
const backdropImageStyle = useAnimatedStyle(() => {
|
||||
'worklet';
|
||||
const translateY = scrollY.value * PARALLAX_FACTOR;
|
||||
const scale = 1 + (scrollY.value * 0.0001); // Micro scale effect
|
||||
|
||||
return {
|
||||
opacity: imageOpacity.value * imageLoadOpacity.value,
|
||||
transform: [
|
||||
{ translateY: -Math.min(translateY, 100) }, // Cap translation
|
||||
{ scale: Math.min(scale, SCALE_FACTOR) } // Cap scale
|
||||
],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -900,9 +900,17 @@ const PluginsScreen: React.FC = () => {
|
|||
const repo = repositories.find(r => r.id === repoId);
|
||||
if (!repo) return;
|
||||
|
||||
// Special handling for the last repository
|
||||
const isLastRepository = repositories.length === 1;
|
||||
|
||||
const alertTitle = isLastRepository ? 'Remove Last Repository' : 'Remove Repository';
|
||||
const alertMessage = isLastRepository
|
||||
? `Are you sure you want to remove "${repo.name}"? This is your only repository, so you'll have no scrapers available until you add a new repository.`
|
||||
: `Are you sure you want to remove "${repo.name}"? This will also remove all scrapers from this repository.`;
|
||||
|
||||
Alert.alert(
|
||||
'Remove Repository',
|
||||
`Are you sure you want to remove "${repo.name}"? This will also remove all scrapers from this repository.`,
|
||||
alertTitle,
|
||||
alertMessage,
|
||||
[
|
||||
{ text: 'Cancel', style: 'cancel' },
|
||||
{
|
||||
|
|
@ -913,7 +921,10 @@ const PluginsScreen: React.FC = () => {
|
|||
await localScraperService.removeRepository(repoId);
|
||||
await loadRepositories();
|
||||
await loadScrapers();
|
||||
Alert.alert('Success', 'Repository removed successfully');
|
||||
const successMessage = isLastRepository
|
||||
? 'Repository removed successfully. You can add a new repository using the "Add Repository" button.'
|
||||
: 'Repository removed successfully';
|
||||
Alert.alert('Success', successMessage);
|
||||
} catch (error) {
|
||||
logger.error('[ScraperSettings] Failed to remove repository:', error);
|
||||
Alert.alert('Error', error instanceof Error ? error.message : 'Failed to remove repository');
|
||||
|
|
@ -1312,15 +1323,13 @@ const PluginsScreen: React.FC = () => {
|
|||
<Text style={styles.repositoryActionButtonText}>Refresh</Text>
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
{repositories.length > 1 && (
|
||||
<TouchableOpacity
|
||||
style={[styles.repositoryActionButton, styles.repositoryActionButtonDanger]}
|
||||
onPress={() => handleRemoveRepository(repo.id)}
|
||||
disabled={switchingRepository !== null}
|
||||
>
|
||||
<Text style={styles.repositoryActionButtonText}>Remove</Text>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
<TouchableOpacity
|
||||
style={[styles.repositoryActionButton, styles.repositoryActionButtonDanger]}
|
||||
onPress={() => handleRemoveRepository(repo.id)}
|
||||
disabled={switchingRepository !== null}
|
||||
>
|
||||
<Text style={styles.repositoryActionButtonText}>Remove</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
))}
|
||||
|
|
|
|||
|
|
@ -415,16 +415,18 @@ class LocalScraperService {
|
|||
throw new Error(`Repository with id ${id} not found`);
|
||||
}
|
||||
|
||||
// Don't allow removing the last repository
|
||||
if (this.repositories.size <= 1) {
|
||||
throw new Error('Cannot remove the last repository');
|
||||
}
|
||||
// Allow removing the last repository - users can add new ones
|
||||
// The app will work without repositories (no scrapers available)
|
||||
|
||||
// If removing current repository, switch to another one
|
||||
// If removing current repository, switch to another one or clear current
|
||||
if (id === this.currentRepositoryId) {
|
||||
const remainingRepos = Array.from(this.repositories.values()).filter(r => r.id !== id);
|
||||
if (remainingRepos.length > 0) {
|
||||
await this.setCurrentRepository(remainingRepos[0].id);
|
||||
} else {
|
||||
// No repositories left, clear current repository
|
||||
this.currentRepositoryId = '';
|
||||
await AsyncStorage.removeItem('current-repository-id');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export interface UpdateInfo {
|
|||
export class UpdateService {
|
||||
private static instance: UpdateService;
|
||||
private updateCheckInterval: NodeJS.Timeout | null = null;
|
||||
private readonly CHECK_INTERVAL = 5 * 60 * 1000; // 5 minutes
|
||||
// Removed automatic periodic checks - only check on app start and manual trigger
|
||||
private logs: string[] = [];
|
||||
private readonly MAX_LOGS = 100; // Keep last 100 logs
|
||||
|
||||
|
|
@ -233,10 +233,7 @@ export class UpdateService {
|
|||
return;
|
||||
}
|
||||
|
||||
this.addLog('Updates are enabled, setting up periodic checks', 'INFO');
|
||||
|
||||
// Set up periodic update checks
|
||||
this.startPeriodicUpdateChecks();
|
||||
this.addLog('Updates are enabled, skipping automatic periodic checks', 'INFO');
|
||||
this.addLog('UpdateService initialization completed successfully', 'INFO');
|
||||
} catch (error) {
|
||||
this.addLog(`Initialization failed: ${error instanceof Error ? error.message : String(error)}`, 'ERROR');
|
||||
|
|
@ -408,39 +405,21 @@ export class UpdateService {
|
|||
}
|
||||
|
||||
/**
|
||||
* Start periodic update checks
|
||||
* Start periodic update checks - DISABLED
|
||||
* Updates are now only checked on app start and manual trigger
|
||||
*/
|
||||
private startPeriodicUpdateChecks(): void {
|
||||
if (this.updateCheckInterval) {
|
||||
this.addLog('Stopping existing periodic update checks', 'INFO');
|
||||
clearInterval(this.updateCheckInterval);
|
||||
}
|
||||
|
||||
this.addLog(`Starting periodic update checks every ${this.CHECK_INTERVAL / 1000} seconds`, 'INFO');
|
||||
|
||||
this.updateCheckInterval = setInterval(async () => {
|
||||
try {
|
||||
this.addLog('Performing scheduled update check...', 'INFO');
|
||||
await this.checkForUpdates();
|
||||
} catch (error) {
|
||||
const errorMessage = error instanceof Error ? error.message : String(error);
|
||||
this.addLog(`Scheduled update check failed: ${errorMessage}`, 'ERROR');
|
||||
console.error('Periodic update check failed:', error);
|
||||
}
|
||||
}, this.CHECK_INTERVAL);
|
||||
this.addLog('Periodic update checks are disabled - only checking on app start and manual trigger', 'INFO');
|
||||
// Method kept for compatibility but no longer starts automatic checks
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop periodic update checks
|
||||
* Stop periodic update checks - DISABLED
|
||||
* No periodic checks are running, so this is a no-op
|
||||
*/
|
||||
public stopPeriodicUpdateChecks(): void {
|
||||
if (this.updateCheckInterval) {
|
||||
this.addLog('Stopping periodic update checks', 'INFO');
|
||||
clearInterval(this.updateCheckInterval);
|
||||
this.updateCheckInterval = null;
|
||||
} else {
|
||||
this.addLog('No periodic update checks running to stop', 'INFO');
|
||||
}
|
||||
this.addLog('Periodic update checks are disabled - nothing to stop', 'INFO');
|
||||
// Method kept for compatibility but no longer stops automatic checks
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue