Adding more elements to the web app for the show details.

This commit is contained in:
Zoe Roux 2019-08-26 02:41:17 +02:00
parent 26edab07b0
commit 6636b876ba
4 changed files with 42 additions and 2 deletions

View File

@ -7,7 +7,6 @@
<h6 *ngIf="show.endYear; else elseBlock">{{show.startYear}} - {{show.endYear}}</h6> <h6 *ngIf="show.endYear; else elseBlock">{{show.startYear}} - {{show.endYear}}</h6>
<ng-template #elseBlock><h2>{{show.startYear}}</h2></ng-template> <ng-template #elseBlock><h2>{{show.startYear}}</h2></ng-template>
</div> </div>
<!--<mat-divider></mat-divider>-->
<div class="buttons"> <div class="buttons">
<button mat-fab>Play</button> <button mat-fab>Play</button>
<button mat-mini-fab>Download</button> <button mat-mini-fab>Download</button>
@ -15,6 +14,13 @@
<button mat-mini-fab>More</button> <button mat-mini-fab>More</button>
</div> </div>
</div> </div>
<div class="logo">
<img src="logo/{{this.show.slug}}" />
</div>
<div>
<p>Studio</p>
<p>Director</p>
</div>
</div> </div>
<div class="row pt-3"> <div class="row pt-3">

View File

@ -24,6 +24,17 @@
} }
} }
.logo
{
display: inline-block;
width: 15%;
>img
{
max-width: 100%;
}
}
.people-container .people-container
{ {
display: flex; display: flex;

View File

@ -22,6 +22,16 @@ namespace Kyoo.Controllers
return new PhysicalFileResult(thumbPath, "image/jpg"); 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}")] [HttpGet("backdrop/{showSlug}")]
public IActionResult GetShowBackground(string showSlug) public IActionResult GetShowBackground(string showSlug)
{ {

View File

@ -32,7 +32,20 @@ namespace Kyoo.InternalAPI.ThumbnailsManager
show.ImgPrimary = localThumb; 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"); string localBackdrop = Path.Combine(show.Path, "backdrop.jpg");
if (!File.Exists(localBackdrop)) if (!File.Exists(localBackdrop))