Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash after connectig via Bluetooth #8

Open
Orestos opened this issue Feb 20, 2022 · 3 comments
Open

Crash after connectig via Bluetooth #8

Orestos opened this issue Feb 20, 2022 · 3 comments

Comments

@Orestos
Copy link

Orestos commented Feb 20, 2022

Script crash after connecting via Bluetooth,
After stopping the Service and trying to start the script manually i get this:

Traceback (most recent call last):
  File "/home/pi/TFT-MoodeCoverArt/tft_moode_coverart.py", line 398, in <module>
    main()
  File "/home/pi/TFT-MoodeCoverArt/tft_moode_coverart.py", line 240, in main
    moode_meta = getMoodeMetadata(filename)
  File "/home/pi/TFT-MoodeCoverArt/tft_moode_coverart.py", line 143, in getMoodeMetadata
    metaDict['coverurl'] = urllib.parse.unquote(metaDict['coverurl'])
KeyError: 'coverurl'

After disconneting bluetooth i can start the script without problems.
i checked if the metafile would be updated and it is - i think there is a problem with this script.

@Orestos Orestos closed this as completed Feb 20, 2022
@Orestos Orestos reopened this Feb 20, 2022
@Orestos
Copy link
Author

Orestos commented Feb 20, 2022

Same problem as connecting via Spotify

@Orestos
Copy link
Author

Orestos commented Feb 20, 2022

Isue ist somewhere in line 143

metaDict['coverurl'] = urllib.parse.unquote(metaDict['coverurl'])

i commented it out and it went well - without display cover anymore.

@Orestos
Copy link
Author

Orestos commented Feb 21, 2022

solution: i moved the line metaDict['coverurl'] = urllib.parse.unquote(metaDict['coverurl']) down to line 165 and did:

if metaDict['source'} == 'radio': metaDict['coverurl'] = urllib.parse.unquote(metaDict['coverurl'])

now it runs very well :)

my first time doing something in python, so i dont know if everythins is nice.
perhaps source library didn't work that way, but i dont use it. only Radio, Bluetooth, spotify and snapclient :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant