Skip to content

Commit bca7147

Browse files
chore(docs): update code docs
1 parent 59aa80a commit bca7147

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

docs/data/search.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/module-items.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/source_api_items.bs.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,22 @@
478478
' @param {string} itemId - The Audio item ID
479479
' @returns {dynamic} LyricDto: { Metadata: {...}, Lyrics: [{Start: ticks, Text: string}] }, or invalid
480480
function GetItemLyrics(itemId as string) as dynamic
481+
if not supportsLyrics() then return invalid
481482
return fetchJson(GetApi().BuildGetItemLyricsRequest(itemId), "lyrics")
482483
end function
483484

485+
' supportsLyrics: Checks if the connected Jellyfin server supports the Lyrics API.
486+
'
487+
' The /Audio/{itemId}/Lyrics endpoint was introduced in Jellyfin 10.9.0.
488+
' Servers below 10.9.0 do not have this endpoint and will return 404. Guarding
489+
' the request mirrors supportsMediaSegments() (source/utils/mediaSegments.bs) and
490+
' lets the endpoint-availability ledger record this as a validated version-guard.
491+
'
492+
' @returns {boolean} - true if server supports lyrics
493+
function supportsLyrics() as boolean
494+
return versionChecker(m.global.server.version, "10.9.0")
495+
end function
496+
484497
function BackdropImage(id as string)
485498
' Use UI resolution for backdrop images
486499
localDevice = m.global.device

0 commit comments

Comments
 (0)