Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Rename "length" key for music.yaml parsing #110

Open
NikoofDeath opened this issue Aug 6, 2020 · 1 comment
Open

Rename "length" key for music.yaml parsing #110

NikoofDeath opened this issue Aug 6, 2020 · 1 comment

Comments

@NikoofDeath
Copy link

Currently, both aoprotocol and tsuserver refer to the parameter used to determine looping as "length" (and looks for "length" in music.yaml)

name, length = self.server.get_song_data(self.server.music_list, args[0])

return song['name'], song['length']

However, once the song reaches play_music, the parameter becomes "loop", and then becomes "looping" in courtroom on the client, and again becomes "loop" in aomusicplayer
def play_music(self, name, cid, loop=0, showname="", effects=0):

I understand looking for "length" in music.yaml, to keep compatibility with old music.yaml files that used that to indicated looping, but I believe it should look for a "loop" parameter first (and that should be the encouraged choice going forward), and be referred to as such in the code, to prevent confusion. (This also goes for making the naming in courtroom.cpp and aomusicplayer.cpp consistent for the client code).

@Crystalwarrior
Copy link
Contributor

👍, I wanted to do this but kind of ran out of time due to deadlines.
Length will still be supported but the intended parameter will become loop

Crystalwarrior referenced this issue in Crystalwarrior/KFO-Server Feb 11, 2022
* Basic backporting

* Finish backporting

* Update date
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants