LCD Display Output

Version of OpenLP
2_4_5
Operating system
Other Linux
I have been experimenting with a LCD on a Raspberry PI and am looking at displaying the songs in the service list on it.

Can someone point me in the right direction in what file to look at to access the data required for the songs in the sevice list?

Thanks

Comments

  • you can try remote plugin api
    localhost:4316/api/service/list

    check description in openlp/plugins/remotes/lib/httprouter.py



  • Thanks will look later to see if that will help  :)
  • Just looked at that, I will need to do more investigation about picking the relevant items from the returned list has only need the title and selected fields so can identify the current item on the live screen. From what I've read so far it looks like need to use JSON library in python to do this
  • Have come up with the following code to extract the current song from the service list that is live on the screen :-

    #!/usr/bin/python

    import os
    import urllib2
    import json
    url="http://localhost:4316/api/service/list"
    song_title="empty"
    while True:
     wjdata = json.load(urllib2.urlopen(url))
     count=0
     while count<>len (wjdata['results']['items']):
      if wjdata['results']['items'][count]['plugin'] <> 'presentations':
       if wjdata['results']['items'][count]['selected'] == True:
        if song_title<>wjdata['results']['items'][count]['title']:
         print wjdata['results']['items'][count]['plugin']
         print wjdata['results']['items'][count]['title']
         print wjdata['results']['items'][count]['selected']
         song_title=wjdata['results']['items'][count]['title']  
       count=count+1
      if len (wjdata['results']['items'])==0:
       print 'No items in service list'
    The only downside is that if need to put a song direct to the live screen rather than adding it to the service, which in our church happens often when worship team throw in extra songs that are not on the service list it is not picked up by the above script. From what I can see the live screen doesn't return a JSON list in a similar way.

    But it is a start though.

    If anybody has any further input on extracting the song title from the live screen please feel free to reply !
  • edited February 22
  • Thanks that is good to know it already been mentioned.
Sign In or Register to comment.