Format code

This commit is contained in:
Zoe Roux 2023-11-02 02:07:06 +01:00
parent a33171ba87
commit 66fff153e1
4 changed files with 11 additions and 8 deletions

View File

@ -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
{

View File

@ -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>

View File

@ -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

View File

@ -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),
}