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

Generated playlist files do not work with the following media players: VLC, MPC-HC, PotPlayer, SMPlayer, Foobar, etc.. #2251

Closed
jnxr opened this issue Dec 1, 2024 · 7 comments
Assignees
Labels
Bug Unexpected problem or unintended behavior that needs to be fixed

Comments

@jnxr
Copy link

jnxr commented Dec 1, 2024

System OS

Windows

Python Version

3.13 (CPython)

Install Source

pip / PyPi

Install version / commit hash

4.2.10

Expected Behavior vs Actual Behavior

Just installed 4.2.10.

The playlist files just do not open with any programs.

It has the [time in seconds] and the [title] attributes, but it is missing the path [filename] which is supposed to be on the next line & #EXTM3U tag on the 1st line?

Currently the playlist files generated by 4.2.10 are as below:

#EXTINF:111, Sample artist name - Sample track title
#EXTINF:222, Example Artist name - Example track title

Example code from https://docs.fileformat.com/audio/m3u/
adapted:

#EXTM3U
#EXTINF:111, Sample artist name - Sample track title
SampleMusic.mp3
#EXTINF:222, Example Artist name - Example track title
ExampleMusic.mp3

When I manually formatted the playlist files acc to example above, ie. adding the filenames in the next line following the attributes, & the #EXTM3U tag on line 1, it started working as it was supposed to.

The playlist files of version 4.2.8 and prior contain only filenames in each line and work as intended, but without any attributes.

Steps to reproduce - Ensure to include actual links!

  1. Try loading the playlist to any of the programs
  2. Try opening the generated playlist files in any text editor

Traceback

-

Other details

No response

@jnxr jnxr added the Bug Unexpected problem or unintended behavior that needs to be fixed label Dec 1, 2024
@Silverarmor
Copy link
Member

@PranjalSurana Can you please advise as the author of #2215?
The PR seems to have introduced a multitude of bugs. Might revert the changes if you can't comment on this.
Should have created a new test suite for m3u playlist files cc @xnetcat

@PranjalSurana
Copy link
Contributor

PranjalSurana commented Dec 1, 2024

@Silverarmor I apologize for the inconvenience. I got the issue here, that song path would not get considered if it were in same line, as all the contents in the line would get considered as the path.
I will re-raise the #2215 PR (for issue #2126) with updated changes. I will add a new test suite as well for it

@jnxr
Copy link
Author

jnxr commented Dec 1, 2024

@PranjalSurana seems like line1 is used for attributes and line 2 is used for the path.
Filename from line1 needs to be replaced by [Artist - Title] attribute.

@Silverarmor
Copy link
Member

@PranjalSurana any update here?

@PranjalSurana
Copy link
Contributor

PranjalSurana commented Dec 15, 2024

@Silverarmor When I tried modifying the default path in config for m3u, anything after the new line character was not getting considered. Debugged it and I think create_path_object method is the one that is causing it. Was trying another way to try fix this.
For now, I think temporarily removing the feature until the fix for detecting the paths is found, might help.

@Silverarmor
Copy link
Member

@Silverarmor When I tried modifying the default path in config for m3u, anything after the new line character was not getting considered. Debugged it and I think create_path_object method is the one that is causing it. Was trying another way to try fix this.
For now, I think temporarily removing the feature until the fix for detecting the paths is found, might help.

@PranjalSurana Can you review #2258

Silverarmor added a commit that referenced this issue Jan 16, 2025
# Title
Fix m3u file creation, with correct metadata generation
## Description

## Related Issue
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please link to the issue here: -->
#2251
#2246 

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

Update m3u_test file.
Ran pylint, black and mypy and edited as required.

## Types of Changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing
functionality to change)


## Checklist
Go over all the following points, and put an `x` in all the boxes that
apply.
- [xx] My code follows the code style of this project
- [x] My change requires a change to the documentation
- [ x] I have updated the documentation accordingly
- [ duhh] I have read the [CONTRIBUTING](/docs/CONTRIBUTING.md) document
- [ also duhh] I have read the [CORE VALUES](/docs/CORE_VALUES.md)
document
- [ yes] I have added tests to cover my changes
- [ n/a] All new and existing tests passed
@Silverarmor
Copy link
Member

Should be resolved in v4.2.11. Please test and let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Unexpected problem or unintended behavior that needs to be fixed
Projects
None yet
Development

No branches or pull requests

3 participants