mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Format code
This commit is contained in:
parent
a33171ba87
commit
66fff153e1
@ -26,9 +26,9 @@ using Kyoo.Abstractions.Models;
|
||||
using Kyoo.Core;
|
||||
using Kyoo.Core.Controllers;
|
||||
using Kyoo.Postgresql;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Moq;
|
||||
using Xunit.Abstractions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Kyoo.Tests.Database
|
||||
{
|
||||
|
@ -40,10 +40,9 @@ export const episodeDisplayNumber = (
|
||||
};
|
||||
|
||||
export const displayRuntime = (runtime: number) => {
|
||||
if (runtime < 60)
|
||||
return `${runtime}min`;
|
||||
if (runtime < 60) return `${runtime}min`;
|
||||
return `${Math.floor(runtime / 60)}h${runtime % 60}`;
|
||||
}
|
||||
};
|
||||
|
||||
export const EpisodeBox = ({
|
||||
name,
|
||||
@ -205,7 +204,8 @@ export const EpisodeLine = ({
|
||||
</H6>
|
||||
)}
|
||||
</Skeleton>
|
||||
{isLoading || (runtime && <Skeleton>{isLoading || <SubP>{displayRuntime(runtime)}</SubP>}</Skeleton>)}
|
||||
{isLoading ||
|
||||
(runtime && <Skeleton>{isLoading || <SubP>{displayRuntime(runtime)}</SubP>}</Skeleton>)}
|
||||
</View>
|
||||
<Skeleton>{isLoading || <P numberOfLines={3}>{overview}</P>}</Skeleton>
|
||||
</View>
|
||||
|
@ -60,6 +60,7 @@ class Provider:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def identify_collection(self, provider_id: str, *, language: list[str]) -> Collection:
|
||||
async def identify_collection(
|
||||
self, provider_id: str, *, language: list[str]
|
||||
) -> Collection:
|
||||
raise NotImplementedError
|
||||
|
||||
|
@ -26,6 +26,8 @@ class Collection:
|
||||
**asdict(self),
|
||||
**asdict(self.translations[default_language]),
|
||||
"poster": next(iter(self.translations[default_language].posters), None),
|
||||
"thumbnail": next(iter(self.translations[default_language].thumbnails), None),
|
||||
"thumbnail": next(
|
||||
iter(self.translations[default_language].thumbnails), None
|
||||
),
|
||||
"logo": next(iter(self.translations[default_language].logos), None),
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user