Release 1.0.0.13: fix cover size
This commit is contained in:
1 parent
7106023d49
commit
7b4c6e9368
8 files changed
+17
-17
No files matched your search
@@ -1,9 +1,9 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>1.0.0.12</Version>
|
<Version>1.0.0.13</Version>
|
||||||
<AssemblyVersion>1.0.0.12</AssemblyVersion>
|
<AssemblyVersion>1.0.0.13</AssemblyVersion>
|
||||||
<FileVersion>1.0.0.12</FileVersion>
|
<FileVersion>1.0.0.13</FileVersion>
|
||||||
<TargetFramework>net10.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<RootNamespace>Jellyfin.Plugin.YandexMusic</RootNamespace>
|
<RootNamespace>Jellyfin.Plugin.YandexMusic</RootNamespace>
|
||||||
<AssemblyName>Jellyfin.Plugin.YandexMusic</AssemblyName>
|
<AssemblyName>Jellyfin.Plugin.YandexMusic</AssemblyName>
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public class YandexMusicAlbumProvider : IRemoteMetadataProvider<MusicAlbum, Albu
|
|||||||
item.SetProviderId(YandexProviderIds.Artist, primaryArtist.Id.ToString(CultureInfo.InvariantCulture));
|
item.SetProviderId(YandexProviderIds.Artist, primaryArtist.Id.ToString(CultureInfo.InvariantCulture));
|
||||||
}
|
}
|
||||||
|
|
||||||
Mapping.AddPrimaryImage(result, album.CoverUri ?? album.OgImage, 1200);
|
Mapping.AddPrimaryImage(result, album.CoverUri ?? album.OgImage, 1000);
|
||||||
result.HasMetadata = true;
|
result.HasMetadata = true;
|
||||||
result.QueriedById = Mapping.GetId(info.ProviderIds, YandexProviderIds.Album) is not null;
|
result.QueriedById = Mapping.GetId(info.ProviderIds, YandexProviderIds.Album) is not null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,10 +80,10 @@ public class YandexMusicArtistProvider : IRemoteMetadataProvider<MusicArtist, Ar
|
|||||||
|
|
||||||
if (covers.Count > 0)
|
if (covers.Count > 0)
|
||||||
{
|
{
|
||||||
Mapping.AddPrimaryImage(result, covers[0], 1200);
|
Mapping.AddPrimaryImage(result, covers[0], 1000);
|
||||||
foreach (var cover in covers.Skip(1).Take(4))
|
foreach (var cover in covers.Skip(1).Take(4))
|
||||||
{
|
{
|
||||||
Mapping.AddImage(result, cover, ImageType.Backdrop, 1920);
|
Mapping.AddImage(result, cover, ImageType.Backdrop, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ public class YandexMusicImageProvider : IRemoteImageProvider, IHasOrder
|
|||||||
var byId = await _client.GetAlbumAsync(albumId.Value, cancellationToken).ConfigureAwait(false);
|
var byId = await _client.GetAlbumAsync(albumId.Value, cancellationToken).ConfigureAwait(false);
|
||||||
if (byId is not null)
|
if (byId is not null)
|
||||||
{
|
{
|
||||||
return Collect(byId.CoverUri, ImageType.Primary, 1200);
|
return Collect(byId.CoverUri, ImageType.Primary, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ public class YandexMusicImageProvider : IRemoteImageProvider, IHasOrder
|
|||||||
config.MatchThreshold);
|
config.MatchThreshold);
|
||||||
return match is null
|
return match is null
|
||||||
? []
|
? []
|
||||||
: Collect(match.Value.Album.CoverUri, ImageType.Primary, 1200);
|
: Collect(match.Value.Album.CoverUri, ImageType.Primary, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<List<(string Url, ImageType Type, int Size)>> GetArtistCoversAsync(
|
private async Task<List<(string Url, ImageType Type, int Size)>> GetArtistCoversAsync(
|
||||||
@@ -198,13 +198,13 @@ public class YandexMusicImageProvider : IRemoteImageProvider, IHasOrder
|
|||||||
var primaryAdded = false;
|
var primaryAdded = false;
|
||||||
foreach (var uri in uris.Where(u => !string.IsNullOrWhiteSpace(u)).Distinct(StringComparer.Ordinal))
|
foreach (var uri in uris.Where(u => !string.IsNullOrWhiteSpace(u)).Distinct(StringComparer.Ordinal))
|
||||||
{
|
{
|
||||||
var url = YandexMusicClient.BuildCoverUrl(uri, primaryAdded ? 1920 : 1200);
|
var url = YandexMusicClient.BuildCoverUrl(uri, primaryAdded ? 1000 : 1000);
|
||||||
if (url is null)
|
if (url is null)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
covers.Add((url, primaryAdded ? ImageType.Backdrop : ImageType.Primary, primaryAdded ? 1920 : 1200));
|
covers.Add((url, primaryAdded ? ImageType.Backdrop : ImageType.Primary, primaryAdded ? 1000 : 1000));
|
||||||
primaryAdded = true;
|
primaryAdded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
name: "Yandex Music"
|
name: "Yandex Music"
|
||||||
guid: "f3b9626b-da14-4cbf-8ad1-33b92cfa6656"
|
guid: "f3b9626b-da14-4cbf-8ad1-33b92cfa6656"
|
||||||
version: "1.0.0.12"
|
version: "1.0.0.13"
|
||||||
targetAbi: "12.4.0.0"
|
targetAbi: "12.4.0.0"
|
||||||
framework: "net10.0"
|
framework: "net10.0"
|
||||||
overview: "Metadata for music from Yandex Music."
|
overview: "Metadata for music from Yandex Music."
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
Vendored
+5
-5
@@ -9,12 +9,12 @@
|
|||||||
"imageUrl": "",
|
"imageUrl": "",
|
||||||
"versions": [
|
"versions": [
|
||||||
{
|
{
|
||||||
"version": "1.0.0.12",
|
"version": "1.0.0.13",
|
||||||
"changelog": "Add genre normalization and an organize-into-albums task using hard links.",
|
"changelog": "Use Yandex-supported 1000x1000 cover size so artist and album images save.",
|
||||||
"targetAbi": "12.4.0.0",
|
"targetAbi": "12.4.0.0",
|
||||||
"sourceUrl": "https://git.midns.ru/1xDed/jellyfin-plugin-yandexmusic/raw/branch/main/dist/Jellyfin.Plugin.YandexMusic_1.0.0.12.zip",
|
"sourceUrl": "https://git.midns.ru/1xDed/jellyfin-plugin-yandexmusic/raw/branch/main/dist/Jellyfin.Plugin.YandexMusic_1.0.0.13.zip",
|
||||||
"checksum": "623c057061dec58cc175978180f57636",
|
"checksum": "5708bd25240fc497789418e28b541c98",
|
||||||
"timestamp": "2026-12-01T00:12:27Z"
|
"timestamp": "2026-12-02T17:58:36Z"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ set -euo pipefail
|
|||||||
|
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
VERSION="1.0.0.12"
|
VERSION="1.0.0.13"
|
||||||
NAME="Jellyfin.Plugin.YandexMusic"
|
NAME="Jellyfin.Plugin.YandexMusic"
|
||||||
PUBLISH_DIR="publish"
|
PUBLISH_DIR="publish"
|
||||||
ARTIFACTS_DIR="${ARTIFACTS_DIR:-artifacts}"
|
ARTIFACTS_DIR="${ARTIFACTS_DIR:-artifacts}"
|
||||||
|
|||||||
Reference in new issue
Block a user