Skip to content

Holyrics Update v2.22.0 #9

Description

@holyrics

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.


  • Countdown Current Time

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
    }

  • Verse Presentation

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.


  • Script Info - ID

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions