Giter Club home page Giter Club logo

youtube-tui's Introduction

youtube-tui's People

Contributors

fractal-tess avatar jtbx avatar luckyturtledev avatar msrd0 avatar ruixi-rebirth avatar siriusmart avatar zaedus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

youtube-tui's Issues

[feat]: user account

Sorry if this has been discussed or announced anywhere, I just couldn't find any information about it, but is the addition of users' youtube accounts planned? Being able to use a TUI application that supports viewing all of the channels you've subscribed to, playlists you have saved and videos you've liked, as well as being able to do those things inside of it, would be amazing.

crashing on install

i've tried installing via AUR and via Cargo both result in "thread '' panicked at /home/da5id/.cargo/registry/src/index.crates.io-6f17d22bba15001f/youtube-tui-0.8.0/src/global/structs/mpv.rs:28:34:
called Result::unwrap() on an Err value: VersionMismatch { linked: 65644, loaded: 131074 }
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
thread 'main' panicked at /home/da5id/.cargo/registry/src/index.crates.io-6f17d22bba15001f/youtube-tui-0.8.0/src/global/structs/mpv.rs:87:14:
called Result::unwrap() on an Err value: SendError { .. }"

anyone got any ideas?

How to sign in?

Maybe I'm missing something but great work on the project but how do I sign in so i can view my personal recommendations?

MPRIS

Add feature: MPRIS support for control media

[BUG] panic if invidious has popular feed disable

Youtube-tui does panic if invidious has popular feed disable:

thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', src/items/itemlist.rs:42:16
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

If I enable the popular feed at server youtube-tui does work again.
I have try to disable popular at the page,yml but this has not fix the problem.

main.yml:

mouse_support: true
invidious_instance: https://youtube.luckyturtle.dev
max_watch_history: 50
allow_unicode: true
message_bar_default: All good :)
images: Sixels
refresh_after_modifying_search_filters: true
image_index: 4
provider: YouTube
env:
  terminal-emulator: alacritty -e
  video-player: mpv
  download-path: '''~/Downloads/%(title)s-%(id)s.%(ext)s'''
  youtube-downloader: yt-dlp
  browser: firefox

pages.yml:

main_menu:
  layout:
  - type: NonCenteredRow
    items:
    - SearchBar
    - SearchFilters
  - type: CenteredRow
    items:
   # - Popular
    - Trending
    - History
  - type: NonCenteredRow
    items:
    - ItemList
  - type: NonCenteredRow
    items:
    - MessageBar
  message: Loading main menu...
search:
  layout:
  - type: NonCenteredRow
    items:
    - SearchBar
    - SearchFilters
  - type: NonCenteredRow
    items:
    - ItemList
  - type: NonCenteredRow
    items:
    - MessageBar
  message: Loading search results...
singleitem:
  layout:
  - type: NonCenteredRow
    items:
    - SearchBar
    - SearchFilters
  - type: NonCenteredRow
    items:
    - SingleItemInfo
  - type: NonCenteredRow
    items:
    - MessageBar
  message: Loading item details...
channeldisplay:
  layout:
  - type: NonCenteredRow
    items:
    - SearchBar
    - SearchFilters
  - type: CenteredRow
    items:
    - ChannelMain
    - ChannelVideos
    - ChannelPlaylists
  - type: NonCenteredRow
    items:
    - ChannelDisplay
  - type: NonCenteredRow
    items:
    - MessageBar
  message: Loading channel details...

Support for kitty graphics protocol

Right now with images enabled this application is unusable on kitty as it hangs after searching or accessing history. Kitty's native protocol seems to be much better than sixels. Would there be any support for it?

cargo install fails on Ubuntu 22.04

Hello!

I tried installing with cargo but I've run into this error:
error: linking with `cc` failed: exit status: 1
note: /usr/bin/ld: cannot find -lmpv: No such file or directory

Any idea what's gone wrong here? Let me know if you need more info.

Thanks so much!

OS-release:

PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy

missing dependencies

The readme claims the project is dependency-free, but it looks like libxcb is also needed.

Freezing immediately after doing almost anything

