Skip to content

add optional OnBrowseDirectChildren and OnBrowseMetadata interfaces - #95

Merged
anacrolix merged 2 commits into
anacrolix:masterfrom
tsynik:syncupstream
May 31, 2022
Merged

anacrolix merged 2 commits into
anacrolix:masterfrom
tsynik:syncupstream

Conversation

@tsynik

@tsynik tsynik commented May 25, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Owner

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

@tsynik

tsynik commented May 31, 2022 •

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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

tsynik commented May 31, 2022 •

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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