mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-04-20 00:02:03 +00:00
Refactor MovieContent, useMetadata, and HomeScreen for code consistency and readability
This update includes minor formatting adjustments across the MovieContent, useMetadata, and HomeScreen components to enhance code readability. Changes involve whitespace normalization and alignment improvements, contributing to a cleaner codebase without altering functionality.
This commit is contained in:
parent
b953e99e3d
commit
d9614a6def
3 changed files with 8 additions and 8 deletions
|
|
@ -23,7 +23,7 @@ export const MovieContent: React.FC<MovieContentProps> = ({ metadata }) => {
|
|||
</View>
|
||||
)}
|
||||
|
||||
|
||||
|
||||
{hasCast && (
|
||||
<View style={styles.metadataRow}>
|
||||
<Text style={[styles.metadataLabel, { color: currentTheme.colors.textMuted }]}>Cast:</Text>
|
||||
|
|
|
|||
|
|
@ -514,10 +514,10 @@ export const useMetadata = ({ id, type, addonId }: UseMetadataProps): UseMetadat
|
|||
const [content, castData] = await Promise.allSettled([
|
||||
// Load content with timeout and retry
|
||||
withRetry(async () => {
|
||||
const result = await withTimeout(
|
||||
const result = await withTimeout(
|
||||
catalogService.getEnhancedContentDetails(type, actualId, addonId),
|
||||
API_TIMEOUT
|
||||
);
|
||||
API_TIMEOUT
|
||||
);
|
||||
// Store the actual ID used (could be IMDB)
|
||||
if (actualId.startsWith('tt')) {
|
||||
setImdbId(actualId);
|
||||
|
|
@ -543,7 +543,7 @@ export const useMetadata = ({ id, type, addonId }: UseMetadataProps): UseMetadat
|
|||
if (type === 'series') {
|
||||
// Load series data after the enhanced metadata is processed
|
||||
setTimeout(() => {
|
||||
loadSeriesData().catch(console.error);
|
||||
loadSeriesData().catch(console.error);
|
||||
}, 100);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -500,10 +500,10 @@ const HomeScreen = () => {
|
|||
// Start all catalog loading promises but don't wait for them
|
||||
// They will update the state progressively as they complete
|
||||
Promise.allSettled(catalogPromises).then(() => {
|
||||
console.log('[HomeScreen] All catalogs processed');
|
||||
|
||||
console.log('[HomeScreen] All catalogs processed');
|
||||
|
||||
// Final cleanup: Filter out null values to get only successfully loaded catalogs
|
||||
setCatalogs(prevCatalogs => prevCatalogs.filter(catalog => catalog !== null));
|
||||
setCatalogs(prevCatalogs => prevCatalogs.filter(catalog => catalog !== null));
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue