songselect

The songselect module contains the SongSelect importer itself.

class openlp.plugins.songs.lib.songselect.SongSelectImport(db_manager)[source]

Bases: object

The SongSelectImport class contains all the code which interfaces with CCLI’s SongSelect service and downloads the songs.

get_song(song, callback=None)[source]

Get the full song from SongSelect

Parameters:
  • song – The song dictionary to update
  • callback – A callback which can be used to indicate progress
Returns:

The updated song dictionary

login(username, password, callback=None)[source]

Log the user into SongSelect. This method takes a username and password, and runs callback() at various points which can be used to give the user some form of feedback.

Parameters:
  • username – SongSelect username
  • password – SongSelect password
  • callback – Method to notify of progress.
Returns:

True on success, False on failure.

logout()[source]

Log the user out of SongSelect

save_song(song)[source]

Save a song to the database, using the db_manager

Parameters:song
Returns:
search(search_text, max_results, callback=None)[source]

Set up a search.

Parameters:
  • search_text – The text to search for.
  • max_results – Maximum number of results to fetch.
  • callback – A method which is called when each song is found, with the song as a parameter.
Returns:

List of songs

stop()[source]

Stop the search.