I love the idea of this app but I'm having some issues setting it up, it worked for a (very) short time but now literally nothing loads, it's possible that adding subscriptions to my feed might have caused the problem as I think it started freezing after that (I could be wrong though).

fyi, I've never used invidious before so I very well might have set things up wrong

subscriptions.json
main.txt
(the actual config is .yml I just did this so I can upload it)

Versions: (don't know what's helpful so I'll just do everything that might be important to know)

  • youtube-tui 0.8.0 (downloaded from the "youtube-tui-git" aur package)
  • mpv 0.38.0
  • yt-dlp 2024.04.09
  • kitty 0.33.1
  • zsh 5.9

doc: tty env progs

Hi, I just installed youtube-tui and it looks fantastic! I use newpipe, and this seems to offer a similar feature set for term. ๐Ÿฅ‡ ๐Ÿ’ฏ ๐Ÿ† ๐Ÿฐ โค๏ธ

Anyway, I'm currently working in on a host in tmux on TTY, and the default settings expect GUI. We should document alt settings that do some sort of job supervising, maybe using a youtube-tui tmux session. I have some experience doing that, and could contrib. Thoughts?

Terminal Support

Hey guys! I have the following question:
This support any terminal? Or it is needed to be a GPU powered like Kitty or Alacrity?

Search bar won't let me type 'j' and 'k' directly

v0.7.4
archlinux

It appears that I'm unable to enter the letters 'j' and 'k' directly into the search bar because they're being interpreted as Vim movement keys instead of literal letters. However, if I hold down the Ctrl or Alt key, I'm able to type these letters as normal. Interestingly, I don't have any issues typing the letters 'h' and 'l'. This problem seems to have started with version 0.7.4.

Is it possible to access private content from YouTube?

YouTube Music lets you upload your own music to listen anywhere. Could I theoretically generate some Google API key to access these tracks from the TUI?

I tried playing a playlist containing private files using MPV in a shell and this is the error:

[ytdl_hook] ERROR: [youtube] [video_id_censored]: Private video. Sign in if you've been granted access to this video 
[ytdl_hook] youtube-dl failed: unexpected error occurred 
Failed to recognize file format.

I'm guessing I would need to configure yt-dlp in some way?

I understand this program is dependency free but it would still be cool to add a tutorial to the documentation as an example of how you can configure this even further.

Can't View Channel Videos

When opening a channel, there are three options: Main, Videos, and Playlists. Main & Playlists have expected behavior, but when selecting Videos, the application returns the following:

invalid type: map, expected a sequence

and no videos are listed.

Environment: manjaro-sway
Rust version: 1.66.1

cp URL to clipboard?

  • Copy URL: ${xclip} ${embed-url}

how would I create a custom command to copy the URL to my clipboard?

[Collaboration Request] Let's work on Ytui-music

Hy @Siriusmart

Really liked that you are working on this.

This is more of an question to know if you are interested to collaborate on something similar. I have decided to work again on ytui-music and am currently re-writing it. I believe new codebase will be far more sensible and standard as compared to current (when I was only starting with rust then).

Ytui-music is basically an idea to have a tui to listen to audio from youtube. We will be using mpv to handle playback, reqwest to handle web, invidious as youtube provider. The end goal is to have easy to use and sensible and configurable tui.

Therefore I would like to ask if you are interested in this and help to deliver the goal.

use of unstable library feature 'is_some_and'

I'm getting this error message upon installation:

--> /home/matthew/.cargo/registry/src/github.com-1ecc6299db9ec823/youtube-tui-0.8.0/src/global/structs/mpv.rs:113:14
|
113 | .is_some_and(|s| s.as_str() == "no" || s.as_str() == "false")
| ^^^^^^^^^^^
|
= note: see issue #93050 rust-lang/rust#93050 for more information

For more information about this error, try rustc --explain E0658.
error: could not compile youtube-tui due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile youtube-tui v0.8.0, intermediate artifacts can be found at /tmp/cargo-installqIc8XJ

crash

messagebar.rs:36:33 crashes, i'll prob fix it later

youtube-tui is being rewritten

adding new features to youtube-tui was rough, especially the subscription page caused me to realise what terrible design choices I've made when I began the second rewrite of youtube-tui 2 years ago.

but more importantly, I have a bit of a vision on how TUI apps should be - rather than each apps running on their own, they should share features, allowing embedding of one TUI component within another.

the first step to getting there would be to allow multiple programs to draw to the same terminal, this is the working principle of ccanvas. You can learn more about it by clicking on the url.

anyways, here is the current progress
image

Permissions denied

I installed the package on arch linux with cargo, but it doesn't run unless it's run as root:
Error: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
I have previously done the same on void linux and I haven't needed to use root.

I'm guessing I need to be in some group. Which one is it?

Version Mismatch Error and Thread Panic on Debian 12

Hey there, this looks like a great project and I am trying to make it run on Debian 12 via cargo install.

However, I am experiencing a version missmatch error and a thread panic when I try to run youtube-tui (version 0.8.0) on Debian 12. It looks like the error is related to a discrepancy between the linked and loaded version of the mpv library. I don't see how to quickly fix this and I am not interested in upgrading or downgrading my mpv setup.

My environment:

  • OS: Debian 12, version 12.4
  • Kernel: 6.1.0-16-amd64
  • Rustc Version: 1.74.0
  • Terminal: alacritty
  • Shell: Zsh
  • youtube-tui
  • mpv Version detailed: mpv --version
    mpv 0.35.1 Copyright ยฉ 2000-2023 mpv/MPlayer/mplayer2 projects
    built on UNKNOWN
    FFmpeg library versions:
    libavutil 57.28.100
    libavcodec 59.37.100
    libavformat 59.27.100
    libswscale 6.7.100
    libavfilter 8.44.100
    libswresample 4.7.100
    FFmpeg version: 5.1.4-0+deb12u1

After installation of libmpv-dev the installation compiled properly with one warning: warning: the following packages contain code that will be rejected by a future version of Rust: traitobject v0.1.0. When I try to start it from the terminal I run into this error: thread '' panicked at /home/dave/.cargo/registry/src/index.crates.io-6f17d22bba15001f/youtube-tui-0.8.0/src/global/structs/mpv.rs:28:34:
called Result::unwrap() on an Err value: VersionMismatch { linked: 65644, loaded: 131072 }
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
thread 'main' panicked at /home/dave/.cargo/registry/src/index.crates.io-6f17d22bba15001f/youtube-tui-0.8.0/src/global/structs/mpv.rs:89:53:
called Result::unwrap() on an Err value: RecvError

I have the full backtrace as an attachment file:
youtube-tui-backtrace.txt

Please let me know if you need any more information. I would love to try it out :-)

