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

Option to select a specific file #26

Open
nochso opened this issue Feb 20, 2016 · 5 comments
Open

Option to select a specific file #26

nochso opened this issue Feb 20, 2016 · 5 comments

Comments

@nochso
Copy link
Contributor

nochso commented Feb 20, 2016

Some ideas:

  • Add a whitelist for video file extensions
  • If only one video is found, only that is downloaded.
  • If several videos are found, it depends on what the default should be:
    • Either the user is asked to select one
    • or keep downloading the largest video. But then add a new option -select-file to allow overriding.
@Sioro-Neoku
Copy link
Owner

I'm a bit concerned about over-complicating the selection part, as it is really neat now, and having to select a file comes up very rarely.
The biggest issue that I see is a user-friendly way to select the desired file(s).

In any case, peerflix does this, so we might get some ideas from it: https://github.com/mafintosh/peerflix/blob/master/index.js#L53

@nochso
Copy link
Contributor Author

nochso commented Feb 21, 2016

I'm a bit concerned about over-complicating the selection part, as it is really neat now, and having to select a file comes up very rarely.

In that case, I'd be ok with only a bool-flag -select-file to override the default "largest file". The file extension whitelist is not needed then.

The biggest issue that I see is a user-friendly way to select the desired file(s).

I was thinking of something simple like:

$ go-peerflix -select-file <link>
...

Files found in torrent:
0: File1.mkv
1: File2.mkv
...
20: File21.mkv

Enter # (0-20) of the file you want to play: _

That way the default behavior is kept and you can override it if needed.

@Sioro-Neoku
Copy link
Owner

If we go in that direction, it might worth to port the whole ui to termui, and implement the selector there.

This would help on other areas as well, as logging sucks because the screen refresh erases the written log messages, and less than a second is rarely enough to understand these messages. (On the other hand they are rarely actionable, but at the very least they are a visual annoyance now.)

@nochso
Copy link
Contributor Author

nochso commented Feb 22, 2016

termui looks quite nice. Alternatively you could pause the refresh while asking for input.

@nochso
Copy link
Contributor Author

nochso commented Mar 7, 2016

On second thought, termui seems more specialized towards being a dashboard. gocui might be an alternative.

nochso added a commit to nochso/go-peerflix that referenced this issue Jan 20, 2017
- The HTTP handler now returns a Reader for a file within the torrent
  as specified by the request URI.
- If there are multiple videos, the user is asked to select one.
- In any case video players now request specific files instead of just the root directory.

Fixes Sioro-Neoku#26 Sioro-Neoku#36
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 a pull request may close this issue.

2 participants