mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-04-23 10:42:37 -04:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
3c291d5fac
|
|||
|
2a430a1c38
|
|||
|
1a0f7c0282
|
@@ -847,40 +847,6 @@ public partial class JellyfinController : ControllerBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<string?> ResolveCurrentSpotifyPlaylistImageTagAsync(string itemId, string imageType)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var (itemResult, statusCode) = await _proxyService.GetJsonAsyncInternal($"Items/{itemId}");
|
|
||||||
if (itemResult == null || statusCode != 200)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
using var itemDocument = itemResult;
|
|
||||||
var imageTag = ExtractImageTag(itemDocument.RootElement, imageType);
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(imageTag))
|
|
||||||
{
|
|
||||||
_logger.LogDebug(
|
|
||||||
"Resolved current Jellyfin {ImageType} image tag for Spotify playlist {PlaylistId}: {ImageTag}",
|
|
||||||
imageType,
|
|
||||||
itemId,
|
|
||||||
imageTag);
|
|
||||||
}
|
|
||||||
|
|
||||||
return imageTag;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogDebug(ex,
|
|
||||||
"Failed to resolve current Jellyfin {ImageType} image tag for Spotify playlist {PlaylistId}",
|
|
||||||
imageType,
|
|
||||||
itemId);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Favorites
|
#region Favorites
|
||||||
|
|||||||
Reference in New Issue
Block a user