mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-04 22:24:14 -04:00
ThumbnailManager: Fixing external metadata handling
This commit is contained in:
parent
d435c2c59f
commit
375fcab258
@ -44,12 +44,12 @@ version: "3.8"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
kyoo:
|
kyoo:
|
||||||
image: ghcr.io/anonymusraccoon/kyoo:readme
|
image: ghcr.io/anonymusraccoon/kyoo:master
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
environment:
|
environment:
|
||||||
- KYOO_DATADIR=/var/lib/kyoo
|
- KYOO_DATADIR=/var/lib/kyoo
|
||||||
- BASICS__PUBLICURL=https://demo.kyoo.sdg
|
- BASICS__PUBLICURL=https://demo.kyoo.moe
|
||||||
- KYOO_MetadataInShow=false
|
- BASICS__MetadataInShow=false
|
||||||
- DATABASE__ENABLED=postgres
|
- DATABASE__ENABLED=postgres
|
||||||
- DATABASE__CONFIGURATIONS__POSTGRES__SERVER=postgres
|
- DATABASE__CONFIGURATIONS__POSTGRES__SERVER=postgres
|
||||||
- DATABASE__CONFIGURATIONS__POSTGRES__USER ID=kyoo
|
- DATABASE__CONFIGURATIONS__POSTGRES__USER ID=kyoo
|
||||||
|
@ -205,11 +205,11 @@ namespace Kyoo.Core.Controllers
|
|||||||
string path = await fs.GetExtraDirectory(resource)
|
string path = await fs.GetExtraDirectory(resource)
|
||||||
?? resource switch
|
?? resource switch
|
||||||
{
|
{
|
||||||
Season season => await GetExtraDirectory(season.Show),
|
IResource res => Combine(
|
||||||
Episode episode => await GetExtraDirectory(episode.Show),
|
_options.CurrentValue.MetadataPath,
|
||||||
Track track => await GetExtraDirectory(track.Episode),
|
typeof(T).Name.ToLowerInvariant(),
|
||||||
IResource res => Combine(_options.CurrentValue.MetadataPath,
|
res.Slug
|
||||||
typeof(T).Name.ToLowerInvariant(), res.Slug),
|
),
|
||||||
_ => Combine(_options.CurrentValue.MetadataPath, typeof(T).Name.ToLowerInvariant())
|
_ => Combine(_options.CurrentValue.MetadataPath, typeof(T).Name.ToLowerInvariant())
|
||||||
};
|
};
|
||||||
return await CreateDirectory(path);
|
return await CreateDirectory(path);
|
||||||
|
@ -20,6 +20,7 @@ using System;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using Kyoo.Abstractions.Controllers;
|
using Kyoo.Abstractions.Controllers;
|
||||||
using Kyoo.Abstractions.Models;
|
using Kyoo.Abstractions.Models;
|
||||||
using Microsoft.AspNetCore.StaticFiles;
|
using Microsoft.AspNetCore.StaticFiles;
|
||||||
@ -114,7 +115,7 @@ namespace Kyoo.Core.Controllers
|
|||||||
/// <param name="imageID">The ID of the image. See <see cref="Images"/> for values.</param>
|
/// <param name="imageID">The ID of the image. See <see cref="Images"/> for values.</param>
|
||||||
/// <typeparam name="T">The type of the item</typeparam>
|
/// <typeparam name="T">The type of the item</typeparam>
|
||||||
/// <returns>The path of the image for the given resource, <b>even if it does not exists</b></returns>
|
/// <returns>The path of the image for the given resource, <b>even if it does not exists</b></returns>
|
||||||
private async Task<string> _GetPrivateImagePath<T>(T item, int imageID)
|
private async Task<string> _GetPrivateImagePath<T>([NotNull] T item, int imageID)
|
||||||
{
|
{
|
||||||
if (item == null)
|
if (item == null)
|
||||||
throw new ArgumentNullException(nameof(item));
|
throw new ArgumentNullException(nameof(item));
|
||||||
|
@ -47,15 +47,15 @@
|
|||||||
</Exec>
|
</Exec>
|
||||||
<Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
|
<Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
|
||||||
|
|
||||||
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
|
<Message Importance="high" Text="Restoring dependencies using 'yarn'. This may take several minutes..." />
|
||||||
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
|
<Exec WorkingDirectory="$(SpaRoot)" Command="yarn install" />
|
||||||
<Touch Files="$(NpmStamp)" AlwaysCreate="true" />
|
<Touch Files="$(NpmStamp)" AlwaysCreate="true" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="RunWebpack" Condition="'$(SkipWebApp)' != 'true' And '$(Configuration)' == 'Release'">
|
<Target Name="RunWebpack" Condition="'$(SkipWebApp)' != 'true' And '$(Configuration)' == 'Release'">
|
||||||
<Message Importance="high" Text="Building the web app. This may take several minutes..." />
|
<Message Importance="high" Text="Building the web app. This may take several minutes..." />
|
||||||
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build -- --prod" />
|
<Exec WorkingDirectory="$(SpaRoot)" Command="yarn run build -- --prod" />
|
||||||
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build:ssr -- --prod" Condition="'$(BuildServerSideRenderer)' == 'true'" />
|
<Exec WorkingDirectory="$(SpaRoot)" Command="yarn run build:ssr -- --prod" Condition="'$(BuildServerSideRenderer)' == 'true'" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="CopyFrontEndFiles" AfterTargets="RunWebpack" BeforeTargets="GetCopyToOutputDirectoryItems" Condition="'$(Configuration)' != 'Debug'">
|
<Target Name="CopyFrontEndFiles" AfterTargets="RunWebpack" BeforeTargets="GetCopyToOutputDirectoryItems" Condition="'$(Configuration)' != 'Debug'">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user