mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Adding more elements to the web app for the show details.
This commit is contained in:
parent
26edab07b0
commit
6636b876ba
@ -7,7 +7,6 @@
|
||||
<h6 *ngIf="show.endYear; else elseBlock">{{show.startYear}} - {{show.endYear}}</h6>
|
||||
<ng-template #elseBlock><h2>{{show.startYear}}</h2></ng-template>
|
||||
</div>
|
||||
<!--<mat-divider></mat-divider>-->
|
||||
<div class="buttons">
|
||||
<button mat-fab>Play</button>
|
||||
<button mat-mini-fab>Download</button>
|
||||
@ -15,6 +14,13 @@
|
||||
<button mat-mini-fab>More</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="logo">
|
||||
<img src="logo/{{this.show.slug}}" />
|
||||
</div>
|
||||
<div>
|
||||
<p>Studio</p>
|
||||
<p>Director</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row pt-3">
|
||||
|
@ -24,6 +24,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
.logo
|
||||
{
|
||||
display: inline-block;
|
||||
width: 15%;
|
||||
|
||||
>img
|
||||
{
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.people-container
|
||||
{
|
||||
display: flex;
|
||||
|
@ -22,6 +22,16 @@ namespace Kyoo.Controllers
|
||||
return new PhysicalFileResult(thumbPath, "image/jpg");
|
||||
}
|
||||
|
||||
[HttpGet("logo/{showSlug}")]
|
||||
public IActionResult GetShowLogo(string showSlug)
|
||||
{
|
||||
string thumbPath = libraryManager.GetShowBySlug(showSlug)?.ImgLogo;
|
||||
if (thumbPath == null)
|
||||
return NotFound();
|
||||
|
||||
return new PhysicalFileResult(thumbPath, "image/png");
|
||||
}
|
||||
|
||||
[HttpGet("backdrop/{showSlug}")]
|
||||
public IActionResult GetShowBackground(string showSlug)
|
||||
{
|
||||
|
@ -32,7 +32,20 @@ namespace Kyoo.InternalAPI.ThumbnailsManager
|
||||
show.ImgPrimary = localThumb;
|
||||
}
|
||||
|
||||
if(show.ImgBackdrop != null)
|
||||
if (show.ImgLogo != null)
|
||||
{
|
||||
string localLogo = Path.Combine(show.Path, "logo.png");
|
||||
if (!File.Exists(localLogo))
|
||||
{
|
||||
using (WebClient client = new WebClient())
|
||||
{
|
||||
client.DownloadFileAsync(new Uri(show.ImgLogo), localLogo);
|
||||
}
|
||||
}
|
||||
show.ImgLogo = localLogo;
|
||||
}
|
||||
|
||||
if (show.ImgBackdrop != null)
|
||||
{
|
||||
string localBackdrop = Path.Combine(show.Path, "backdrop.jpg");
|
||||
if (!File.Exists(localBackdrop))
|
||||
|
Loading…
x
Reference in New Issue
Block a user