uberzug support?

Are there plans to support ueberzug?
Or how to set the thumbnail quality to a better quality?

Pleasantly surprised to find this gem!

This feels so good for terminal lovers and minimalists.

I'm surprised it is not known, it has 7 version and get has few attraction, I see that you have posted on reddit tho has acquired less attention.

Tbh IMO, i can see it replacing ytfzf.

This tool needs more attention!

Thank you dev for making this possible ;)

No VIM keys? what da!

Can we all please be sensible? Can we please use vim keybinds, let's not be wild men. We are all gentlemen.

Live streams unable to load

live streams unable to load caused by an issue in the invidious crate

opening an issue so keep stuff on track

[feat]: addition of common keybinds

It would be great to see more common keybinds be added to the TUI, such as:

  • Ctrl + Backspace and Ctrl + w : delete one word
  • Ctrl + u : clear whole line
  • gg and G : go to first and last line
  • h and l : previous page and next page (without prompting, as it currently does)

I also think that the following defaults would be an improvement for the UX:

  • On launch, have the search bar be automatically focused and be in insert mode. That way the user can launch the application and directly start typing a query.
  • After a user inputs a query and gets the search results, I think it is preferable for the user to be in insert mode in the window that lists the results, that way they can directly start navigating them.
  • After a user selects an entry from the list, I think it is preferable for the user to be in insert mode in the window that lists the media options (Play video, Play audio etc.)
  • I also think it would be a great addition if the user could use the Backspace keybind in insert mode when in the media options window, that way they don't have to press escape an additional time.

