Hi,
Yesterday version 2.22.0 of the Holyrics program was made available, and some changes were made that I reported previously due to some implementations made here in the Companion.
Note: I have not yet updated the API Server documentation with the updates.
The current_time field has been added when the current presentation is type=countdown
In the extractCountdownTimeFromPresentation method it is possible to add
function extractCountdownTimeFromPresentation(p) {
if (p == null
|| (p.type != 'unknown' && p.type != 'countdown')
|| (p.slide_number != 1 || p.total_slides != 1)
|| p.slides == null ) {
return null
}
//v2.22.0
if (p.type == 'countdown' && p.current_time != null) {
return p.current_time;
}
//fallback for backwards compatibility
var rows = p.slides[0].text.split("\n")
if (rows.length != 2 && rows.length != 3) {
return null
}
var row = (rows.length == 2) ? rows[0] : rows[1]
var regex = /^[\d:.]*$/
return regex.test(row) ? row : null
}
A verse presentation now returns the slide_number and total_slides fields, as well as the slide_type field compatible with default | wallpaper | blank | black
Also returns the slides field (array) if it is a specific sequence of verses that is being displayed.
Example:
{
...
slides: [
{ number: 1, reference: "John 3:16" },
{ number: 2, reference: "John 3:17" },
{ number: 3, reference: "John 3:18" }
]
}
If it is a simple verse presentation, where "all" verses are displayed (there is no limit to forward and backward), then the slides field will return an empty array.
Regarding the IDs displayed in the Script Info option, I changed the window to display the item ID information twice, once with quotes and once without quotes, and then the user can specifically copy the corresponding ID, with or without quotes.
- MediaPlayer Settings - Volume
The problem of not identifying the volume parameter sent in the PlayAudio and PlayVideo settings has been fixed
- Show Next/Previous Media/Song Playlist
I improved the working of the native "display next item in media playlist" functionality (it was buggy and unstable before)
I added display previous item, and also the option to get the previous item or next item, so it can be used as a preview.
The corresponding actions on the API-Server are:
Song Playlist
self.do_command('GetPreviousSongPlaylist', {})
self.do_command('GetNextSongPlaylist', {})
return example
{
"status": "ok",
"data": Lyrics Object
}
Note: data can be null if there is no previous item or if there is no next item
In this case, it is an object of the Lyrics class Lyrics Object
It is possible to use data.title as a label on any "next song" button
Media Playlist
self.do_command('GetPreviousMediaPlaylist', {})
self.do_command('GetNextMediaPlaylist', {})
return example
{
"status": "ok",
"data": Item Object
}
Note: data can be null if there is no previous item or if there is no next item
In this case, it is an object of the Item class Item Object
It is possible to use data.name as a label on any "next item" button
The respective actions
The action has no parameters
self.do_command('ShowPreviousSongPlaylist', {})
self.do_command('ShowNextSongPlaylist', {})
self.do_command('ShowPreviousMediaPlaylist', {})
self.do_command('ShowNextMediaPlaylist', {})
Note: As these actions are new, you must open the permission management panel in the API Server settings and allow these new actions for the token configured in the Holyrics module in Companion
Thanks!
Hi,
Yesterday version 2.22.0 of the Holyrics program was made available, and some changes were made that I reported previously due to some implementations made here in the Companion.
Note: I have not yet updated the API Server documentation with the updates.
The
current_timefield has been added when the current presentation istype=countdownIn the
extractCountdownTimeFromPresentationmethod it is possible to addA verse presentation now returns the
slide_numberandtotal_slidesfields, as well as theslide_typefield compatible withdefault | wallpaper | blank | blackAlso returns the
slidesfield (array) if it is a specific sequence of verses that is being displayed.Example:
If it is a simple verse presentation, where "all" verses are displayed (there is no limit to forward and backward), then the
slidesfield will return an empty array.Regarding the IDs displayed in the
Script Infooption, I changed the window to display the item ID information twice, once with quotes and once without quotes, and then the user can specifically copy the corresponding ID, with or without quotes.The problem of not identifying the volume parameter sent in the PlayAudio and PlayVideo settings has been fixed
I improved the working of the native "display next item in media playlist" functionality (it was buggy and unstable before)
I added display previous item, and also the option to get the previous item or next item, so it can be used as a preview.
The corresponding actions on the API-Server are:
Song Playlist
return example
Note:
datacan benullif there is no previous item or if there is no next itemIn this case, it is an object of the Lyrics class Lyrics Object
It is possible to use
data.titleas a label on any "next song" buttonMedia Playlist
return example
Note:
datacan benullif there is no previous item or if there is no next itemIn this case, it is an object of the Item class Item Object
It is possible to use
data.nameas a label on any "next item" buttonThe respective actions
The action has no parameters
Note: As these actions are new, you must open the permission management panel in the API Server settings and allow these new actions for the token configured in the Holyrics module in Companion
Thanks!