MiczFlor / RPi-Jukebox-RFID

A Raspberry Pi jukebox, playing local music, podcasts, web radio and streams triggered by RFID cards, web app or home automation. All plug and play via USB. GPIO scripts available.
http://phoniebox.de
MIT License
1.3k stars 394 forks source link

fix: Fix broken utils.get_config_action invocations #2339

Closed hoffie closed 2 months ago

hoffie commented 2 months ago

2326 contained broken invocations of utils.get_config_action(). This PR fixes them.

While I did point out that we need another round of testing after adding the additional changes, I wasn't able to perform that before merging. Maybe I should have set the PR to Draft status again. ;) I've tested the changes now and found those issues.

Apr 14 22:34:05 phoniebox bash[1129]:   File "/home/phoniebox/RPi-Jukebox-RFID/src/jukebox/components/playermpd/__init__.py", line 161, in __init__
Apr 14 22:34:05 phoniebox bash[1129]:     self.end_of_playlist_next_action = utils.get_config_action(cfg,
Apr 14 22:34:05 phoniebox bash[1129]:                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Apr 14 22:34:05 phoniebox bash[1129]: TypeError: get_config_action() missing 1 required positional argument: 'logger'

(missing parameter default in all three invocations)

Apr 14 22:38:08 phoniebox bash[1175]:   File "/home/phoniebox/RPi-Jukebox-RFID/src/jukebox/components/playermpd/__init__.py", line 175, in __init__
Apr 14 22:38:08 phoniebox bash[1175]:     self.stopped_next_action = utils.get_current_song(cfg,
Apr 14 22:38:08 phoniebox bash[1175]:                                ^^^^^^^^^^^^^^^^^^^^^^
Apr 14 22:38:08 phoniebox bash[1175]: AttributeError: module 'jukebox.utils' has no attribute 'get_current_song'

(wrong function name due to auto completion...)

pabera commented 2 months ago

Thanks for the support!