Skip to content

add optional OnBrowseDirectChildren and OnBrowseMetadata interfaces #95

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

Merged
merged 2 commits into from
May 31, 2022

Conversation

tsynik
Copy link
Contributor

@tsynik tsynik commented May 25, 2022

This PR add ability to use external functions to serve dlna content. No changes to current logic if not defined.

@anacrolix anacrolix merged commit b445a5a into anacrolix:master May 31, 2022
@anacrolix
Copy link
Owner

Any way to do this by just having the new fields set to the defaults by default?

@tsynik
Copy link
Contributor Author

tsynik commented May 31, 2022

Any way to do this by just having the new fields set to the defaults by default?

We use those in TorrServer to serve torrents from DB via DLNA - there is no actual filesystem so it's layer to generate needed objects.

@anacrolix
Copy link
Owner

Ah yeah no worries, I mean can the default implementations (the ones used if the fields are nil) be set as the default further up during initialization or is that too difficult (like the existing API use doesn't require using a default initializer/constructor already where we can put it)?

@tsynik
Copy link
Contributor Author

tsynik commented May 31, 2022

Ah yeah no worries, I mean can the default implementations (the ones used if the fields are nil) be set as the default further up during initialization or is that too difficult (like the existing API use doesn't require using a default initializer/constructor already where we can put it)?

You mean full rewrite of Handle(action string, argsXML []byte, r *http.Request) function without those interfaces? Matt, I'm not a go guru as you ;-) The idea of this PR was use upstream not fork in downstream project.

@anacrolix
Copy link
Owner

All good, thanks for the contribution.

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.

2 participants