mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-01 12:44:45 -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;
|
||||||
using Kyoo.Core.Controllers;
|
using Kyoo.Core.Controllers;
|
||||||
using Kyoo.Postgresql;
|
using Kyoo.Postgresql;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Moq;
|
using Moq;
|
||||||
using Xunit.Abstractions;
|
using Xunit.Abstractions;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
|
|
||||||
namespace Kyoo.Tests.Database
|
namespace Kyoo.Tests.Database
|
||||||
{
|
{
|
||||||
|
@ -40,10 +40,9 @@ export const episodeDisplayNumber = (
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const displayRuntime = (runtime: number) => {
|
export const displayRuntime = (runtime: number) => {
|
||||||
if (runtime < 60)
|
if (runtime < 60) return `${runtime}min`;
|
||||||
return `${runtime}min`;
|
|
||||||
return `${Math.floor(runtime / 60)}h${runtime % 60}`;
|
return `${Math.floor(runtime / 60)}h${runtime % 60}`;
|
||||||
}
|
};
|
||||||
|
|
||||||
export const EpisodeBox = ({
|
export const EpisodeBox = ({
|
||||||
name,
|
name,
|
||||||
@ -205,7 +204,8 @@ export const EpisodeLine = ({
|
|||||||
</H6>
|
</H6>
|
||||||
)}
|
)}
|
||||||
</Skeleton>
|
</Skeleton>
|
||||||
{isLoading || (runtime && <Skeleton>{isLoading || <SubP>{displayRuntime(runtime)}</SubP>}</Skeleton>)}
|
{isLoading ||
|
||||||
|
(runtime && <Skeleton>{isLoading || <SubP>{displayRuntime(runtime)}</SubP>}</Skeleton>)}
|
||||||
</View>
|
</View>
|
||||||
<Skeleton>{isLoading || <P numberOfLines={3}>{overview}</P>}</Skeleton>
|
<Skeleton>{isLoading || <P numberOfLines={3}>{overview}</P>}</Skeleton>
|
||||||
</View>
|
</View>
|
||||||
|
@ -60,6 +60,7 @@ class Provider:
|
|||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
@abstractmethod
|
@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
|
raise NotImplementedError
|
||||||
|
|
||||||
|
@ -26,6 +26,8 @@ class Collection:
|
|||||||
**asdict(self),
|
**asdict(self),
|
||||||
**asdict(self.translations[default_language]),
|
**asdict(self.translations[default_language]),
|
||||||
"poster": next(iter(self.translations[default_language].posters), None),
|
"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),
|
"logo": next(iter(self.translations[default_language].logos), None),
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user