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

yt-dlp flag breaks compile #31

Closed
bburdette opened this issue Oct 11, 2022 · 2 comments
Closed

yt-dlp flag breaks compile #31

bburdette opened this issue Oct 11, 2022 · 2 comments

Comments

@bburdette
Copy link

I want to use this crate to download videos. I added it to my Cargo.toml like so:

youtube_dl = { version = "0.7.0", features = ["yt-dlp"] }

But then I get this compile error:

   Compiling youtube_dl v0.7.0
error[E0124]: field `filesize_approx` is already declared
  --> /home/bburdette/.cargo/registry/src/github.com-1ecc6299db9ec823/youtube_dl-0.7.0/src/model.rs:41:5
   |
39 |     pub filesize_approx: Option<String>,
   |     ----------------------------------- `filesize_approx` first declared here
40 |     #[cfg(feature = "yt-dlp")]
41 |     pub filesize_approx: Option<f64>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field already declared

error[E0124]: field `filesize_approx` is already declared
   --> /home/bburdette/.cargo/registry/src/github.com-1ecc6299db9ec823/youtube_dl-0.7.0/src/model.rs:218:5
    |
216 |     pub filesize_approx: Option<String>,
    |     ----------------------------------- `filesize_approx` first declared here
217 |     #[cfg(feature = "yt-dlp")]
218 |     pub filesize_approx: Option<f64>,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field already declared

For more information about this error, try `rustc --explain E0124`.
error: could not compile `youtube_dl` due to 2 previous errors
[Finished running. Exit status: 101]
@NULLx76
Copy link

NULLx76 commented Oct 17, 2022

you need to make sure you don't have default features enable, e.g. include it in your Cargo.toml like so:

youtube_dl = { version = "0.7.0", default-features = false, features = ["yt-dlp"] }

Otherwise it includes the youtube-dl feature as well, and those conflict.

@bburdette
Copy link
Author

thx, I did figure it out eventually. some docs would be cool. went with just running it myself for now as I'm more interested in the videos and not the metadata.

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

No branches or pull requests

2 participants