Overall, these are somewhat optional changes, so feel free to reject any of them, however they would save the user a few keystrokes here and there, which is always nice.

Additionally, I think the keybinds implementation done in this TUI could serve as a good guideline, I find it quite intuitive to use etc:
https://github.com/aome510/spotify-player/tree/master#commands

Also, as a side note, running youtube-tui help in the terminal doesn't work, and that's what the user is told to do after running :help in the TUI.

Installation Issue | failed to run custom build command for `sixel-sys v0.3.1`

Getting the following error on Windows:

...
   Compiling tracing v0.1.37
   Compiling http-body v0.4.5
   Compiling unicode-normalization v0.1.22
error: failed to run custom build command for `sixel-sys v0.3.1`

Caused by:
  process didn't exit successfully: `C:\Users\hp\AppData\Local\Temp\cargo-installKvraMG\release\build\sixel-sys-d27a964655ef64b9\build-script-build` (exit code: 101)
  --- stdout
  cargo:rustc-link-lib=dylib=sixel
  cargo:rustc-link-search=native=C:\Users\hp\AppData\Local\Temp\cargo-installKvraMG\release\build\sixel-sys-486666fb75208720\out\lib

  --- stderr
  thread 'main' panicked at 'Failed to execute ./configure: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }', C:\Users\hp\.cargo\registry\src\github.com-1ecc6299db9ec823\sixel-sys-0.3.1\build.rs:71:22

oops :sweat_smile:

I went to reply to #28 (comment) and found that it was locked. Not sure if you intend to have your repo configured this way but.. well.. I'll assume good intent for the moment.

already been put onto nixos repos

Yes, it's already in nixpkgs like everything. I was talking about adding a config module to nix home-manager.

i'll close the issue for now as it doesn't seem necessary anymore

Adding example config that doesn't assume a specific terminal emulator is installed still seems very worthwhile, to avoid the need for customization in most cases. Unless one has been added since I filed that.

Again, I don't like to clog an issue queue with a bogus issue, but when closed issues are auto-locked external stakeholders (ie users) are left with little recourse.

Unable to compile on windows

.rustc_info.json:

{"rustc_fingerprint":5936628999909135439,"outputs":{"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.69.0 (84c898d65 2023-04-16)\nbinary: rustc\ncommit-hash: 84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc\ncommit-date: 2023-04-16\nhost: x86_64-pc-windows-msvc\nrelease: 1.69.0\nLLVM version: 15.0.7\n","stderr":""},"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\ME\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\npacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"pc\"\nwindows\n","stderr":""}},"successes":{}}

logs

> cargo install youtube-tui
    Updating crates.io index
  Installing youtube-tui v0.7.1
  Downloaded quote v1.0.27
  Downloaded libc v0.2.144
  Downloaded tokio v1.28.1
  Downloaded 3 crates (1.4 MB) in 46.43s
   Compiling autocfg v1.1.0
   Compiling cfg-if v1.0.0
   Compiling windows_x86_64_msvc v0.42.2
   Compiling winapi v0.3.9
   Compiling proc-macro2 v1.0.56
   Compiling unicode-ident v1.0.8
   Compiling quote v1.0.27
   Compiling windows-targets v0.42.2
   Compiling windows-sys v0.45.0
   Compiling scopeguard v1.1.0
   Compiling num_cpus v1.15.0
   Compiling futures-core v0.3.28
   Compiling windows_x86_64_msvc v0.48.0
   Compiling futures-sink v0.3.28
   Compiling lock_api v0.4.9
   Compiling pin-project-lite v0.2.9
   Compiling crossbeam-utils v0.8.15
   Compiling log v0.4.17
   Compiling memoffset v0.8.0
   Compiling serde_derive v1.0.162
   Compiling windows-targets v0.48.0
   Compiling syn v2.0.15
   Compiling crossbeam-epoch v0.9.14
   Compiling bytes v1.4.0
   Compiling itoa v1.0.6
   Compiling serde v1.0.162
   Compiling windows-sys v0.48.0
   Compiling tokio v1.28.1
   Compiling slab v0.4.8
   Compiling simd-adler32 v0.3.5
   Compiling memchr v2.5.0
   Compiling smallvec v1.10.0
   Compiling futures-task v0.3.28
   Compiling socket2 v0.4.9
   Compiling mio v0.8.6
   Compiling indexmap v1.9.3
   Compiling windows-sys v0.42.0
   Compiling once_cell v1.17.1
   Compiling rayon-core v1.11.0
   Compiling parking_lot_core v0.9.7
   Compiling syn v1.0.109
   Compiling futures-util v0.3.28
   Compiling adler v1.0.2
   Compiling tracing-core v0.1.30
   Compiling crossbeam-deque v0.8.3
   Compiling crossbeam-channel v0.5.8
   Compiling num-traits v0.2.15
   Compiling hashbrown v0.12.3
   Compiling fnv v1.0.7
   Compiling futures-io v0.3.28
   Compiling crc32fast v1.3.2
   Compiling bitflags v1.3.2
   Compiling futures-channel v0.3.28
   Compiling pin-utils v0.1.0
   Compiling http v0.2.9
   Compiling tracing v0.1.37
   Compiling num-integer v0.1.45
   Compiling tinyvec_macros v0.1.1
   Compiling httparse v1.8.0
   Compiling native-tls v0.2.11
   Compiling tinyvec v1.6.0
   Compiling parking_lot v0.12.1
   Compiling tokio-util v0.7.8
   Compiling schannel v0.1.21
   Compiling miniz_oxide v0.7.1
   Compiling crossterm_winapi v0.9.0
   Compiling pin-project-internal v1.0.12
   Compiling getrandom v0.2.9
   Compiling ryu v1.0.13
   Compiling percent-encoding v2.2.0
   Compiling try-lock v0.2.4
   Compiling make-cmd v0.1.0
   Compiling either v1.8.1
   Compiling bytemuck v1.13.1
   Compiling rayon v1.7.0
   Compiling sixel-sys v0.3.1
   Compiling form_urlencoded v1.1.0
   Compiling want v0.3.0
   Compiling pin-project v1.0.12
   Compiling nanorand v0.7.0
   Compiling flate2 v1.0.26
   Compiling h2 v0.3.18
   Compiling unicode-normalization v0.1.22
   Compiling http-body v0.4.5
   Compiling spin v0.9.8
   Compiling num-rational v0.4.1
   Compiling libc v0.2.144
   Compiling unicode-bidi v0.3.13
   Compiling tower-service v0.3.2
   Compiling httpdate v1.0.2
   Compiling winreg v0.10.1
   Compiling weezl v0.1.7
   Compiling idna v0.3.0
   Compiling hyper v0.14.26
   Compiling flume v0.10.14
   Compiling jpeg-decoder v0.3.0
   Compiling tokio-native-tls v0.3.1
error: failed to run custom build command for `sixel-sys v0.3.1`

Caused by:
  process didn't exit successfully: `C:\Users\ME\AppData\Local\Temp\cargo-install8X04Up\release\build\sixel-sys-3b386df2fdbb0666\build-script-build` (exit code: 101)
  --- stdout
  cargo:rustc-link-lib=dylib=sixel
  cargo:rustc-link-search=native=C:\Users\ME\AppData\Local\Temp\cargo-install8X04Up\release\build\sixel-sys-d83eecf46f53a67e\out\lib

  --- stderr
  thread 'main' panicked at 'Failed to execute ./configure: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }', C:\Users\ME\.cargo\registry\src\github.com-1ecc6299db9ec823\sixel-sys-0.3.1\build.rs:71:22
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `youtube-tui v0.7.1`, intermediate artifacts can be found at `C:\Users\ME\AppData\Local\Temp\cargo-install8X04Up`

support for other languages

image

For instance, russian characters don't render properly, and the program panicks when the user tries to input non english characters in the search query

missing dependencies

The readme clams the project is dependency-free, but it looks like their are some dependency, without the project does not work (additional to mpv).

  • libsixel
  • konsole

This should be mention.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.