swingmusic icon indicating copy to clipboard operation
swingmusic copied to clipboard

Pullout pydub into own module

Open michilyy opened this issue 7 months ago • 3 comments

pydub is markes as semi depricated see IS PYDUB REPO DEAD?

When we want to keep our own copy of pydub, we should either embed it directly into swingmusic or pull it out into its own module. The meta-files should not be kept if we embed it.

We could also switch to pydub-ng which has already done some merges.

What kind of change does this PR introduce? (check at least one)

  • [ ] Bugfix
  • [ ] Feature
  • [ ] Code style update
  • [x] Refactor
  • [ ] Build-related changes
  • [x] Other, please describe:

michilyy avatar Jun 03 '25 10:06 michilyy

Hey @michilyy

Maybe we can replace Pydub with this?

https://github.com/POZAlabs/pydub

cwilvx avatar Jun 06 '25 15:06 cwilvx

Hey @michilyy

Maybe we can replace Pydub with this?

https://github.com/POZAlabs/pydub Hello @cwilvx

I looked into the replacement. From my understanding, all needed functions seem to be there and work like we're used to.

POZAlabs pydub fork includes Cython code. Which needs to be compiled. He doesn't provide any wheels, so we have to do the compilation when installing it. When building with Github Actions and pyinstaller that should not cause any problems. Or at least i don't know about any problems.

I don't want to decide this on my own. Would it be possible to create poll?

michilyy avatar Jun 10 '25 08:06 michilyy

I updated the branch with the current master.

I would just pull-out pydub in this pull request and not more. By doing so we can more easily switch to a new pydub version without having to update any swingmusic internal files. aka switch to a newer version of pydub later not now.

While testing I run into a bug with swingmusic/lib/trackslib.py:get_leading_silenhce_end: When playing opus files from_files raises am exception because of unknown format opus. I just removed the format parameter and it works now. @cwilvx could you please tell me why we pass the format explicit?

michilyy avatar Oct 23 '25 20:10 michilyy