SongSelect Importer Crashes on Import

Bug #1800761 reported by Raoul Snyman
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
Fix Committed
Low
Bob Luursema

Bug Description

--- Exception Traceback ---
Traceback (most recent call last):
  File "openlp/plugins/songs/forms/songselectform.py", line 369, in
on_view_button_clicked
  File "openlp/plugins/songs/forms/songselectform.py", line 203, in _view_song
  File "openlp/plugins/songs/lib/songselect.py", line 216, in get_song
AttributeError: 'NoneType' object has no attribute 'find_all'

This seems to be caused by free accounts, which cannot download lyrics or music. Easy fix would be to check if the object is None and either not display any lyrics, or show an error message that the account is limited.

Related branches

Changed in openlp:
importance: Undecided → Low
milestone: none → 2.9.1
status: New → Confirmed
Revision history for this message
Bob Luursema (bob-luursema) wrote :

Hello, I'd like to contribute to OpenLP so I figured I might take a look at this issue.

I have reproduced the issue, and also found another one. After logging in with my newly created free account OpenLP wrongfully determined I wasn't logged in because it looked for a `input#SearchText` element, but that didn't exist because on the first page there is a question about joining an organization. So I changed the code to account for that situation.

The issue is indeed that a free account can't access most lyrics, but it can access lyrics that are published in the public domain. For the user it would be nice to be able to search just in the public domain in this case. we can add the `List=publicdomain` query parameter to the search to do that. The issue is that I can't find a way to determine what type of account the user has, I can only find the `div.subscriptionlevel` element, but that consists of a translated text, "Gratis" for me (Dutch).

If someone can supply me with the html of `https://songselect.ccli.com/` for a paid account maybe I can figure something out, I hope that the CSS classes will be different for the `div.subscriptionlevel` element.

And another question, I think it would be nice for OpenLP to inform the user that they will only search in the public domain. Is there an example in the codebase for how I might do that? I am not familiar with PyQt.

Changed in openlp:
assignee: nobody → Bob Luursema (bob-luursema)
Changed in openlp:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.