mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Fixing duplicates font files on the /api/show/id/fonts route
Resolves #94
This commit is contained in:
parent
0f06033b42
commit
76a57459af
@ -1,18 +0,0 @@
|
||||
{
|
||||
"categories": [
|
||||
{
|
||||
"title": "## Features",
|
||||
"labels": ["enhancement"]
|
||||
},
|
||||
{
|
||||
"title": "## Fixes",
|
||||
"labels": ["bug"]
|
||||
},
|
||||
{
|
||||
"title": "## Web App",
|
||||
"labels": ["webapp"]
|
||||
}
|
||||
],
|
||||
"template": "${{CHANGELOG}}\n\n<details>\n<summary>Others</summary>\n\n${{UNCATEGORIZED}}\n</details>",
|
||||
"pr_template": "- ${{TITLE}} (PR: #${{NUMBER}})"
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
[Unit]
|
||||
Description=Kyoo Media Server
|
||||
Requires=postgresql.service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
|
@ -60,7 +60,7 @@ namespace Kyoo.Core.Api
|
||||
|
||||
/// <summary>
|
||||
/// The base URL of Kyoo. This will be used to create links for images and
|
||||
/// <see cref="Abstractions.Models.Page{T}"/>.
|
||||
/// <see cref="Page{T}"/>.
|
||||
/// </summary>
|
||||
private readonly Uri _baseURL;
|
||||
|
||||
@ -399,6 +399,7 @@ namespace Kyoo.Core.Api
|
||||
return NotFound();
|
||||
string path = _files.Combine(await _files.GetExtraDirectory(show), "Attachments");
|
||||
return (await _files.ListFiles(path))
|
||||
.DistinctBy(Path.GetFileNameWithoutExtension)
|
||||
.ToDictionary(
|
||||
Path.GetFileNameWithoutExtension,
|
||||
x => $"{_baseURL}api/shows/{identifier}/fonts/{Path.GetFileName(x)}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user