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 more stream URLs #4

Open
yuvadm opened this issue Oct 2, 2019 · 15 comments
Open

Add more stream URLs #4

yuvadm opened this issue Oct 2, 2019 · 15 comments
Labels

Comments

@yuvadm
Copy link
Member

yuvadm commented Oct 2, 2019

This is a pretty broad issue aimed at anyone who wants to take a stab at getting started with creating pull requests during Hacktoberfest

What do you need to do to collaborate on streamlib? Easy:

  1. Create a new TOML file in the library directory
  2. Add some entries from your favorite audio or video streams (look at the README for the specification, or at the other files for examples)
  3. If you really feel like it you can build and run streamlib (again, see README) to make sure your newly added streams are available and working
  4. Open a pull request with your addition
@lunchboxav
Copy link

Hi there, I'm trying to tackle this issue. However, when running streamlib according to the README, I got into this error:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:997:5

I tried updating Rust to the latest stable, but still no good. Do you know what caused this?

@yuvadm
Copy link
Member Author

yuvadm commented Oct 5, 2019

@lunchboxav sorry about that! I did a large refactoring on the codebase yesterday and split the actual library out to a separate repository - https://github.com/streamlib/library so the old instructions are incorrect.

The new workflow should be something like this:

$ git clone https://github.com/streamlib/streamlib
$ git clone https://github.com/streamlib/library
# add any files you want to the library
$ cd streamlib
$ cargo run -- --library ../library groove

Can you try that and let me know how it goes?

@lunchboxav
Copy link

hi @yuvadm unfortunately, I still got the similar error. I can load the library though, but not playing the file.

Here's the complete output:

Loaded 175 stream entries...
Starting player process
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:1084:5

@yuvadm
Copy link
Member Author

yuvadm commented Oct 5, 2019

It's possible you don't have mpv installed. Can you try running with -p vlc or any other player you might have installed?

I should add a proper error for this!

@lunchboxav
Copy link

unfortunately, the error persists. I have both MPV and VLC, running the command with flag for vlc still doesn't work either. I'm using Mac, could that be any issue there?

@yuvadm
Copy link
Member Author

yuvadm commented Oct 5, 2019

Can you run with RUST_BACKTRACE=1 cargo run -- .... and report the exact error?

@lunchboxav
Copy link

alright, here's the complete backtrace

stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /Users/vsts/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.34/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /Users/vsts/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.34/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:47
   3: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:36
   4: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:200
   5: std::panicking::default_hook
             at src/libstd/panicking.rs:214
   6: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:477
   7: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:384
   8: rust_begin_unwind
             at src/libstd/panicking.rs:311
   9: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
  10: core::result::unwrap_failed
             at src/libcore/result.rs:1084
  11: core::result::Result<T,E>::unwrap
             at /rustc/625451e376bb2e5283fc4741caa0a3e8a2ca4d54/src/libcore/result.rs:852
  12: streamlib::player::Player::play
             at src/player.rs:44
  13: streamlib::main
             at src/main.rs:68
  14: std::rt::lang_start::{{closure}}
             at /rustc/625451e376bb2e5283fc4741caa0a3e8a2ca4d54/src/libstd/rt.rs:64
  15: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:49
  16: std::panicking::try::do_call
             at src/libstd/panicking.rs:296
  17: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:80
  18: std::panicking::try
             at src/libstd/panicking.rs:275
  19: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  20: std::rt::lang_start_internal
             at src/libstd/rt.rs:48
  21: std::rt::lang_start
             at /rustc/625451e376bb2e5283fc4741caa0a3e8a2ca4d54/src/libstd/rt.rs:64
  22: streamlib::main

Is this Rust-version specific error?

@yuvadm
Copy link
Member Author

yuvadm commented Oct 5, 2019

This isn't rust specific at all, this has to do with attempting to run the external process which for some reason isn't found.

Can you please do the following:

  1. git pull and run again, no need for backtrace, I added proper error handling
  2. Open a terminal and make sure mpv and/or vlc are executable from command line?

@lunchboxav
Copy link

Ok, I'm not sure why VLC can't be run from command line, though I've added it using alias. Let me take another shot. Thanks for the new error message though :D

@yuvadm
Copy link
Member Author

yuvadm commented Oct 5, 2019

I think the alias is why it isn't working. Try adding VLC to your PATH:

$ export PATH=/path/to/vlc/directory/:$PATH
$ cargo run -- whatever

Thanks for the help and patience with debugging 😄

@lunchboxav
Copy link

ah, adding VLC to PATH still doesn't work, though I can execute vlc from command line and it would pop up just fine.

however, I decided to reinstall MPV using brew and not streamlib works without the -p vlc 😀

@yuvadm
Copy link
Member Author

yuvadm commented Oct 5, 2019

Awesome, mpv is a much better player anyway 😉

Thanks for testing things out! Let me know if you find any other bugs or have suggestions on how to improve, I'm really looking forward to more feedback.

@lunchboxav
Copy link

Will do! :) This is a nice project though, now I have something to do while working in Terminal without having to resort to opening Spotify 😆

@lunchboxav
Copy link

hi @yuvadm I've created my own .toml library. question is, should I PR to this repo, or to the library repo?

@yuvadm
Copy link
Member Author

yuvadm commented Oct 5, 2019

@lunchboxav go ahead and make a PR against the library repo, there are no more TOMLs in this repo since the split

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants