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

Add M3U format #3998

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Add M3U format #3998

wants to merge 10 commits into from

Conversation

boyska
Copy link

@boyska boyska commented Mar 5, 2024

fixes #3995

this is especially useful for podcasts.

@boyska boyska marked this pull request as ready for review March 5, 2024 18:55
@boyska boyska changed the title M3u format Add M3U format Mar 5, 2024
@dvikan
Copy link
Contributor

dvikan commented Mar 6, 2024

pls put all code inside a single class

@boyska
Copy link
Author

boyska commented Mar 7, 2024

pls put all code inside a single class

can I ask you what's the rationale for this? While I can see how moving parse_duration() inside a class can enhance encapsulation (did that in 2597cff), I think that exploding M3uItem into a set of methods and private variables will result in code that is harder to read, understand and maintain.

But I'm not particularly good at PHP, so maybe you have suggestions for how to keep the code well encapsulated, while having the same benefit of "all code in a single class".

@dvikan
Copy link
Contributor

dvikan commented Mar 7, 2024

php does not have modules like python does.

your previous function parse_duration was defined in global namespace.

also it's my subjective preference to have code closer together and not spread out.

i'd prefer you drop M3uItem and inline all code inside M3uFormat.

@boyska
Copy link
Author

boyska commented Mar 7, 2024

i'd prefer you drop M3uItem and inline all code inside M3uFormat.

like this? 266a6c0

if you think this is still not right, just tell me: I'm eager to learn :)

@boyska
Copy link
Author

boyska commented Mar 21, 2024

gentle ping :)

@dvikan
Copy link
Contributor

dvikan commented Mar 31, 2024

yes still thinking about this.

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

Successfully merging this pull request may close these issues.

New format: M3U playlist
2 participants