mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 12:11:10 +00:00
Adds music page play affordances and shuffle playback
Adds play and shuffle actions to music library, artist, and album cards. Adds the library play context and the uniform shuffle endpoint. Expands the player bar with queue covers, now playing details, and release type. Updates the bundled themes, API documentation, and the user manual.
This commit is contained in:
1 parent
93821a2776
commit
067e9a21d0
132 files changed
+2935
-715
No files matched your search
+11
@@ -14,6 +14,7 @@ using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading;
|
||||
@@ -88,6 +89,13 @@ public class EditMusicAlbumViewEndpoint : BaseEndpoint<GetMusicAlbumViewRequest,
|
||||
request = request with { AlbumId = Guid.TryParse(request.AlbumId, out Guid albumId) ? albumId.ToString() : Guid.Empty.ToString() };
|
||||
MusicAlbumDto album = await _apiHttpClient.GetAsync<MusicAlbumDto>(ApiRoutes.Music.GET_ALBUM.Replace("{libraryId}", request.LibraryId.ToString()).Replace("{artistId}", request.ArtistId).Replace("{albumId}", request.AlbumId), cancellationToken).ConfigureAwait(false);
|
||||
string title = album.Metadata?.Title ?? string.Empty;
|
||||
// The play album trigger presents the album, so it carries the same cover this page displays: the stored cover, or the first stored artwork when the album has no cover.
|
||||
string albumCoverPath = album.CoverPath ?? string.Empty;
|
||||
if (string.IsNullOrWhiteSpace(albumCoverPath))
|
||||
albumCoverPath = (album.Artwork ?? []).FirstOrDefault(artwork => !string.IsNullOrWhiteSpace(artwork.Path))?.Path ?? string.Empty;
|
||||
// A release the API already reported as empty has nothing to play, so the themed play trigger starts disabled. The
|
||||
// release list the page loads later only refines this state, and a failed request never changes it.
|
||||
bool albumHasTracks = (album.Tracks?.Count ?? 0) > 0;
|
||||
|
||||
// The themed view is a regular page that submits its own requests, so a fresh anti-forgery token must be issued for it.
|
||||
AntiforgeryTokenSet antiforgeryTokens = _antiforgery.GetAndStoreTokens(HttpContext);
|
||||
@@ -109,6 +117,9 @@ public class EditMusicAlbumViewEndpoint : BaseEndpoint<GetMusicAlbumViewRequest,
|
||||
["trackUrl"] = _urlService.GetAbsoluteUrl(WebRoutes.Music.TRACK, new { artistId = default(Guid), albumId = default(Guid), trackId = default(Guid) }) ?? string.Empty,
|
||||
["coverUrl"] = _urlService.GetAbsoluteUrl(WebRoutes.Music.UPDATE_ALBUM_COVER, new { artistId = default(Guid), albumId = default(Guid) }) ?? string.Empty,
|
||||
["backUrl"] = (_urlService.GetAbsoluteUrl(WebRoutes.Music.ARTIST, new { artistId = album.ArtistId }) ?? string.Empty) + "?libraryId=" + album.LibraryId,
|
||||
["albumTitle"] = title,
|
||||
["albumCoverPath"] = albumCoverPath,
|
||||
["albumHasTracks"] = albumHasTracks,
|
||||
["albumJson"] = JsonSerializer.Serialize(album, s_camelCaseJsonOptions),
|
||||
["strings"] = ThemePageDataFactory.CreateLocalizedStrings(_localizer),
|
||||
["stringsJson"] = JsonSerializer.Serialize(ThemePageDataFactory.CreateLocalizedStrings(_localizer), s_camelCaseJsonOptions)
|
||||
|
||||
+6
@@ -87,6 +87,9 @@ public class EditMusicArtistViewEndpoint : BaseEndpoint<GetMusicArtistViewReques
|
||||
request = request with { ArtistId = Guid.TryParse(request.ArtistId, out Guid artistId) ? artistId.ToString() : Guid.Empty.ToString() };
|
||||
MusicArtistDto artist = await _apiHttpClient.GetAsync<MusicArtistDto>(ApiRoutes.Music.GET_ARTIST.Replace("{libraryId}", request.LibraryId.ToString()).Replace("{artistId}", request.ArtistId), cancellationToken).ConfigureAwait(false);
|
||||
string title = artist.Metadata?.Name ?? string.Empty;
|
||||
// An artist the API already reported without releases has nothing to play, so the themed play trigger starts disabled.
|
||||
// The release list the page loads later only refines this state, and a failed request never changes it.
|
||||
bool artistHasReleases = (artist.Albums?.Count ?? 0) > 0;
|
||||
|
||||
// The themed view is a regular page that submits its own requests, so a fresh anti-forgery token must be issued for it.
|
||||
AntiforgeryTokenSet antiforgeryTokens = _antiforgery.GetAndStoreTokens(HttpContext);
|
||||
@@ -108,6 +111,9 @@ public class EditMusicArtistViewEndpoint : BaseEndpoint<GetMusicArtistViewReques
|
||||
["deleteAlbumUrl"] = _urlService.GetAbsoluteUrl(WebRoutes.Music.DELETE_ALBUM, new { artistId = default(Guid), albumId = default(Guid) }) ?? string.Empty,
|
||||
["coverUrl"] = _urlService.GetAbsoluteUrl(WebRoutes.Music.UPDATE_ARTIST_COVER, new { artistId = default(Guid) }) ?? string.Empty,
|
||||
["backUrl"] = (_urlService.GetAbsoluteUrl(WebRoutes.Music.ARTISTS_INDEX) ?? string.Empty) + "?libraryId=" + artist.LibraryId,
|
||||
["artistName"] = title,
|
||||
["artistCoverPath"] = artist.CoverPath ?? string.Empty,
|
||||
["artistHasReleases"] = artistHasReleases,
|
||||
["artistJson"] = JsonSerializer.Serialize(artist, s_camelCaseJsonOptions),
|
||||
["strings"] = ThemePageDataFactory.CreateLocalizedStrings(_localizer),
|
||||
["stringsJson"] = JsonSerializer.Serialize(ThemePageDataFactory.CreateLocalizedStrings(_localizer), s_camelCaseJsonOptions)
|
||||
|
||||
+14
-2
@@ -14,6 +14,7 @@ using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading;
|
||||
@@ -95,6 +96,12 @@ public class EditMusicTrackViewEndpoint : BaseEndpoint<GetMusicTrackViewRequest,
|
||||
// The cover shown on the left of the track page is the cover of the album that holds the track, so the album is fetched alongside the track.
|
||||
MusicAlbumDto album = await _apiHttpClient.GetAsync<MusicAlbumDto>(
|
||||
ApiRoutes.Music.GET_ALBUM.Replace("{libraryId}", request.LibraryId.ToString()).Replace("{artistId}", normalizedArtistId).Replace("{albumId}", normalizedAlbumId), cancellationToken).ConfigureAwait(false);
|
||||
// The track page and its play trigger show the same cover the album page shows: the stored cover, or the first stored
|
||||
// artwork when the album has no cover. It is resolved once and used for both the themed page data and the fallback view.
|
||||
string albumCoverPath = album.CoverPath ?? string.Empty;
|
||||
if (string.IsNullOrWhiteSpace(albumCoverPath))
|
||||
albumCoverPath = (album.Artwork ?? []).FirstOrDefault(artwork => !string.IsNullOrWhiteSpace(artwork.Path))?.Path ?? string.Empty;
|
||||
string albumTitle = album.Metadata?.Title ?? string.Empty;
|
||||
|
||||
// The themed view is a regular page that submits its own requests, so a fresh anti-forgery token must be issued for it.
|
||||
AntiforgeryTokenSet antiforgeryTokens = _antiforgery.GetAndStoreTokens(HttpContext);
|
||||
@@ -114,7 +121,10 @@ public class EditMusicTrackViewEndpoint : BaseEndpoint<GetMusicTrackViewRequest,
|
||||
["saveUrl"] = _urlService.GetAbsoluteUrl(WebRoutes.Music.SAVE_TRACK, new { artistId = default(Guid), albumId = default(Guid), trackId = default(Guid) }) ?? string.Empty,
|
||||
["deleteUrl"] = _urlService.GetAbsoluteUrl(WebRoutes.Music.DELETE_TRACK, new { artistId = default(Guid), albumId = default(Guid), trackId = default(Guid) }) ?? string.Empty,
|
||||
["backUrl"] = (_urlService.GetAbsoluteUrl(WebRoutes.Music.ALBUM, new { artistId = normalizedArtistId, albumId = track.AlbumId }) ?? string.Empty) + "?libraryId=" + track.LibraryId,
|
||||
["albumCoverPath"] = album.CoverPath ?? string.Empty,
|
||||
["albumCoverPath"] = albumCoverPath,
|
||||
["albumTitle"] = albumTitle,
|
||||
["trackTitle"] = title,
|
||||
["trackDurationInSeconds"] = track.Metadata?.DurationInSeconds,
|
||||
["trackJson"] = JsonSerializer.Serialize(track, s_camelCaseJsonOptions),
|
||||
["strings"] = ThemePageDataFactory.CreateLocalizedStrings(_localizer),
|
||||
["stringsJson"] = JsonSerializer.Serialize(ThemePageDataFactory.CreateLocalizedStrings(_localizer), s_camelCaseJsonOptions)
|
||||
@@ -127,7 +137,9 @@ public class EditMusicTrackViewEndpoint : BaseEndpoint<GetMusicTrackViewRequest,
|
||||
Dictionary<string, object?> viewData = new()
|
||||
{
|
||||
["Title"] = title,
|
||||
["AlbumCoverPath"] = album.CoverPath ?? string.Empty
|
||||
["ArtistId"] = normalizedArtistId,
|
||||
["AlbumCoverPath"] = albumCoverPath,
|
||||
["AlbumTitle"] = albumTitle
|
||||
};
|
||||
return View("/Core/Views/Library/AudioLibrary/MusicLibrary/Tracks/Item.cshtml", track, viewData);
|
||||
}
|
||||
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using FastEndpoints;
|
||||
using Lumina.Presentation.Web.Common.Api;
|
||||
using Lumina.Presentation.Web.Common.DTO.AudioLibrary.MusicLibrary;
|
||||
using Lumina.Presentation.Web.Common.Requests.Library.AudioLibrary.MusicLibrary.Tracks;
|
||||
using Lumina.Presentation.Web.Common.Routes;
|
||||
using Lumina.Presentation.Web.Core.Endpoints.Common;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Core.Endpoints.Library.AudioLibrary.MusicLibrary.Tracks.ShuffleTracks;
|
||||
|
||||
/// <summary>
|
||||
/// API endpoint for the <c>/{culture}/library/audio-library/music-library/tracks/api-shuffle-tracks</c> route.
|
||||
/// </summary>
|
||||
public class ShuffleTracksEndpoint : BaseEndpoint<ShuffleTracksRequest, IResult>
|
||||
{
|
||||
private readonly IApiHttpClient _apiHttpClient;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ShuffleTracksEndpoint"/> class.
|
||||
/// </summary>
|
||||
/// <param name="apiHttpClient">Injected service for interactions with the API.</param>
|
||||
public ShuffleTracksEndpoint(IApiHttpClient apiHttpClient)
|
||||
{
|
||||
_apiHttpClient = apiHttpClient;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Configures the endpoint.
|
||||
/// </summary>
|
||||
public override void Configure()
|
||||
{
|
||||
base.Configure();
|
||||
Verbs(Http.POST);
|
||||
Routes(WebRoutes.Music.SHUFFLE_TRACKS);
|
||||
DontAutoTag();
|
||||
Options(options => options.WithTags("Music"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves a random selection of tracks of the library identified in the request.
|
||||
/// </summary>
|
||||
/// <param name="request">The request containing the selection size, the optional scope and the tracks to exclude.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
public override async Task<IResult> ExecuteAsync(ShuffleTracksRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
List<MusicShuffleTrackDto> response = await _apiHttpClient.PostAsync<List<MusicShuffleTrackDto>, ShuffleTracksRequest>(
|
||||
BuildEndpoint(request.LibraryId), request, cancellationToken).ConfigureAwait(false);
|
||||
return JsonSuccess(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Builds the API endpoint used to retrieve a random selection of tracks.
|
||||
/// </summary>
|
||||
/// <param name="libraryId">The Id of the media library the tracks are sampled from.</param>
|
||||
/// <returns>The API endpoint to which the retrieval request is sent.</returns>
|
||||
private static string BuildEndpoint(Guid libraryId)
|
||||
{
|
||||
// The strongly typed Id is formatted as a Guid, so the substituted route value can never escape its URL segment.
|
||||
return ApiRoutes.Music.SHUFFLE_TRACKS.Replace("{libraryId}", libraryId.ToString());
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using FastEndpoints;
|
||||
using Lumina.Presentation.Web.Common.DTO.AudioLibrary.MusicLibrary;
|
||||
using Lumina.Presentation.Web.Common.Requests.Library.AudioLibrary.MusicLibrary.Tracks;
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Core.Endpoints.Library.AudioLibrary.MusicLibrary.Tracks.ShuffleTracks;
|
||||
|
||||
/// <summary>
|
||||
/// Class used for providing a textual description for the <see cref="ShuffleTracksEndpoint"/> endpoint, for OpenAPI.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class ShuffleTracksEndpointSummary : Summary<ShuffleTracksEndpoint, ShuffleTracksRequest>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ShuffleTracksEndpointSummary"/> class.
|
||||
/// </summary>
|
||||
public ShuffleTracksEndpointSummary()
|
||||
{
|
||||
Summary = "Draws a random selection of tracks from a media library, an artist or an album.";
|
||||
Description = "Returns uniformly random tracks from the whole library, one artist, or one album, excluding the tracks the caller already queued. The tracks are selected by the API database, so a large library does not have to be enumerated by the browser.";
|
||||
|
||||
Response(200, "The random selection of tracks is returned.", example: new[] { new MusicShuffleTrackDto
|
||||
{
|
||||
TrackId = Guid.NewGuid(),
|
||||
Title = "Bohemian Rhapsody",
|
||||
DurationInSeconds = 354,
|
||||
AlbumId = Guid.NewGuid(),
|
||||
AlbumTitle = "A Night at the Opera",
|
||||
ArtistId = Guid.NewGuid(),
|
||||
CoverPath = "/music/queen/a-night-at-the-opera/cover.jpg"
|
||||
}});
|
||||
}
|
||||
}
|
||||
+6
@@ -843,4 +843,10 @@
|
||||
<data name="StreamingQualityCannotBeNull" xml:space="preserve">
|
||||
<value>لا يمكن أن تكون جودة البث فارغة!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeGreaterThanZero" xml:space="preserve">
|
||||
<value>يجب أن يكون عدد المقطوعات العشوائية أكبر من صفر!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeAtMost500" xml:space="preserve">
|
||||
<value>يجب ألا يتجاوز عدد المقطوعات العشوائية 500!</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -843,4 +843,10 @@
|
||||
<data name="StreamingQualityCannotBeNull" xml:space="preserve">
|
||||
<value>Die Streaming-Qualität darf nicht null sein!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeGreaterThanZero" xml:space="preserve">
|
||||
<value>Die Anzahl der Shuffle-Titel muss größer als null sein!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeAtMost500" xml:space="preserve">
|
||||
<value>Die Anzahl der Shuffle-Titel darf höchstens 500 betragen!</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -843,4 +843,10 @@
|
||||
<data name="StreamingQualityCannotBeNull" xml:space="preserve">
|
||||
<value>The streaming quality cannot be null!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeGreaterThanZero" xml:space="preserve">
|
||||
<value>The shuffle track count must be greater than zero!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeAtMost500" xml:space="preserve">
|
||||
<value>The shuffle track count must be at most 500!</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -843,4 +843,10 @@
|
||||
<data name="StreamingQualityCannotBeNull" xml:space="preserve">
|
||||
<value>¡La calidad de transmisión no puede ser nula!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeGreaterThanZero" xml:space="preserve">
|
||||
<value>¡La cantidad de pistas de reproducción aleatoria debe ser mayor que cero!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeAtMost500" xml:space="preserve">
|
||||
<value>¡La cantidad de pistas de reproducción aleatoria no debe superar 500!</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -843,4 +843,10 @@
|
||||
<data name="StreamingQualityCannotBeNull" xml:space="preserve">
|
||||
<value>La qualité de diffusion ne peut pas être nulle !</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeGreaterThanZero" xml:space="preserve">
|
||||
<value>Le nombre de pistes du shuffle doit être supérieur à zéro !</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeAtMost500" xml:space="preserve">
|
||||
<value>Le nombre de pistes du shuffle ne doit pas dépasser 500 !</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -843,4 +843,10 @@
|
||||
<data name="StreamingQualityCannotBeNull" xml:space="preserve">
|
||||
<value>La qualità dello streaming non può essere nulla!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeGreaterThanZero" xml:space="preserve">
|
||||
<value>Il numero di brani dello shuffle deve essere maggiore di zero!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeAtMost500" xml:space="preserve">
|
||||
<value>Il numero di brani dello shuffle non può superare 500!</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -843,4 +843,10 @@
|
||||
<data name="StreamingQualityCannotBeNull" xml:space="preserve">
|
||||
<value>ストリーミング品質は null にできません。</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeGreaterThanZero" xml:space="preserve">
|
||||
<value>シャッフルするトラック数は 0 より大きい必要があります。</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeAtMost500" xml:space="preserve">
|
||||
<value>シャッフルするトラック数は 500 以下である必要があります。</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -843,4 +843,10 @@
|
||||
<data name="StreamingQualityCannotBeNull" xml:space="preserve">
|
||||
<value>The streaming quality cannot be null!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeGreaterThanZero" xml:space="preserve">
|
||||
<value>The shuffle track count must be greater than zero!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeAtMost500" xml:space="preserve">
|
||||
<value>The shuffle track count must be at most 500!</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -843,4 +843,10 @@
|
||||
<data name="StreamingQualityCannotBeNull" xml:space="preserve">
|
||||
<value>Calitatea fluxului nu poate fi nulă!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeGreaterThanZero" xml:space="preserve">
|
||||
<value>Numărul de piste pentru redare aleatorie trebuie să fie mai mare decât zero!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeAtMost500" xml:space="preserve">
|
||||
<value>Numărul de piste pentru redare aleatorie nu poate depăși 500!</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -843,4 +843,10 @@
|
||||
<data name="StreamingQualityCannotBeNull" xml:space="preserve">
|
||||
<value>Якість потокового передавання не може бути порожньою!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeGreaterThanZero" xml:space="preserve">
|
||||
<value>Кількість треків для перемішування має бути більшою за нуль!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeAtMost500" xml:space="preserve">
|
||||
<value>Кількість треків для перемішування не може перевищувати 500!</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -843,4 +843,10 @@
|
||||
<data name="StreamingQualityCannotBeNull" xml:space="preserve">
|
||||
<value>流媒体质量不能为空!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeGreaterThanZero" xml:space="preserve">
|
||||
<value>随机播放曲目数必须大于零!</value>
|
||||
</data>
|
||||
<data name="ShuffleTrackCountMustBeAtMost500" xml:space="preserve">
|
||||
<value>随机播放曲目数不能超过 500!</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -120,4 +120,13 @@
|
||||
<data name="NoLibraries" xml:space="preserve">
|
||||
<value>لا توجد مكتبات</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>تشغيل عشوائي</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>تشغيل</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>الإجراءات</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -120,4 +120,13 @@
|
||||
<data name="NoLibraries" xml:space="preserve">
|
||||
<value>Keine Bibliotheken</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Zufällige Wiedergabe</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Abspielen</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>Aktionen</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -120,4 +120,13 @@
|
||||
<data name="NoLibraries" xml:space="preserve">
|
||||
<value>No libraries</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Shuffle</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Play</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>Actions</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -120,4 +120,13 @@
|
||||
<data name="NoLibraries" xml:space="preserve">
|
||||
<value>Sin bibliotecas</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Aleatorio</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Reproducir</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>Acciones</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -120,4 +120,13 @@
|
||||
<data name="NoLibraries" xml:space="preserve">
|
||||
<value>Aucune bibliothèque</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Lecture aléatoire</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Lecture</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>Actions</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -120,4 +120,13 @@
|
||||
<data name="NoLibraries" xml:space="preserve">
|
||||
<value>Nessuna libreria</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Riproduzione casuale</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Riproduci</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>Azioni</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -120,4 +120,13 @@
|
||||
<data name="NoLibraries" xml:space="preserve">
|
||||
<value>ライブラリがありません</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>シャッフル</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>再生</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>æ“作</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -120,4 +120,13 @@
|
||||
<data name="NoLibraries" xml:space="preserve">
|
||||
<value>No libraries</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Shuffle</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Play</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>Actions</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -120,4 +120,13 @@
|
||||
<data name="NoLibraries" xml:space="preserve">
|
||||
<value>Nicio bibliotecă</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Aleatoriu</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Redare</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>Acțiuni</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -120,4 +120,13 @@
|
||||
<data name="NoLibraries" xml:space="preserve">
|
||||
<value>Немає бібліотек</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Перемішати</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Відтворити</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>Дії</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -120,4 +120,13 @@
|
||||
<data name="NoLibraries" xml:space="preserve">
|
||||
<value>无库</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>随机播放</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>播放</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>æ“作</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -1506,4 +1506,10 @@
|
||||
<data name="Identifiers" xml:space="preserve">
|
||||
<value>المعرّفات</value>
|
||||
</data>
|
||||
<data name="PlayAlbum" xml:space="preserve">
|
||||
<value>تشغيل الألبوم</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>تشغيل المقطع</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -1506,4 +1506,10 @@
|
||||
<data name="Identifiers" xml:space="preserve">
|
||||
<value>Kennungen</value>
|
||||
</data>
|
||||
<data name="PlayAlbum" xml:space="preserve">
|
||||
<value>Album abspielen</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>Titel abspielen</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -1506,4 +1506,10 @@
|
||||
<data name="Identifiers" xml:space="preserve">
|
||||
<value>Identifiers</value>
|
||||
</data>
|
||||
<data name="PlayAlbum" xml:space="preserve">
|
||||
<value>Play album</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>Play track</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -1506,4 +1506,10 @@
|
||||
<data name="Identifiers" xml:space="preserve">
|
||||
<value>Identificadores</value>
|
||||
</data>
|
||||
<data name="PlayAlbum" xml:space="preserve">
|
||||
<value>Reproducir el álbum</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>Reproducir la pista</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -1506,4 +1506,10 @@
|
||||
<data name="Identifiers" xml:space="preserve">
|
||||
<value>Identifiants</value>
|
||||
</data>
|
||||
<data name="PlayAlbum" xml:space="preserve">
|
||||
<value>Lire l'album</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>Lire la piste</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -1506,4 +1506,10 @@
|
||||
<data name="Identifiers" xml:space="preserve">
|
||||
<value>Identificatori</value>
|
||||
</data>
|
||||
<data name="PlayAlbum" xml:space="preserve">
|
||||
<value>Riproduci l'album</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>Riproduci il brano</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -1506,4 +1506,10 @@
|
||||
<data name="Identifiers" xml:space="preserve">
|
||||
<value>識別子</value>
|
||||
</data>
|
||||
<data name="PlayAlbum" xml:space="preserve">
|
||||
<value>アルバムを再生</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>トラックを再生</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -1506,4 +1506,10 @@
|
||||
<data name="Identifiers" xml:space="preserve">
|
||||
<value>Identifiers</value>
|
||||
</data>
|
||||
<data name="PlayAlbum" xml:space="preserve">
|
||||
<value>Play album</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>Play track</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -1506,4 +1506,10 @@
|
||||
<data name="Identifiers" xml:space="preserve">
|
||||
<value>Identificatori</value>
|
||||
</data>
|
||||
<data name="PlayAlbum" xml:space="preserve">
|
||||
<value>Redă albumul</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>Redă piesa</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -1506,4 +1506,10 @@
|
||||
<data name="Identifiers" xml:space="preserve">
|
||||
<value>Ідентифікатори</value>
|
||||
</data>
|
||||
<data name="PlayAlbum" xml:space="preserve">
|
||||
<value>Відтворити альбом</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>Відтворити трек</value>
|
||||
</data>
|
||||
</root>
|
||||
+6
@@ -1506,4 +1506,10 @@
|
||||
<data name="Identifiers" xml:space="preserve">
|
||||
<value>标识符</value>
|
||||
</data>
|
||||
<data name="PlayAlbum" xml:space="preserve">
|
||||
<value>播放专辑</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>播放曲目</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -57,4 +57,13 @@
|
||||
<data name="DeleteFailed" xml:space="preserve">
|
||||
<value>تعذر حذف العنصر.</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>تشغيل عشوائي</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>تشغيل</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>الإجراءات</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -57,4 +57,13 @@
|
||||
<data name="DeleteFailed" xml:space="preserve">
|
||||
<value>Das Element konnte nicht gelöscht werden.</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Zufällige Wiedergabe</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Abspielen</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>Aktionen</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -57,4 +57,13 @@
|
||||
<data name="DeleteFailed" xml:space="preserve">
|
||||
<value>The item could not be deleted.</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Shuffle</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Play</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>Actions</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -57,4 +57,13 @@
|
||||
<data name="DeleteFailed" xml:space="preserve">
|
||||
<value>No se ha podido eliminar el elemento.</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Aleatorio</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Reproducir</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>Acciones</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -57,4 +57,13 @@
|
||||
<data name="DeleteFailed" xml:space="preserve">
|
||||
<value>L'élément n'a pas pu être supprimé.</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Lecture aléatoire</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Lecture</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>Actions</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -57,4 +57,13 @@
|
||||
<data name="DeleteFailed" xml:space="preserve">
|
||||
<value>Non è stato possibile eliminare l'elemento.</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Riproduzione casuale</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Riproduci</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>Azioni</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -57,4 +57,13 @@
|
||||
<data name="DeleteFailed" xml:space="preserve">
|
||||
<value>項目を削除できませんでした。</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>シャッフル</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>再生</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>æ“作</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -57,4 +57,13 @@
|
||||
<data name="DeleteFailed" xml:space="preserve">
|
||||
<value>The item could not be deleted.</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Shuffle</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Play</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>Actions</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -57,4 +57,13 @@
|
||||
<data name="DeleteFailed" xml:space="preserve">
|
||||
<value>Elementul nu a putut fi șters.</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Aleatoriu</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Redare</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>Acțiuni</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -57,4 +57,13 @@
|
||||
<data name="DeleteFailed" xml:space="preserve">
|
||||
<value>Не вдалося видалити елемент.</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Перемішати</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Відтворити</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>Дії</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -57,4 +57,13 @@
|
||||
<data name="DeleteFailed" xml:space="preserve">
|
||||
<value>无法删除该项目。</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>随机播放</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>播放</value>
|
||||
</data>
|
||||
<data name="Actions" xml:space="preserve">
|
||||
<value>æ“作</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -1083,4 +1083,13 @@
|
||||
<data name="AddIsni" xml:space="preserve">
|
||||
<value>إضافة ISNI</value>
|
||||
</data>
|
||||
<data name="PlayAll" xml:space="preserve">
|
||||
<value>تشغيل الكل</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>تشغيل</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>تشغيل عشوائي</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -1083,4 +1083,13 @@
|
||||
<data name="AddIsni" xml:space="preserve">
|
||||
<value>ISNI hinzufügen</value>
|
||||
</data>
|
||||
<data name="PlayAll" xml:space="preserve">
|
||||
<value>Alle abspielen</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Abspielen</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Zufällige Wiedergabe</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -1083,4 +1083,13 @@
|
||||
<data name="AddIsni" xml:space="preserve">
|
||||
<value>Add ISNI</value>
|
||||
</data>
|
||||
<data name="PlayAll" xml:space="preserve">
|
||||
<value>Play all</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Play</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Shuffle</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -1083,4 +1083,13 @@
|
||||
<data name="AddIsni" xml:space="preserve">
|
||||
<value>Añadir ISNI</value>
|
||||
</data>
|
||||
<data name="PlayAll" xml:space="preserve">
|
||||
<value>Reproducir todo</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Reproducir</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Aleatorio</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -1083,4 +1083,13 @@
|
||||
<data name="AddIsni" xml:space="preserve">
|
||||
<value>Ajouter un ISNI</value>
|
||||
</data>
|
||||
<data name="PlayAll" xml:space="preserve">
|
||||
<value>Tout lire</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Lire</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Lecture aléatoire</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -1083,4 +1083,13 @@
|
||||
<data name="AddIsni" xml:space="preserve">
|
||||
<value>Aggiungi ISNI</value>
|
||||
</data>
|
||||
<data name="PlayAll" xml:space="preserve">
|
||||
<value>Riproduci tutto</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Riproduci</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Riproduzione casuale</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -1083,4 +1083,13 @@
|
||||
<data name="AddIsni" xml:space="preserve">
|
||||
<value>ISNI を追加</value>
|
||||
</data>
|
||||
<data name="PlayAll" xml:space="preserve">
|
||||
<value>すべて再生</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>再生</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>シャッフル</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -1083,4 +1083,13 @@
|
||||
<data name="AddIsni" xml:space="preserve">
|
||||
<value>Add ISNI</value>
|
||||
</data>
|
||||
<data name="PlayAll" xml:space="preserve">
|
||||
<value>Play all</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Play</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Shuffle</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -1083,4 +1083,13 @@
|
||||
<data name="AddIsni" xml:space="preserve">
|
||||
<value>Adaugă ISNI</value>
|
||||
</data>
|
||||
<data name="PlayAll" xml:space="preserve">
|
||||
<value>Redă tot</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Redă</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Aleatoriu</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -1083,4 +1083,13 @@
|
||||
<data name="AddIsni" xml:space="preserve">
|
||||
<value>Додати ISNI</value>
|
||||
</data>
|
||||
<data name="PlayAll" xml:space="preserve">
|
||||
<value>Відтворити все</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>Відтворити</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>Перемішати</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -1083,4 +1083,13 @@
|
||||
<data name="AddIsni" xml:space="preserve">
|
||||
<value>添加 ISNI</value>
|
||||
</data>
|
||||
<data name="PlayAll" xml:space="preserve">
|
||||
<value>全部播放</value>
|
||||
</data>
|
||||
<data name="Play" xml:space="preserve">
|
||||
<value>播放</value>
|
||||
</data>
|
||||
<data name="Shuffle" xml:space="preserve">
|
||||
<value>随机播放</value>
|
||||
</data>
|
||||
</root>
|
||||
+3
@@ -1179,4 +1179,7 @@
|
||||
<data name="AddWorkIswc" xml:space="preserve">
|
||||
<value>إضافة ISWC</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>تشغيل المقطع</value>
|
||||
</data>
|
||||
</root>
|
||||
+3
@@ -1179,4 +1179,7 @@
|
||||
<data name="AddWorkIswc" xml:space="preserve">
|
||||
<value>ISWC hinzufügen</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>Titel abspielen</value>
|
||||
</data>
|
||||
</root>
|
||||
+3
@@ -1179,4 +1179,7 @@
|
||||
<data name="AddWorkIswc" xml:space="preserve">
|
||||
<value>Add ISWC</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>Play track</value>
|
||||
</data>
|
||||
</root>
|
||||
+3
@@ -1179,4 +1179,7 @@
|
||||
<data name="AddWorkIswc" xml:space="preserve">
|
||||
<value>Añadir ISWC</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>Reproducir la pista</value>
|
||||
</data>
|
||||
</root>
|
||||
+3
@@ -1179,4 +1179,7 @@
|
||||
<data name="AddWorkIswc" xml:space="preserve">
|
||||
<value>Ajouter un ISWC</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>Lire la piste</value>
|
||||
</data>
|
||||
</root>
|
||||
+3
@@ -1179,4 +1179,7 @@
|
||||
<data name="AddWorkIswc" xml:space="preserve">
|
||||
<value>Aggiungi ISWC</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>Riproduci il brano</value>
|
||||
</data>
|
||||
</root>
|
||||
+3
@@ -1179,4 +1179,7 @@
|
||||
<data name="AddWorkIswc" xml:space="preserve">
|
||||
<value>ISWC を追加</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>トラックを再生</value>
|
||||
</data>
|
||||
</root>
|
||||
+3
@@ -1179,4 +1179,7 @@
|
||||
<data name="AddWorkIswc" xml:space="preserve">
|
||||
<value>Add ISWC</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>Play track</value>
|
||||
</data>
|
||||
</root>
|
||||
+3
@@ -1179,4 +1179,7 @@
|
||||
<data name="AddWorkIswc" xml:space="preserve">
|
||||
<value>Adaugă ISWC</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>Redă piesa</value>
|
||||
</data>
|
||||
</root>
|
||||
+3
@@ -1179,4 +1179,7 @@
|
||||
<data name="AddWorkIswc" xml:space="preserve">
|
||||
<value>Додати ISWC</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>Відтворити трек</value>
|
||||
</data>
|
||||
</root>
|
||||
+3
@@ -1179,4 +1179,7 @@
|
||||
<data name="AddWorkIswc" xml:space="preserve">
|
||||
<value>添加 ISWC</value>
|
||||
</data>
|
||||
<data name="PlayTrack" xml:space="preserve">
|
||||
<value>播放曲目</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -168,8 +168,8 @@
|
||||
<data name="Retry" xml:space="preserve">
|
||||
<value>إعادة المحاولة</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>تبديل الارتفاع الكامل</value>
|
||||
<data name="ToggleExpanded" xml:space="preserve">
|
||||
<value>توسيع المشغل أو طيه</value>
|
||||
</data>
|
||||
<data name="ToggleVisibility" xml:space="preserve">
|
||||
<value>تبديل الرؤية</value>
|
||||
@@ -216,4 +216,10 @@
|
||||
<data name="AudioPlayerShuffleOff" xml:space="preserve">
|
||||
<value>تشغيل عشوائي متوقف</value>
|
||||
</data>
|
||||
<data name="AudioPlayerStop" xml:space="preserve">
|
||||
<value>إيقاف</value>
|
||||
</data>
|
||||
<data name="AudioPlayerAlbumArtwork" xml:space="preserve">
|
||||
<value>أعمال فنية للألبوم</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -168,8 +168,8 @@
|
||||
<data name="Retry" xml:space="preserve">
|
||||
<value>Wiederholen</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>Vollhöhe Umschalten</value>
|
||||
<data name="ToggleExpanded" xml:space="preserve">
|
||||
<value>Player ein- oder ausklappen</value>
|
||||
</data>
|
||||
<data name="ToggleVisibility" xml:space="preserve">
|
||||
<value>Sichtbarkeit Umschalten</value>
|
||||
@@ -216,4 +216,10 @@
|
||||
<data name="AudioPlayerShuffleOff" xml:space="preserve">
|
||||
<value>Zufallswiedergabe aus</value>
|
||||
</data>
|
||||
<data name="AudioPlayerStop" xml:space="preserve">
|
||||
<value>Stopp</value>
|
||||
</data>
|
||||
<data name="AudioPlayerAlbumArtwork" xml:space="preserve">
|
||||
<value>Albumcover</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -168,8 +168,8 @@
|
||||
<data name="Retry" xml:space="preserve">
|
||||
<value>Retry</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>Toggle Full Height</value>
|
||||
<data name="ToggleExpanded" xml:space="preserve">
|
||||
<value>Expand or collapse player</value>
|
||||
</data>
|
||||
<data name="ToggleVisibility" xml:space="preserve">
|
||||
<value>Toggle Visibility</value>
|
||||
@@ -216,4 +216,10 @@
|
||||
<data name="AudioPlayerShuffleOff" xml:space="preserve">
|
||||
<value>Shuffle off</value>
|
||||
</data>
|
||||
<data name="AudioPlayerStop" xml:space="preserve">
|
||||
<value>Stop</value>
|
||||
</data>
|
||||
<data name="AudioPlayerAlbumArtwork" xml:space="preserve">
|
||||
<value>Album artwork</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -168,8 +168,8 @@
|
||||
<data name="Retry" xml:space="preserve">
|
||||
<value>Reintentar</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>Alternar Altura Completa</value>
|
||||
<data name="ToggleExpanded" xml:space="preserve">
|
||||
<value>Expandir o contraer el reproductor</value>
|
||||
</data>
|
||||
<data name="ToggleVisibility" xml:space="preserve">
|
||||
<value>Alternar Visibilidad</value>
|
||||
@@ -216,4 +216,10 @@
|
||||
<data name="AudioPlayerShuffleOff" xml:space="preserve">
|
||||
<value>Reproducción aleatoria desactivada</value>
|
||||
</data>
|
||||
<data name="AudioPlayerStop" xml:space="preserve">
|
||||
<value>Detener</value>
|
||||
</data>
|
||||
<data name="AudioPlayerAlbumArtwork" xml:space="preserve">
|
||||
<value>Ilustraciones del álbum</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -168,8 +168,8 @@
|
||||
<data name="Retry" xml:space="preserve">
|
||||
<value>Réessayer</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>Basculer Hauteur Complète</value>
|
||||
<data name="ToggleExpanded" xml:space="preserve">
|
||||
<value>Développer ou réduire le lecteur</value>
|
||||
</data>
|
||||
<data name="ToggleVisibility" xml:space="preserve">
|
||||
<value>Basculer Visibilité</value>
|
||||
@@ -216,4 +216,10 @@
|
||||
<data name="AudioPlayerShuffleOff" xml:space="preserve">
|
||||
<value>Lecture aléatoire désactivée</value>
|
||||
</data>
|
||||
<data name="AudioPlayerStop" xml:space="preserve">
|
||||
<value>Arrêter</value>
|
||||
</data>
|
||||
<data name="AudioPlayerAlbumArtwork" xml:space="preserve">
|
||||
<value>Illustrations de l'album</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -168,8 +168,8 @@
|
||||
<data name="Retry" xml:space="preserve">
|
||||
<value>Riprova</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>Attiva/Disattiva Altezza Piena</value>
|
||||
<data name="ToggleExpanded" xml:space="preserve">
|
||||
<value>Espandi o comprimi il lettore</value>
|
||||
</data>
|
||||
<data name="ToggleVisibility" xml:space="preserve">
|
||||
<value>Attiva/Disattiva Visibilità</value>
|
||||
@@ -216,4 +216,10 @@
|
||||
<data name="AudioPlayerShuffleOff" xml:space="preserve">
|
||||
<value>Riproduzione casuale disattivata</value>
|
||||
</data>
|
||||
<data name="AudioPlayerStop" xml:space="preserve">
|
||||
<value>Ferma</value>
|
||||
</data>
|
||||
<data name="AudioPlayerAlbumArtwork" xml:space="preserve">
|
||||
<value>Illustrazioni dell'album</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -168,8 +168,8 @@
|
||||
<data name="Retry" xml:space="preserve">
|
||||
<value>再試行</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>全高表示切替</value>
|
||||
<data name="ToggleExpanded" xml:space="preserve">
|
||||
<value>プレーヤーを展開または折りたたむ</value>
|
||||
</data>
|
||||
<data name="ToggleVisibility" xml:space="preserve">
|
||||
<value>表示切替</value>
|
||||
@@ -216,4 +216,10 @@
|
||||
<data name="AudioPlayerShuffleOff" xml:space="preserve">
|
||||
<value>シャッフルなし</value>
|
||||
</data>
|
||||
<data name="AudioPlayerStop" xml:space="preserve">
|
||||
<value>停止</value>
|
||||
</data>
|
||||
<data name="AudioPlayerAlbumArtwork" xml:space="preserve">
|
||||
<value>アルバムアートワーク</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -168,8 +168,8 @@
|
||||
<data name="Retry" xml:space="preserve">
|
||||
<value>Retry</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>Toggle Full Height</value>
|
||||
<data name="ToggleExpanded" xml:space="preserve">
|
||||
<value>Expand or collapse player</value>
|
||||
</data>
|
||||
<data name="ToggleVisibility" xml:space="preserve">
|
||||
<value>Toggle Visibility</value>
|
||||
@@ -216,4 +216,10 @@
|
||||
<data name="AudioPlayerShuffleOff" xml:space="preserve">
|
||||
<value>Shuffle off</value>
|
||||
</data>
|
||||
<data name="AudioPlayerStop" xml:space="preserve">
|
||||
<value>Stop</value>
|
||||
</data>
|
||||
<data name="AudioPlayerAlbumArtwork" xml:space="preserve">
|
||||
<value>Album artwork</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -168,8 +168,8 @@
|
||||
<data name="Retry" xml:space="preserve">
|
||||
<value>Reîncercare</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>Comutare Înălțime Completă</value>
|
||||
<data name="ToggleExpanded" xml:space="preserve">
|
||||
<value>Extinde sau restrânge playerul</value>
|
||||
</data>
|
||||
<data name="ToggleVisibility" xml:space="preserve">
|
||||
<value>Comutare Vizibilitate</value>
|
||||
@@ -216,4 +216,10 @@
|
||||
<data name="AudioPlayerShuffleOff" xml:space="preserve">
|
||||
<value>Redare aleatorie oprită</value>
|
||||
</data>
|
||||
<data name="AudioPlayerStop" xml:space="preserve">
|
||||
<value>Oprește</value>
|
||||
</data>
|
||||
<data name="AudioPlayerAlbumArtwork" xml:space="preserve">
|
||||
<value>Ilustrații album</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -168,8 +168,8 @@
|
||||
<data name="Retry" xml:space="preserve">
|
||||
<value>Повторити</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>Перемкнути Повну Висоту</value>
|
||||
<data name="ToggleExpanded" xml:space="preserve">
|
||||
<value>Розгорнути або згорнути плеєр</value>
|
||||
</data>
|
||||
<data name="ToggleVisibility" xml:space="preserve">
|
||||
<value>Перемкнути Видимість</value>
|
||||
@@ -216,4 +216,10 @@
|
||||
<data name="AudioPlayerShuffleOff" xml:space="preserve">
|
||||
<value>Перемішування вимкнено</value>
|
||||
</data>
|
||||
<data name="AudioPlayerStop" xml:space="preserve">
|
||||
<value>Зупинити</value>
|
||||
</data>
|
||||
<data name="AudioPlayerAlbumArtwork" xml:space="preserve">
|
||||
<value>Обкладинки альбому</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -168,8 +168,8 @@
|
||||
<data name="Retry" xml:space="preserve">
|
||||
<value>重试</value>
|
||||
</data>
|
||||
<data name="ToggleFullHeight" xml:space="preserve">
|
||||
<value>切换全高</value>
|
||||
<data name="ToggleExpanded" xml:space="preserve">
|
||||
<value>展开或折叠播放器</value>
|
||||
</data>
|
||||
<data name="ToggleVisibility" xml:space="preserve">
|
||||
<value>切换可见性</value>
|
||||
@@ -216,4 +216,10 @@
|
||||
<data name="AudioPlayerShuffleOff" xml:space="preserve">
|
||||
<value>关闭随机播放</value>
|
||||
</data>
|
||||
<data name="AudioPlayerStop" xml:space="preserve">
|
||||
<value>停止</value>
|
||||
</data>
|
||||
<data name="AudioPlayerAlbumArtwork" xml:space="preserve">
|
||||
<value>专辑插图</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -41,20 +41,16 @@ public sealed class ThemeAudioPlayerBuilder
|
||||
{
|
||||
Dictionary<string, object?> strings = new()
|
||||
{
|
||||
["toggleFullHeight"] = Localize("ToggleFullHeight"),
|
||||
["toggleVisibility"] = Localize("ToggleVisibility"),
|
||||
["toggleExpanded"] = Localize("ToggleExpanded"),
|
||||
["previous"] = Localize("AudioPlayerPrevious"),
|
||||
["next"] = Localize("AudioPlayerNext"),
|
||||
["shuffle"] = Localize("AudioPlayerShuffle"),
|
||||
["shuffleOff"] = Localize("AudioPlayerShuffleOff"),
|
||||
["shuffleRelease"] = Localize("AudioPlayerShuffleRelease"),
|
||||
["shuffleArtist"] = Localize("AudioPlayerShuffleArtist"),
|
||||
["shuffleLibrary"] = Localize("AudioPlayerShuffleLibrary"),
|
||||
["stop"] = Localize("AudioPlayerStop"),
|
||||
["repeat"] = Localize("AudioPlayerRepeat"),
|
||||
["repeatOff"] = Localize("AudioPlayerRepeatOff"),
|
||||
["repeatAll"] = Localize("AudioPlayerRepeatAll"),
|
||||
["repeatOne"] = Localize("AudioPlayerRepeatOne"),
|
||||
["queue"] = Localize("AudioPlayerQueue")
|
||||
["queue"] = Localize("AudioPlayerQueue"),
|
||||
["albumArtwork"] = Localize("AudioPlayerAlbumArtwork")
|
||||
};
|
||||
|
||||
return new ThemeAudioPlayerDto(
|
||||
|
||||
@@ -59,6 +59,123 @@
|
||||
const librariesContainer = document.getElementById('libraries-container');
|
||||
const noLibrariesMessage = document.getElementById('no-libraries');
|
||||
|
||||
const jsLocalizedStrings = {
|
||||
actions: @Json.Serialize(_localizer["Actions"].Value),
|
||||
play: @Json.Serialize(_localizer["Play"].Value),
|
||||
shuffle: @Json.Serialize(_localizer["Shuffle"].Value)
|
||||
};
|
||||
|
||||
// Closes the actions menus of all the music library cards.
|
||||
function closeCardMenus() {
|
||||
librariesContainer.querySelectorAll('.media-card.open').forEach(card => {
|
||||
card.classList.remove('open');
|
||||
const menu = card.querySelector('.card-actions-menu');
|
||||
if (menu)
|
||||
menu.classList.remove('open');
|
||||
});
|
||||
}
|
||||
|
||||
// Toggles the actions menu of a music library card, opening it with its top left corner at the given viewport position.
|
||||
function toggleCardMenu(card, anchor) {
|
||||
const wasOpen = card.classList.contains('open');
|
||||
closeCardMenus();
|
||||
if (wasOpen)
|
||||
return;
|
||||
card.classList.add('open');
|
||||
const menu = card.querySelector('.card-actions-menu');
|
||||
if (menu) {
|
||||
menu.classList.add('open');
|
||||
positionActionsMenu(menu, anchor);
|
||||
}
|
||||
}
|
||||
|
||||
// Resolves the viewport point where the card actions menu opens.
|
||||
function resolveMenuAnchor(event) {
|
||||
if (event.clientX !== 0 || event.clientY !== 0)
|
||||
return { x: event.clientX, y: event.clientY };
|
||||
const triggerRect = event.currentTarget.getBoundingClientRect();
|
||||
return { x: triggerRect.left, y: triggerRect.bottom };
|
||||
}
|
||||
|
||||
// Places the card actions menu with its top left corner at the requested viewport point.
|
||||
function positionActionsMenu(menu, anchor) {
|
||||
const margin = 4;
|
||||
const maxLeft = Math.max(margin, window.innerWidth - menu.offsetWidth - margin);
|
||||
const maxTop = Math.max(margin, window.innerHeight - menu.offsetHeight - margin);
|
||||
menu.style.position = 'fixed';
|
||||
menu.style.left = `${Math.min(Math.max(margin, anchor.x), maxLeft)}px`;
|
||||
menu.style.top = `${Math.min(Math.max(margin, anchor.y), maxTop)}px`;
|
||||
}
|
||||
|
||||
// Closes the actions menus when clicking or pressing a key outside them.
|
||||
function handleCardMenuDismiss(event) {
|
||||
if (event.type === 'keydown' && event.key !== 'Escape')
|
||||
return;
|
||||
if (event.type === 'click' && event.target.closest('.card-actions-menu, .card-actions-trigger'))
|
||||
return;
|
||||
closeCardMenus();
|
||||
}
|
||||
|
||||
// Adds the actions menu of a music library card, with the play and shuffle actions that start the whole library.
|
||||
function createMusicLibraryMenu(card, library) {
|
||||
const libraryCoverPath = library.coverImage
|
||||
? `/media/libraries/${library.id}/${library.coverImage.substring(library.coverImage.lastIndexOf('cover.'))}`
|
||||
: '';
|
||||
const trigger = document.createElement('button');
|
||||
trigger.type = 'button';
|
||||
trigger.className = 'card-actions-trigger';
|
||||
trigger.setAttribute('aria-haspopup', 'menu');
|
||||
trigger.setAttribute('aria-label', jsLocalizedStrings.actions);
|
||||
trigger.addEventListener('click', event => {
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
toggleCardMenu(card, resolveMenuAnchor(event));
|
||||
});
|
||||
|
||||
const menu = document.createElement('nav');
|
||||
menu.className = 'card-actions-menu';
|
||||
menu.setAttribute('role', 'menu');
|
||||
|
||||
const playAction = document.createElement('a');
|
||||
playAction.setAttribute('role', 'menuitem');
|
||||
playAction.href = '#';
|
||||
playAction.className = 'card-action-play';
|
||||
playAction.textContent = jsLocalizedStrings.play;
|
||||
playAction.setAttribute('data-audio-player-play-library', '');
|
||||
playAction.dataset.libraryId = library.id;
|
||||
playAction.dataset.title = library.title || '';
|
||||
if (libraryCoverPath)
|
||||
playAction.dataset.coverArtPath = libraryCoverPath;
|
||||
menu.appendChild(playAction);
|
||||
|
||||
const shuffleAction = document.createElement('a');
|
||||
shuffleAction.setAttribute('role', 'menuitem');
|
||||
shuffleAction.href = '#';
|
||||
shuffleAction.className = 'card-action-shuffle';
|
||||
shuffleAction.textContent = jsLocalizedStrings.shuffle;
|
||||
shuffleAction.setAttribute('data-audio-player-play-library-shuffled', '');
|
||||
shuffleAction.dataset.libraryId = library.id;
|
||||
menu.appendChild(shuffleAction);
|
||||
|
||||
menu.addEventListener('click', event => {
|
||||
// The global audio player delegation handles the play and shuffle actions; the menu only closes here.
|
||||
if (event.target.closest('.card-action-play, .card-action-shuffle'))
|
||||
closeCardMenus();
|
||||
});
|
||||
|
||||
card.appendChild(trigger);
|
||||
card.appendChild(menu);
|
||||
card.addEventListener('contextmenu', event => {
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
toggleCardMenu(card, resolveMenuAnchor(event));
|
||||
});
|
||||
card.addEventListener('click', event => {
|
||||
if (card.classList.contains('open') && !event.target.closest('.card-actions-menu'))
|
||||
closeCardMenus();
|
||||
});
|
||||
}
|
||||
|
||||
async function InitializeAsync() {
|
||||
if (isInitialized)
|
||||
return;
|
||||
@@ -95,7 +212,15 @@
|
||||
<span class="text-light-two"><strong>${library.title}</strong></span>
|
||||
`;
|
||||
|
||||
librariesContainer.appendChild(libraryElement);
|
||||
// A music library gets a card actions menu with the play and shuffle actions for the whole library.
|
||||
if (library.libraryType === 'Music') {
|
||||
const card = document.createElement('div');
|
||||
card.className = 'media-card';
|
||||
card.appendChild(libraryElement);
|
||||
createMusicLibraryMenu(card, library);
|
||||
librariesContainer.appendChild(card);
|
||||
} else
|
||||
librariesContainer.appendChild(libraryElement);
|
||||
});
|
||||
// Bind the AJAX navigation behavior to the library links, which were created after the initial navigation binding.
|
||||
bindNavigationLinks();
|
||||
@@ -107,10 +232,14 @@
|
||||
}
|
||||
|
||||
// Add listeners.
|
||||
document.addEventListener('click', handleCardMenuDismiss);
|
||||
document.addEventListener('keydown', handleCardMenuDismiss);
|
||||
document.addEventListener('DOMContentLoaded', InitializeAsync);
|
||||
|
||||
// Register cleanup for these listeners.
|
||||
cleanupFunctions.push(() => {
|
||||
document.removeEventListener('click', handleCardMenuDismiss);
|
||||
document.removeEventListener('keydown', handleCardMenuDismiss);
|
||||
document.removeEventListener('DOMContentLoaded', InitializeAsync);
|
||||
});
|
||||
|
||||
|
||||
+90
-5
@@ -8,6 +8,10 @@
|
||||
The tracks of the album are NOT edited inline: they are listed as cards that navigate to their own pages,
|
||||
and the update request never changes the tracks.
|
||||
|
||||
The album header and every track row the script renders expose a play trigger for the global audio player. The player
|
||||
handles those triggers by event delegation, so this view binds no playback listener; the trigger attribute contract
|
||||
lives in docs/technical/theming/Theming.md.
|
||||
|
||||
To change the behavior of the page, edit this script (and the theme template, when present). To restyle
|
||||
the page, edit the theme files. This fallback keeps every feature working without styling, so that a
|
||||
broken theme is obvious to the user while the page still functions.
|
||||
@@ -73,6 +77,13 @@
|
||||
})
|
||||
.ToList();
|
||||
var artworkItemsJson = System.Text.Json.JsonSerializer.Serialize(artworkItems);
|
||||
// The cover the play affordances hand to the player, resolved exactly like the cover this page displays: the stored cover, or the first stored artwork when the album has no cover.
|
||||
var playCoverPath = Model.CoverPath;
|
||||
if (string.IsNullOrWhiteSpace(playCoverPath))
|
||||
playCoverPath = (Model.Artwork ?? []).FirstOrDefault(artwork => !string.IsNullOrWhiteSpace(artwork.Path))?.Path ?? string.Empty;
|
||||
// The play album trigger starts disabled when the album is already known to hold no tracks, so an empty release cannot be
|
||||
// clicked before the track list request resolves. A failed request never changes this state.
|
||||
var hasTracks = (Model.Tracks?.Count ?? 0) > 0;
|
||||
}
|
||||
|
||||
@inject IViewLocalizer _localizer
|
||||
@@ -88,6 +99,16 @@
|
||||
<div class="shine-effect"></div>
|
||||
<div class="form-row">
|
||||
<button id="btn-back-to-artist" type="button" class="abort-button">@_localizer["BackToArtist"]</button>
|
||||
<!-- The play album trigger is handled by the global audio player script through event delegation, so this page binds no click handler of its own. -->
|
||||
<button id="btn-play-album" type="button" class="confirm-button" @(hasTracks ? string.Empty : "disabled")
|
||||
data-audio-player-play
|
||||
data-library-id="@libraryId"
|
||||
data-album-id="@albumId"
|
||||
data-artist-id="@artistId"
|
||||
data-title="@(metadata?.Title ?? string.Empty)"
|
||||
data-cover-art-path="@(playCoverPath ?? string.Empty)">
|
||||
@_localizer["PlayAlbum"]
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<h1 class="text-light-two w-100 text-center pt-0 pb-0 engraved-title">@_localizer["EditAlbum"]</h1>
|
||||
@@ -112,6 +133,7 @@
|
||||
<div class="form-row">
|
||||
<table class="w-100 form-table tracks-table">
|
||||
<colgroup>
|
||||
<col />
|
||||
<col class="track-number-column" />
|
||||
<col />
|
||||
<col class="track-duration-column" />
|
||||
@@ -589,6 +611,7 @@
|
||||
|
||||
const artistId = '@artistId';
|
||||
const albumId = '@albumId';
|
||||
const albumTitle = @Json.Serialize(metadata?.Title ?? string.Empty);
|
||||
const libraryId = '@libraryId';
|
||||
const saveUrl = '@_urlService.GetAbsoluteUrl(WebRoutes.Music.SAVE_ALBUM, new { artistId = default(Guid), albumId = default(Guid) })'.replace('/@(default(Guid))', `/${artistId}`).replace('/@(default(Guid))', `/${albumId}`);
|
||||
const deleteUrl = '@_urlService.GetAbsoluteUrl(WebRoutes.Music.DELETE_ALBUM, new { artistId = default(Guid), albumId = default(Guid) })'.replace('/@(default(Guid))', `/${artistId}`).replace('/@(default(Guid))', `/${albumId}`);
|
||||
@@ -601,6 +624,7 @@
|
||||
const btnBackToArtist = document.getElementById('btn-back-to-artist');
|
||||
const btnSaveAlbum = document.getElementById('btn-save-album');
|
||||
const btnDeleteAlbum = document.getElementById('btn-delete-album');
|
||||
const btnPlayAlbum = document.getElementById('btn-play-album');
|
||||
const btnAddCatalogNumber = document.getElementById('btn-add-catalog-number');
|
||||
const btnAddReleaseType = document.getElementById('btn-add-release-type');
|
||||
const btnAddGenre = document.getElementById('btn-add-genre');
|
||||
@@ -633,9 +657,34 @@
|
||||
noCover: @Json.Serialize(_localizer["NoCover"].Value),
|
||||
coverSaved: @Json.Serialize(_localizer["CoverSaved"].Value),
|
||||
coverUploadFailed: @Json.Serialize(_localizer["CoverUploadFailed"].Value),
|
||||
playTrack: @Json.Serialize(_localizer["PlayTrack"].Value),
|
||||
remove: @Json.Serialize(_localizer["Remove"].Value)
|
||||
};
|
||||
|
||||
// Normalizes a cover path with the same rule the server uses: a missing or whitespace only path means no artwork.
|
||||
function normalizeCoverPath(coverPath) {
|
||||
return typeof coverPath === 'string' ? coverPath.trim() : '';
|
||||
}
|
||||
|
||||
// The cover path the play affordances hand to the player, kept in step with the artwork the page currently displays.
|
||||
let currentCoverPath = normalizeCoverPath(@Json.Serialize(playCoverPath ?? string.Empty));
|
||||
|
||||
// Writes the cover of a play descriptor onto a trigger, dropping the attribute when the context has no artwork.
|
||||
function applyDescriptorCover(trigger, coverPath) {
|
||||
const normalizedCoverPath = normalizeCoverPath(coverPath);
|
||||
if (normalizedCoverPath)
|
||||
trigger.dataset.coverArtPath = normalizedCoverPath;
|
||||
else
|
||||
delete trigger.dataset.coverArtPath;
|
||||
}
|
||||
|
||||
// Hands every play trigger the cover the page currently displays, so a play started after choosing or uploading an artwork shows that artwork in the player bar.
|
||||
function applyPlayAffordanceCover(coverPath) {
|
||||
currentCoverPath = normalizeCoverPath(coverPath);
|
||||
applyDescriptorCover(btnPlayAlbum, currentCoverPath);
|
||||
tracksBody.querySelectorAll('[data-audio-player-play]').forEach(trigger => applyDescriptorCover(trigger, currentCoverPath));
|
||||
}
|
||||
|
||||
// Reads the trimmed value of the element with the provided id.
|
||||
function readValue(id) {
|
||||
const element = document.getElementById(id);
|
||||
@@ -898,20 +947,51 @@
|
||||
return `${minutes}:${paddedSeconds}`;
|
||||
}
|
||||
|
||||
// Renders a row of the tracks table per track, or shows the empty message when the album has no tracks.
|
||||
// Renders a row of the tracks table per track, or shows the empty message when the album has no tracks. A failed
|
||||
// request returns undefined, which is not an empty album: it leaves the existing rows and the play album state intact.
|
||||
function renderTracks(response) {
|
||||
if (!response || !Array.isArray(response.data))
|
||||
return;
|
||||
tracksBody.innerHTML = '';
|
||||
const tracks = response && response.data ? response.data : [];
|
||||
const tracks = response.data;
|
||||
noTracksMessage.classList.toggle('hidden', tracks.length !== 0);
|
||||
// Only a successful empty list disables the play album trigger. The player can still build the queue itself when
|
||||
// the track list could not be loaded.
|
||||
btnPlayAlbum.disabled = tracks.length === 0;
|
||||
tracks.forEach(track => tracksBody.appendChild(createTrackRow(track)));
|
||||
bindNavigationLinks();
|
||||
}
|
||||
|
||||
// Creates a row of the tracks table, with the name of the track linking to its own page.
|
||||
// Creates the play trigger of a track row. It describes a track context, so the player plays exactly this track.
|
||||
function createTrackPlayButton(track) {
|
||||
const button = document.createElement('button');
|
||||
button.type = 'button';
|
||||
button.className = 'confirm-button';
|
||||
button.setAttribute('data-audio-player-play', '');
|
||||
button.dataset.libraryId = libraryId;
|
||||
button.dataset.trackId = track.id;
|
||||
button.dataset.albumId = albumId;
|
||||
button.dataset.artistId = artistId;
|
||||
button.dataset.title = track.title || '';
|
||||
button.dataset.albumTitle = albumTitle;
|
||||
button.dataset.duration = String(track.durationInSeconds || '');
|
||||
applyDescriptorCover(button, currentCoverPath);
|
||||
// The button carries no visible text, so its accessible name names both the action and the track it plays.
|
||||
const label = `${jsLocalizedStrings.playTrack}: ${track.title || ''}`;
|
||||
button.setAttribute('aria-label', label);
|
||||
button.title = label;
|
||||
button.textContent = '\u25B6';
|
||||
return button;
|
||||
}
|
||||
|
||||
// Creates a row of the tracks table, with the play trigger, the number, the name of the track linking to its own page and the duration.
|
||||
function createTrackRow(track) {
|
||||
const row = document.createElement('tr');
|
||||
row.className = 'track-row';
|
||||
|
||||
const playCell = document.createElement('td');
|
||||
playCell.appendChild(createTrackPlayButton(track));
|
||||
|
||||
const numberCell = document.createElement('td');
|
||||
numberCell.textContent = track.trackNumber;
|
||||
|
||||
@@ -925,6 +1005,7 @@
|
||||
const durationCell = document.createElement('td');
|
||||
durationCell.textContent = formatDuration(track.durationInSeconds);
|
||||
|
||||
row.appendChild(playCell);
|
||||
row.appendChild(numberCell);
|
||||
row.appendChild(nameCell);
|
||||
row.appendChild(durationCell);
|
||||
@@ -1007,6 +1088,8 @@
|
||||
coverImage.dataset.coverPath = storedPath;
|
||||
coverPathLabel.textContent = storedPath ? storedPath : jsLocalizedStrings.noCover;
|
||||
coverPathLabel.title = storedPath;
|
||||
// The player shows the cover the page displays, so the uploaded cover is handed to the play triggers too.
|
||||
applyPlayAffordanceCover(storedPath);
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
notificationService.show(jsLocalizedStrings.coverSaved, NotificationType.SUCCESS);
|
||||
@@ -1042,12 +1125,14 @@
|
||||
artworkCarousel.querySelectorAll('.artwork-carousel-item').forEach(item => {
|
||||
item.classList.toggle('selected', item.dataset.artworkPath === artworkPath);
|
||||
});
|
||||
// The play affordances hand the player the cover the page currently displays, so a play started after choosing an artwork shows that artwork in the player bar.
|
||||
applyPlayAffordanceCover(artworkPath);
|
||||
}
|
||||
|
||||
// Shows the cover image of the album, or the first stored artwork when there is no cover, or a placeholder when the album has neither.
|
||||
function showCover() {
|
||||
const coverPath = coverImage.dataset.coverPath || '';
|
||||
const artworkPath = coverPath || (artworkItems.length > 0 ? artworkItems[0].path : '');
|
||||
const coverPath = normalizeCoverPath(coverImage.dataset.coverPath);
|
||||
const artworkPath = coverPath || (artworkItems.length > 0 ? normalizeCoverPath(artworkItems[0].path) : '');
|
||||
if (artworkPath) {
|
||||
selectArtwork(artworkPath);
|
||||
} else {
|
||||
|
||||
+50
-4
@@ -110,6 +110,9 @@
|
||||
sortAscending: '@_localizer["SortAscending"]',
|
||||
sortDescending: '@_localizer["SortDescending"]',
|
||||
viewDetails: '@_localizer["ViewDetails"]',
|
||||
actions: '@_localizer["Actions"]',
|
||||
play: '@_localizer["Play"]',
|
||||
shuffle: '@_localizer["Shuffle"]',
|
||||
deleteItem: '@_localizer["Delete"]',
|
||||
deleteConfirm: '@_localizer["DeleteConfirm"]',
|
||||
deleteFailed: '@_localizer["DeleteFailed"]'
|
||||
@@ -208,7 +211,7 @@
|
||||
trigger.type = 'button';
|
||||
trigger.className = 'card-actions-trigger';
|
||||
trigger.setAttribute('aria-haspopup', 'menu');
|
||||
trigger.setAttribute('aria-label', jsLocalizedStrings.viewDetails);
|
||||
trigger.setAttribute('aria-label', jsLocalizedStrings.actions);
|
||||
trigger.addEventListener('click', event => {
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
@@ -218,11 +221,54 @@
|
||||
const menu = document.createElement('nav');
|
||||
menu.className = 'card-actions-menu';
|
||||
menu.setAttribute('role', 'menu');
|
||||
menu.innerHTML = `
|
||||
<a role="menuitem" href="${artistUrl}">${jsLocalizedStrings.viewDetails}</a>
|
||||
<a role="menuitem" href="#" class="card-action-delete">${jsLocalizedStrings.deleteItem}</a>`;
|
||||
|
||||
const detailsAction = document.createElement('a');
|
||||
detailsAction.setAttribute('role', 'menuitem');
|
||||
detailsAction.href = artistUrl;
|
||||
detailsAction.textContent = jsLocalizedStrings.viewDetails;
|
||||
|
||||
const playAction = document.createElement('a');
|
||||
playAction.setAttribute('role', 'menuitem');
|
||||
playAction.href = '#';
|
||||
playAction.className = 'card-action-play';
|
||||
playAction.textContent = jsLocalizedStrings.play;
|
||||
playAction.setAttribute('data-audio-player-play', '');
|
||||
playAction.dataset.libraryId = libraryId;
|
||||
playAction.dataset.artistId = artist.id;
|
||||
playAction.dataset.title = artist.name || '';
|
||||
if (artist.coverPath)
|
||||
playAction.dataset.coverArtPath = artist.coverPath;
|
||||
|
||||
const shuffleAction = document.createElement('a');
|
||||
shuffleAction.setAttribute('role', 'menuitem');
|
||||
shuffleAction.href = '#';
|
||||
shuffleAction.className = 'card-action-shuffle';
|
||||
shuffleAction.textContent = jsLocalizedStrings.shuffle;
|
||||
shuffleAction.setAttribute('data-audio-player-play-shuffled', '');
|
||||
shuffleAction.setAttribute('data-audio-player-shuffle-scope', 'artist');
|
||||
shuffleAction.dataset.libraryId = libraryId;
|
||||
shuffleAction.dataset.artistId = artist.id;
|
||||
shuffleAction.dataset.title = artist.name || '';
|
||||
if (artist.coverPath)
|
||||
shuffleAction.dataset.coverArtPath = artist.coverPath;
|
||||
|
||||
const deleteAction = document.createElement('a');
|
||||
deleteAction.setAttribute('role', 'menuitem');
|
||||
deleteAction.href = '#';
|
||||
deleteAction.className = 'card-action-delete';
|
||||
deleteAction.textContent = jsLocalizedStrings.deleteItem;
|
||||
|
||||
menu.appendChild(detailsAction);
|
||||
menu.appendChild(playAction);
|
||||
menu.appendChild(shuffleAction);
|
||||
menu.appendChild(deleteAction);
|
||||
|
||||
menu.addEventListener('click', async event => {
|
||||
// The global audio player delegation handles the play and shuffle actions; the menu only closes here.
|
||||
if (event.target.closest('.card-action-play, .card-action-shuffle')) {
|
||||
closeCardMenus();
|
||||
return;
|
||||
}
|
||||
const deleteItem = event.target.closest('.card-action-delete');
|
||||
const menuItem = event.target.closest('a[role="menuitem"]');
|
||||
if (!menuItem)
|
||||
|
||||
+73
-3
@@ -9,6 +9,9 @@
|
||||
The albums of the artist are NOT edited inline: they are listed as cards that navigate to their own pages,
|
||||
and the update request only round-trips the albums unchanged, so that updating the artist never drops them.
|
||||
|
||||
The artist header exposes a play all trigger for the global audio player. The player handles the trigger by event
|
||||
delegation, so this view binds no playback listener; the trigger attribute contract lives in docs/technical/theming/Theming.md.
|
||||
|
||||
To change the behavior of the page, edit this script (and the theme template, when present). To restyle
|
||||
the page, edit the theme files. This fallback keeps every feature working without styling, so that a
|
||||
broken theme is obvious to the user while the page still functions.
|
||||
@@ -36,6 +39,9 @@
|
||||
var aliases = metadata?.Aliases ?? [];
|
||||
var contributors = Model.Contributors ?? [];
|
||||
var ratings = Model.Ratings ?? [];
|
||||
// The play all trigger starts disabled when the artist is already known to hold no releases, so an empty discography
|
||||
// cannot be clicked before the release list request resolves. A failed request never changes this state.
|
||||
var hasReleases = (Model.Albums?.Count ?? 0) > 0;
|
||||
var genres = metadata?.Genres ?? [];
|
||||
var tags = metadata?.Tags ?? [];
|
||||
var area = metadata?.Area;
|
||||
@@ -110,6 +116,15 @@
|
||||
<div class="shine-effect"></div>
|
||||
<div class="form-row">
|
||||
<button id="btn-back-to-artists" type="button" class="abort-button">@_localizer["BackToArtists"]</button>
|
||||
<!-- The play all trigger is handled by the global audio player script through event delegation, so this page binds no click handler of its own. -->
|
||||
<button id="btn-play-artist" type="button" class="confirm-button" @(hasReleases ? string.Empty : "disabled")
|
||||
data-audio-player-play
|
||||
data-library-id="@libraryId"
|
||||
data-artist-id="@artistId"
|
||||
data-title="@(metadata?.Name ?? string.Empty)"
|
||||
data-cover-art-path="@(Model.CoverPath ?? string.Empty)">
|
||||
@_localizer["PlayAll"]
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<h1 class="text-light-two w-100 text-center pt-0 pb-0 engraved-title">@_localizer["EditArtist"]</h1>
|
||||
@@ -624,6 +639,7 @@
|
||||
const btnBackToArtists = document.getElementById('btn-back-to-artists');
|
||||
const btnSaveArtist = document.getElementById('btn-save-artist');
|
||||
const btnDeleteArtist = document.getElementById('btn-delete-artist');
|
||||
const btnPlayArtist = document.getElementById('btn-play-artist');
|
||||
const btnAddAlias = document.getElementById('btn-add-alias');
|
||||
const btnAddIpi = document.getElementById('btn-add-ipi');
|
||||
const btnAddIsni = document.getElementById('btn-add-isni');
|
||||
@@ -656,6 +672,8 @@
|
||||
noCover: @Json.Serialize(_localizer["NoCover"].Value),
|
||||
coverSaved: @Json.Serialize(_localizer["CoverSaved"].Value),
|
||||
coverUploadFailed: @Json.Serialize(_localizer["CoverUploadFailed"].Value),
|
||||
play: @Json.Serialize(_localizer["Play"].Value),
|
||||
shuffle: @Json.Serialize(_localizer["Shuffle"].Value),
|
||||
remove: @Json.Serialize(_localizer["Remove"].Value)
|
||||
};
|
||||
|
||||
@@ -932,6 +950,28 @@
|
||||
return deleteAlbumUrlTemplate.replace('/@(default(Guid))', `/${artistId}`).replace('/@(default(Guid))', `/${albumId}`) + `?libraryId=${libraryId}`;
|
||||
}
|
||||
|
||||
// Writes the play descriptor of an album onto an album card menu action.
|
||||
function applyAlbumPlayDescriptor(trigger, album) {
|
||||
trigger.dataset.libraryId = libraryId;
|
||||
trigger.dataset.artistId = artistId;
|
||||
trigger.dataset.albumId = album.id;
|
||||
trigger.dataset.title = album.title || '';
|
||||
if (album.coverPath)
|
||||
trigger.dataset.coverArtPath = album.coverPath;
|
||||
else
|
||||
delete trigger.dataset.coverArtPath;
|
||||
}
|
||||
|
||||
// Creates an action of the album card actions menu.
|
||||
function createAlbumMenuAction(label, className) {
|
||||
const action = document.createElement('a');
|
||||
action.setAttribute('role', 'menuitem');
|
||||
action.href = '#';
|
||||
action.className = className;
|
||||
action.textContent = label;
|
||||
return action;
|
||||
}
|
||||
|
||||
// The localized labels of the release types, keyed by their canonical enum name.
|
||||
const releaseTypeLabels = {
|
||||
'Album': '@_localizer["Album"].Value',
|
||||
@@ -962,11 +1002,16 @@
|
||||
renderReleases(response);
|
||||
}
|
||||
|
||||
// Renders the releases of the artist, grouped by their primary release type, each group ordered by release year.
|
||||
// Renders the releases of the artist, grouped by their primary release type, each group ordered by release year. A
|
||||
// failed request returns undefined, which is not an empty discography: it leaves the existing list and play state intact.
|
||||
function renderReleases(response) {
|
||||
if (!response || !Array.isArray(response.data))
|
||||
return;
|
||||
albumsContainer.querySelectorAll('.release-group').forEach(group => group.remove());
|
||||
const releases = response && response.data ? response.data : [];
|
||||
const releases = response.data;
|
||||
noAlbumsMessage.classList.toggle('hidden', releases.length !== 0);
|
||||
// Only a successful empty list disables the play all trigger. The player can still build the queue itself when the release list could not be loaded.
|
||||
btnPlayArtist.disabled = releases.length === 0;
|
||||
|
||||
// The releases are grouped by their first release type, falling back to "Other" when the type is not known.
|
||||
const groups = new Map();
|
||||
@@ -1072,8 +1117,28 @@
|
||||
const menu = document.createElement('nav');
|
||||
menu.className = 'card-actions-menu';
|
||||
menu.setAttribute('role', 'menu');
|
||||
menu.innerHTML = `<a role="menuitem" href="#" class="card-action-delete">${jsLocalizedStrings.remove}</a>`;
|
||||
|
||||
const playAction = createAlbumMenuAction(jsLocalizedStrings.play, 'card-action-play');
|
||||
playAction.setAttribute('data-audio-player-play', '');
|
||||
applyAlbumPlayDescriptor(playAction, album);
|
||||
|
||||
const shuffleAction = createAlbumMenuAction(jsLocalizedStrings.shuffle, 'card-action-shuffle');
|
||||
shuffleAction.setAttribute('data-audio-player-play-shuffled', '');
|
||||
shuffleAction.setAttribute('data-audio-player-shuffle-scope', 'release');
|
||||
applyAlbumPlayDescriptor(shuffleAction, album);
|
||||
|
||||
const deleteAction = createAlbumMenuAction(jsLocalizedStrings.remove, 'card-action-delete');
|
||||
|
||||
menu.appendChild(playAction);
|
||||
menu.appendChild(shuffleAction);
|
||||
menu.appendChild(deleteAction);
|
||||
|
||||
menu.addEventListener('click', async event => {
|
||||
// Play and shuffle are handled by the global audio player delegation, so the menu only closes here.
|
||||
if (event.target.closest('.card-action-play, .card-action-shuffle')) {
|
||||
closeCardMenus();
|
||||
return;
|
||||
}
|
||||
const deleteItem = event.target.closest('.card-action-delete');
|
||||
if (!deleteItem)
|
||||
return;
|
||||
@@ -1237,6 +1302,11 @@
|
||||
coverImage.dataset.coverPath = storedPath;
|
||||
coverPathLabel.textContent = storedPath ? storedPath : jsLocalizedStrings.noCover;
|
||||
coverPathLabel.title = storedPath;
|
||||
// The player shows the cover the page displays, so the uploaded cover is handed to the play trigger too.
|
||||
if (storedPath)
|
||||
btnPlayArtist.dataset.coverArtPath = storedPath;
|
||||
else
|
||||
delete btnPlayArtist.dataset.coverArtPath;
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
notificationService.show(jsLocalizedStrings.coverSaved, NotificationType.SUCCESS);
|
||||
|
||||
+20
-2
@@ -10,6 +10,9 @@
|
||||
The audio properties, the release information, the language and original language, the work, the
|
||||
contributors, the ratings, the moods and the ISRCs are all editable, and they are all round-tripped on save.
|
||||
|
||||
The track header exposes a play trigger for the global audio player. The player handles the trigger by event
|
||||
delegation, so this view binds no playback listener; the trigger attribute contract lives in docs/technical/theming/Theming.md.
|
||||
|
||||
To change the behavior of the page, edit this script (and the theme template, when present). To restyle
|
||||
the page, edit the theme files. This fallback keeps every feature working without styling, so that a
|
||||
broken theme is obvious to the user while the page still functions.
|
||||
@@ -35,8 +38,10 @@
|
||||
var libraryId = Model.LibraryId.ToString();
|
||||
// The cover shown on the left is the cover of the album the track belongs to, passed in by the endpoint.
|
||||
var albumCoverPath = ViewData["AlbumCoverPath"]?.ToString() ?? string.Empty;
|
||||
// The track DTO does not carry the Id of its artist, so it is taken from the route that rendered the view.
|
||||
var artistId = Context.Request.RouteValues["artistId"]?.ToString() ?? string.Empty;
|
||||
var albumTitle = ViewData["AlbumTitle"]?.ToString() ?? string.Empty;
|
||||
// The track DTO does not carry the Id of its artist, so the endpoint passes the normalized route value it used to load
|
||||
// the track and its album. Both render paths therefore hand the player the same artist Id.
|
||||
var artistId = ViewData["ArtistId"]?.ToString() ?? string.Empty;
|
||||
var metadata = Model.Metadata;
|
||||
var work = Model.Work;
|
||||
var releaseInfo = metadata?.ReleaseInfo;
|
||||
@@ -82,6 +87,19 @@
|
||||
<div class="shine-effect"></div>
|
||||
<div class="form-row">
|
||||
<button id="btn-back-to-album" type="button" class="abort-button">@_localizer["BackToAlbum"]</button>
|
||||
<!-- The play trigger is handled by the global audio player script through event delegation, so this page binds no click handler of its own. -->
|
||||
<button id="btn-play-track" type="button" class="confirm-button"
|
||||
data-audio-player-play
|
||||
data-library-id="@libraryId"
|
||||
data-track-id="@trackId"
|
||||
data-album-id="@Model.AlbumId"
|
||||
data-artist-id="@artistId"
|
||||
data-title="@(metadata?.Title ?? string.Empty)"
|
||||
data-album-title="@albumTitle"
|
||||
data-duration="@(metadata?.DurationInSeconds?.ToString(CultureInfo.InvariantCulture) ?? string.Empty)"
|
||||
data-cover-art-path="@albumCoverPath">
|
||||
@_localizer["PlayTrack"]
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<h1 class="text-light-two w-100 text-center pt-0 pb-0 engraved-title">@_localizer["EditTrack"]</h1>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@using Microsoft.Extensions.Localization
|
||||
@using Microsoft.Extensions.Localization
|
||||
|
||||
@inject IStringLocalizerFactory _stringLocalizerFactory
|
||||
|
||||
@@ -20,27 +20,25 @@
|
||||
|
||||
The DOM contract a theme must preserve is:
|
||||
- The container element with the 'audio-player-container' class, carrying 'not-shown' while the bar is hidden,
|
||||
and 'full-height' while it is expanded. The audio player toggles both classes. While the bar is hidden the
|
||||
player also sets the 'inert' attribute on it, and removes it when the bar is shown, so a collapsed bar keeps
|
||||
none of its focusable controls in the tab order.
|
||||
- The main content element, carrying 'audio-player-not-shown' while the bar is hidden, and 'audio-player-full-height'
|
||||
while it is expanded. The audio player toggles both classes on it as well.
|
||||
- The elements with the ids 'audio-player-full-height-toggle' and 'audio-player-close', which the global site script
|
||||
binds and routes to the audio player.
|
||||
- The hook attributes the audio player binds: 'data-audio-player-play-pause', '-previous', '-next', '-shuffle',
|
||||
'-shuffle-control', '-shuffle-menu', '-repeat', '-progress', '-progress-played', '-progress-downloaded',
|
||||
'-progress-undownloaded', '-current-time', '-total-time', '-track-name', '-cover-thumbnail', '-cover-image',
|
||||
'-volume', '-volume-level', '-mute' and '-queue'. The volume fill element ('-volume-level') is a styling hook the
|
||||
stylesheet drives from the custom properties below, not one the script writes to.
|
||||
- The shuffle scope items carry 'data-audio-player-shuffle-scope' ('off', 'release', 'artist' or 'library'), inside
|
||||
the menu element carrying 'data-audio-player-shuffle-menu'. The shuffle control carries 'data-audio-player-shuffle'
|
||||
and is wrapped by 'data-audio-player-shuffle-control', so the player can open the menu near it and close it on an
|
||||
outside click. It is a menu button: it carries 'aria-haspopup' and 'aria-expanded', gets the 'is-active' class while
|
||||
shuffle is on, and does not carry 'aria-pressed'. The scope items get 'aria-checked' and the 'is-selected' class, and
|
||||
the 'off' item is selected while shuffle is off. The repeat toggle carries 'data-audio-player-repeat' and the player
|
||||
writes 'data-audio-player-repeat-mode' ('off', 'all' or 'one') and toggles the 'is-active' and 'is-one' classes on it.
|
||||
and 'expanded' while it is expanded. The audio player toggles both classes. While the bar is hidden the player
|
||||
also sets the 'inert' attribute on it, and removes it when the bar is shown, so a collapsed bar keeps none of
|
||||
its focusable controls in the tab order. The position and orientation of the container are entirely theme-owned:
|
||||
this fallback stylesheet uses a flex column with the bar at the bottom, but a theme may place the bar vertically
|
||||
on a side and expand its queue horizontally.
|
||||
- The main content element, carrying 'audio-player-not-shown' while the bar is hidden, and
|
||||
'audio-player-bar-expanded' while it is expanded. The audio player toggles these classes on it as well.
|
||||
- The element with the id 'audio-player-expand-toggle', which the global site script binds and routes to the audio player.
|
||||
- The hook attributes the audio player binds: 'data-audio-player-play-pause', '-stop', '-previous', '-next', '-repeat',
|
||||
'-progress', '-progress-played', '-progress-downloaded', '-progress-undownloaded', '-current-time', '-total-time',
|
||||
'-track-name', '-album-name', '-now-playing-title', '-now-playing-release-type', '-now-playing-release',
|
||||
'-now-playing-year', '-now-playing-artist', '-artwork-carousel', '-cover-thumbnail', '-cover-image', '-volume', '-volume-level', '-mute' and '-queue'.
|
||||
The volume fill element ('-volume-level') is a styling hook the stylesheet drives from the custom properties below,
|
||||
not one the script writes to. The repeat toggle carries 'data-audio-player-repeat' and the player writes
|
||||
'data-audio-player-repeat-mode' ('off', 'all' or 'one') and toggles the 'is-active' and 'is-one' classes on it.
|
||||
A queue item root rendered by the player always carries 'data-audio-player-queue-entry-id', whether it comes from the
|
||||
theme sub template or from the built-in markup, so clicking it starts that entry.
|
||||
theme sub template or from the built-in markup, so clicking it starts that entry. The queue element stays the scroll
|
||||
container of the list, because the player scrolls the current entry to the start of whichever axis the theme makes
|
||||
scrollable when playback advances or the bar expands.
|
||||
- The three state progress bar: the played part carries 'audio-player-progress-played', the downloaded but not
|
||||
played part carries 'audio-player-progress-downloaded', and the not yet downloaded part carries
|
||||
'audio-player-progress-undownloaded'. Each layer also carries 'data-audio-player-progress-layer' ('played',
|
||||
@@ -57,22 +55,40 @@
|
||||
'audio-player-template-queue-item' and 'audio-player-template-playlist-item'. This application fallback partial
|
||||
renders neither element; it intentionally uses the built-in queue item markup.
|
||||
|
||||
The play affordances the pages hand to the player use the 'data-audio-player-play' trigger attribute, and a play next
|
||||
affordance uses 'data-audio-player-play-next'. A track trigger must carry libraryId, trackId, albumId and artistId,
|
||||
because the playback manifest route needs all four Ids. The 'The Audio Player Bar' section of
|
||||
The play affordances the pages hand to the player use the 'data-audio-player-play' trigger attribute, a shuffled play
|
||||
affordance uses 'data-audio-player-play-shuffled' together with 'data-audio-player-shuffle-scope' ('release', 'artist' or
|
||||
'library'), a whole library play affordance uses 'data-audio-player-play-library' with 'data-library-id', a whole library
|
||||
shuffle affordance uses 'data-audio-player-play-library-shuffled' with 'data-library-id', and a play next affordance uses
|
||||
'data-audio-player-play-next'. A track trigger must carry libraryId, trackId, albumId and artistId, because the playback
|
||||
manifest route needs all four Ids. The 'Play Affordances on the Music Pages' section of
|
||||
docs/technical/theming/Theming.md documents this contract for theme authors.
|
||||
*@
|
||||
|
||||
<div class="audio-player-container not-shown" hidden>
|
||||
<!-- Expanded area: cover art, and the queue when the play context holds more than one track. -->
|
||||
<!-- Expanded area: current track details and album artwork beside the current queue, including a single track. -->
|
||||
<div class="audio-player-expanded">
|
||||
<img class="audio-player-cover-image" data-audio-player-cover-image alt="" />
|
||||
<div class="audio-player-now-playing">
|
||||
<img class="audio-player-cover-image" data-audio-player-cover-image alt="" />
|
||||
<div class="audio-player-now-playing-labels">
|
||||
<span class="audio-player-now-playing-title" data-audio-player-now-playing-title></span>
|
||||
<div class="audio-player-now-playing-release-line">
|
||||
<span class="audio-player-now-playing-release-type" data-audio-player-now-playing-release-type></span>
|
||||
<span class="audio-player-now-playing-release" data-audio-player-now-playing-release></span>
|
||||
<span class="audio-player-now-playing-year" data-audio-player-now-playing-year></span>
|
||||
</div>
|
||||
<span class="audio-player-now-playing-artist" data-audio-player-now-playing-artist></span>
|
||||
</div>
|
||||
<div class="audio-player-artwork-carousel artwork-carousel" data-audio-player-artwork-carousel role="group" aria-label="@localizer["AudioPlayerAlbumArtwork"]" hidden></div>
|
||||
</div>
|
||||
<ul class="audio-player-queue" data-audio-player-queue aria-label="@localizer["AudioPlayerQueue"]"></ul>
|
||||
</div>
|
||||
<!-- Condensed bar: transport controls, three state progress bar, volume, and track name. -->
|
||||
<div class="audio-player-bar">
|
||||
<img class="audio-player-cover-thumbnail" data-audio-player-cover-thumbnail alt="" />
|
||||
<span class="audio-player-track-name" data-audio-player-track-name></span>
|
||||
<div class="audio-player-track-labels">
|
||||
<span class="audio-player-track-name" data-audio-player-track-name></span>
|
||||
<span class="audio-player-album-name" data-audio-player-album-name></span>
|
||||
</div>
|
||||
<span class="audio-player-time audio-player-current-time" data-audio-player-current-time>0:00</span>
|
||||
<div class="audio-player-progress" data-audio-player-progress data-audio-player-progress-state="idle" role="slider" tabindex="0"
|
||||
aria-label="@localizer["AudioPlayerSeek"]" aria-valuemin="0" aria-valuemax="1" aria-valuenow="0" aria-busy="false">
|
||||
@@ -82,24 +98,15 @@
|
||||
</div>
|
||||
<span class="audio-player-time audio-player-total-time" data-audio-player-total-time>--:--</span>
|
||||
<div class="audio-player-queue-controls">
|
||||
<div class="audio-player-shuffle-control" data-audio-player-shuffle-control>
|
||||
<button type="button" class="audio-player-button audio-player-shuffle" data-audio-player-shuffle
|
||||
aria-haspopup="menu" aria-expanded="false" aria-label="@localizer["AudioPlayerShuffle"]">
|
||||
<span class="audio-player-shuffle-icon" aria-hidden="true">⇆</span>
|
||||
</button>
|
||||
<div class="audio-player-shuffle-menu" data-audio-player-shuffle-menu role="menu" hidden>
|
||||
<button type="button" role="menuitemradio" aria-checked="true" data-audio-player-shuffle-scope="off">@localizer["AudioPlayerShuffleOff"]</button>
|
||||
<button type="button" role="menuitemradio" aria-checked="false" data-audio-player-shuffle-scope="release">@localizer["AudioPlayerShuffleRelease"]</button>
|
||||
<button type="button" role="menuitemradio" aria-checked="false" data-audio-player-shuffle-scope="artist">@localizer["AudioPlayerShuffleArtist"]</button>
|
||||
<button type="button" role="menuitemradio" aria-checked="false" data-audio-player-shuffle-scope="library">@localizer["AudioPlayerShuffleLibrary"]</button>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="audio-player-button audio-player-previous" data-audio-player-previous aria-label="@localizer["AudioPlayerPrevious"]">
|
||||
<span class="audio-player-previous-icon" aria-hidden="true"></span>
|
||||
</button>
|
||||
<button type="button" class="audio-player-button audio-player-play-pause" data-audio-player-play-pause aria-label="@localizer["AudioPlayerPlay"]">
|
||||
<span class="audio-player-play-pause-icon" aria-hidden="true"></span>
|
||||
</button>
|
||||
<button type="button" class="audio-player-button audio-player-stop" data-audio-player-stop aria-label="@localizer["AudioPlayerStop"]">
|
||||
<span class="audio-player-stop-icon" aria-hidden="true"></span>
|
||||
</button>
|
||||
<button type="button" class="audio-player-button audio-player-next" data-audio-player-next aria-label="@localizer["AudioPlayerNext"]">
|
||||
<span class="audio-player-next-icon" aria-hidden="true"></span>
|
||||
</button>
|
||||
@@ -119,8 +126,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="audio-player-controls">
|
||||
<button type="button" id="audio-player-full-height-toggle">@localizer["ToggleFullHeight"]</button>
|
||||
<button type="button" id="audio-player-close">@localizer["ToggleVisibility"]</button>
|
||||
<button type="button" id="audio-player-expand-toggle" aria-label="@localizer["ToggleExpanded"]">
|
||||
<span class="audio-player-expand-icon" aria-hidden="true"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -50,6 +50,12 @@
|
||||
getArtistsUrl: '@_urlService.GetRelativeUrl(WebRoutes.Music.GET_ARTISTS)',
|
||||
getArtistAlbumsUrl: '@_urlService.GetRelativeUrl(WebRoutes.Music.GET_ARTIST_ALBUMS)',
|
||||
getAlbumTracksUrl: '@_urlService.GetRelativeUrl(WebRoutes.Music.GET_ALBUM_TRACKS)',
|
||||
// The full album details, used by the expanded player for the release labels and the artwork carousel of the
|
||||
// current track's album. The route carries the artist and album Ids, and the library Id is a query parameter.
|
||||
getAlbumUrl: '@_urlService.GetRelativeUrl(WebRoutes.Music.GET_ALBUM)',
|
||||
// The endpoint that draws a uniformly random batch of tracks of a library, artist or album. The server samples the
|
||||
// database, so a shuffle of a large library never has to enumerate its albums and tracks in the browser.
|
||||
shuffleTracksUrl: '@_urlService.GetRelativeUrl(WebRoutes.Music.SHUFFLE_TRACKS)',
|
||||
strings: {
|
||||
play: '@localizer["AudioPlayerPlay"]',
|
||||
pause: '@localizer["AudioPlayerPause"]',
|
||||
@@ -60,16 +66,12 @@
|
||||
buffering: '@localizer["AudioPlayerBuffering"]',
|
||||
previous: '@localizer["AudioPlayerPrevious"]',
|
||||
next: '@localizer["AudioPlayerNext"]',
|
||||
shuffle: '@localizer["AudioPlayerShuffle"]',
|
||||
shuffleOff: '@localizer["AudioPlayerShuffleOff"]',
|
||||
shuffleRelease: '@localizer["AudioPlayerShuffleRelease"]',
|
||||
shuffleArtist: '@localizer["AudioPlayerShuffleArtist"]',
|
||||
shuffleLibrary: '@localizer["AudioPlayerShuffleLibrary"]',
|
||||
repeat: '@localizer["AudioPlayerRepeat"]',
|
||||
repeatOff: '@localizer["AudioPlayerRepeatOff"]',
|
||||
repeatAll: '@localizer["AudioPlayerRepeatAll"]',
|
||||
repeatOne: '@localizer["AudioPlayerRepeatOne"]',
|
||||
queue: '@localizer["AudioPlayerQueue"]'
|
||||
queue: '@localizer["AudioPlayerQueue"]',
|
||||
albumArtwork: '@localizer["AudioPlayerAlbumArtwork"]'
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user