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

prefix links in m3u-files with host+port of the node to allow for local playback with arbitrary keys #691

Merged
merged 49 commits into from
Nov 27, 2020

Conversation

ArneBab
Copy link
Contributor

@ArneBab ArneBab commented Jan 29, 2020

This leaks host+port of the node into the file,
but otherwise we would not be able to support arbitrary keys:
we would have to stick to files within the same prefix (i.e. SSK@…/) as the m3u file.

@ArneBab
Copy link
Contributor Author

ArneBab commented Jun 1, 2020

^ this gives me working m3u playlists over Freenet, usable like normal web-radio. It should get us to the point where we can live-stream audio.

@ArneBab ArneBab requested a review from Bombe June 2, 2020 15:29
src/freenet/client/filter/M3UFilter.java Outdated Show resolved Hide resolved
@ArneBab
Copy link
Contributor Author

ArneBab commented Aug 16, 2020

Here’s an example with all working keys:

USK@sDzl0PU80nmJrgyx2kRtXROaAfgYa8~cQQXCIblGQWw,6WvK00wFVFfky60q9kEmFxUi3t9fL3RV18dgswGbcU0,AQACAAE/freenet-stream-mp3s/6/stream.m3u?type=text/plain

With this change you can now actually play the stream with
mpv http://localhost:8888/freenet:USK@sDzl0PU80nmJrgyx2kRtXROaAfgYa8~cQQXCIblGQWw,6WvK00wFVFfky60q9kEmFxUi3t9fL3RV18dgswGbcU0,AQACAAE/freenet-stream-mp3s/7/stream.m3u

…al playback with arbitrary keys.

This leaks host+port of the node into the file,
but otherwise we would not be able to support arbitrary keys:
we would have to stick to files within the same prefix (i.e. SSK@…/) as the m3u file.
@ArneBab ArneBab force-pushed the m3u-with-host-and-port branch from 33dc7c2 to 9a8cf09 Compare August 16, 2020 18:20
@ArneBab ArneBab requested a review from Bombe August 20, 2020 21:53
@ArneBab
Copy link
Contributor Author

ArneBab commented Aug 20, 2020

To simplify review, disable display of whitespace changes. IntelliJ auto-cleaned up a lot of empty-except-for-spaces lines.

@Bombe
Copy link
Contributor

Bombe commented Aug 26, 2020

To simplify review, disable display of whitespace changes. IntelliJ auto-cleaned up a lot of empty-except-for-spaces lines.

Yeah, don’t do any large formatting changes in the middle of a whole bunch of changes, this will make this quite unhandy to review…

@ArneBab
Copy link
Contributor Author

ArneBab commented Aug 26, 2020

Those formatting changes came in unintentionally via IntelliJ auto-fixes and are pretty hard to undo after the commit is done :-/

I could try a rebase -i with squash and edit, but I’m not sure that that will make it easier.

Copy link
Contributor

@Bombe Bombe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not completely done, will review more tomorrow!

src/freenet/client/FetchContext.java Outdated Show resolved Hide resolved
src/freenet/client/FetchContext.java Outdated Show resolved Hide resolved
src/freenet/clients/http/FProxyToadlet.java Outdated Show resolved Hide resolved
src/freenet/client/FetchContext.java Show resolved Hide resolved
src/freenet/client/async/ClientGetWorkerThread.java Outdated Show resolved Hide resolved
src/freenet/client/filter/ContentFilter.java Outdated Show resolved Hide resolved
src/freenet/client/filter/FilterCallback.java Show resolved Hide resolved
src/freenet/client/filter/GenericReadFilterCallback.java Outdated Show resolved Hide resolved
src/freenet/client/filter/M3UFilter.java Outdated Show resolved Hide resolved
src/freenet/client/async/USKRetriever.java Outdated Show resolved Hide resolved
src/freenet/client/filter/M3UFilter.java Show resolved Hide resolved
src/freenet/node/NodeClientCore.java Outdated Show resolved Hide resolved
test/freenet/client/filter/CSSParserTest.java Show resolved Hide resolved
test/freenet/client/filter/ContentFilterTest.java Outdated Show resolved Hide resolved
test/freenet/client/filter/JPEGFilterTest.java Outdated Show resolved Hide resolved
test/freenet/client/filter/M3UFilterTest.java Outdated Show resolved Hide resolved
src/freenet/client/FetchContext.java Show resolved Hide resolved
src/freenet/client/async/SingleFileFetcher.java Outdated Show resolved Hide resolved
src/freenet/client/filter/M3UFilter.java Show resolved Hide resolved
src/freenet/clients/http/FProxyToadlet.java Show resolved Hide resolved
@ArneBab ArneBab requested a review from Bombe September 12, 2020 21:32
src/freenet/client/FetchContext.java Outdated Show resolved Hide resolved
src/freenet/client/filter/ContentFilter.java Outdated Show resolved Hide resolved
src/freenet/client/filter/ContentFilter.java Outdated Show resolved Hide resolved
src/freenet/clients/http/staticfiles/js/progresspage.js Outdated Show resolved Hide resolved
src/freenet/pluginmanager/OfficialPlugins.java Outdated Show resolved Hide resolved
src/freenet/support/MultiValueTable.java Outdated Show resolved Hide resolved
test/freenet/client/filter/ContentFilterTest.java Outdated Show resolved Hide resolved
test/freenet/client/filter/PNGFilterTest.java Outdated Show resolved Hide resolved
ArneBab added a commit that referenced this pull request Nov 14, 2020
ArneBab added a commit that referenced this pull request Nov 14, 2020
ArneBab added a commit that referenced this pull request Nov 14, 2020
ArneBab added a commit that referenced this pull request Nov 14, 2020
Copy link
Contributor

@Bombe Bombe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We’re nearing the end of it! :)

@ArneBab ArneBab force-pushed the m3u-with-host-and-port branch from 11ccbaa to 6d8fc55 Compare November 25, 2020 17:19
Copy link
Contributor

@Bombe Bombe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks good! Is there already a ticket for the next changes in the header-parsing code? As soon as there is, this is good to go, IMHO.

@ArneBab
Copy link
Contributor Author

ArneBab commented Nov 27, 2020

There’s no ticket for the next changes, but a pull-request: #716

@ArneBab ArneBab merged commit 2178f38 into next Nov 27, 2020
@ArneBab
Copy link
Contributor Author

ArneBab commented Nov 27, 2020

Thank you for helping me make this work! You’re awesome!

@Bombe
Copy link
Contributor

Bombe commented Nov 27, 2020

There’s no ticket for the next changes, but a pull-request: #716

Even better! :)

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