feat: show explicit badge on YouTube Music results
This commit is contained in:
@@ -8,7 +8,8 @@ namespace Musify.Application.Contracts
|
||||
string Artist,
|
||||
string Album,
|
||||
int DurationSeconds,
|
||||
string ThumbnailUrl);
|
||||
string ThumbnailUrl,
|
||||
bool IsExplicit);
|
||||
|
||||
public record YouTubeSearchResult(
|
||||
IReadOnlyList<YouTubeSongResult> Items,
|
||||
|
||||
@@ -48,7 +48,8 @@ namespace Musify.Infrastructure.Services
|
||||
song.Thumbnails
|
||||
.OrderByDescending(thumbnail => thumbnail.Width)
|
||||
.Select(thumbnail => thumbnail.Url)
|
||||
.FirstOrDefault() ?? string.Empty))
|
||||
.FirstOrDefault() ?? string.Empty,
|
||||
song.IsExplicit))
|
||||
.ToList();
|
||||
|
||||
var nextToken = string.Empty;
|
||||
@@ -122,7 +123,8 @@ namespace Musify.Infrastructure.Services
|
||||
info.Thumbnails
|
||||
.OrderByDescending(thumbnail => thumbnail.Width)
|
||||
.Select(thumbnail => thumbnail.Url)
|
||||
.FirstOrDefault() ?? string.Empty);
|
||||
.FirstOrDefault() ?? string.Empty,
|
||||
info.IsExplicit);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user