Polish 4 (#3577)
Co-authored-by: Zeoic <zeorgaming@gmail.com> Co-authored-by: Fesaa <77553571+Fesaa@users.noreply.github.com>
This commit is contained in:
parent
b38400c092
commit
0ffe0228e5
30 changed files with 339 additions and 115 deletions
|
|
@ -9,6 +9,7 @@ using API.DTOs.Theme;
|
|||
using API.Entities;
|
||||
using API.Entities.Enums.Theme;
|
||||
using API.Extensions;
|
||||
using API.Services.Tasks.Scanner.Parser;
|
||||
using API.SignalR;
|
||||
using Flurl.Http;
|
||||
using HtmlAgilityPack;
|
||||
|
|
@ -192,7 +193,8 @@ public class ThemeService : IThemeService
|
|||
|
||||
private static List<string> GetPreviewUrls(IEnumerable<GitHubContent> themeContents)
|
||||
{
|
||||
return themeContents.Where(c => c.Name.ToLower().EndsWith(".jpg") || c.Name.ToLower().EndsWith(".png") )
|
||||
return themeContents
|
||||
.Where(c => Parser.IsImage(c.Name) )
|
||||
.Select(p => p.DownloadUrl)
|
||||
.ToList();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue