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]
|
[Unit]
|
||||||
Description=Kyoo Media Server
|
Description=Kyoo Media Server
|
||||||
Requires=postgresql.service
|
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
@ -60,7 +60,7 @@ namespace Kyoo.Core.Api
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The base URL of Kyoo. This will be used to create links for images and
|
/// 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>
|
/// </summary>
|
||||||
private readonly Uri _baseURL;
|
private readonly Uri _baseURL;
|
||||||
|
|
||||||
@ -399,6 +399,7 @@ namespace Kyoo.Core.Api
|
|||||||
return NotFound();
|
return NotFound();
|
||||||
string path = _files.Combine(await _files.GetExtraDirectory(show), "Attachments");
|
string path = _files.Combine(await _files.GetExtraDirectory(show), "Attachments");
|
||||||
return (await _files.ListFiles(path))
|
return (await _files.ListFiles(path))
|
||||||
|
.DistinctBy(Path.GetFileNameWithoutExtension)
|
||||||
.ToDictionary(
|
.ToDictionary(
|
||||||
Path.GetFileNameWithoutExtension,
|
Path.GetFileNameWithoutExtension,
|
||||||
x => $"{_baseURL}api/shows/{identifier}/fonts/{Path.GetFileName(x)}"
|
x => $"{_baseURL}api/shows/{identifier}/fonts/{Path.GetFileName(x)}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user