magic-tape: YouTube TUI client (fzf, image support)

christos@lemmy.world to Linux@lemmy.ml – 43 points –

cross-posted from: https://lemmy.world/post/530920

Magic-tape is an image supporting fuzzy finder command line interface YouTube client.

https://gitlab.com/christosangel/magic-tape

Image rendering can be done with the use of ueberzugpp, ueberzug, kitty terminal or chafa.

With magic-tape, through the main menu, the user can:

  • Browse videos from subscriptions.

  • Browse through trending video feed.

  • make a video search, using keywords or phrases.

  • Watch a previously watched video (watch history).

  • Browse videos from a subcsribed channel.

  • Watch a liked video.

  • Repeat the previous selection.

  • Repeat a previous search (search history).

  • Watch/download video/audio content, in various formats.

Through the miscellaneous menu the user can

  • Set up Preferences (configuration).

  • Like / Unlike a video.

  • Synchronize the above actions with their YouTube account.

  • Import subscriptions from YouTube.

  • Subscribe to/ Unsubscribe from a channel.

  • Clear their watch/search history, liked videos, thumbnail cache.

28

You are viewing a single comment

Looks like a cool script. I am learning different TUI tools now and willing to migrate some from GUI. This one gives me trouble. I probably did something wrong. When I press m then P - nothing happens. Supposedly, there should be preferences. And the program didn't ask me on the first run to configure anything.

When I search a video with s - I get in a preview window: zsh:11: command not found: draw_preview

I do not know how this script is interacting with zsh. Have you tried to run it with bash?

$ echo $0
bash

Strange... It still displays the same zsh error and the preferences are not displayed. I even tried to execute the program using bash magic-tape.sh while in bash

I tried on a machine where only bash is installed, and the search window is blank, yt-dlp gives an error that flashes and I can't read quickly, no preferences appear, again it flashes some text but I cannot read it. Also, the location for the folder is not relative, it has to be in ~/git/magic-tape otherwise it will give you multiple errors.

Have you followed the instructions correctly to install the script?

Obviously something is not ok, and I find it surprising that the script is not working in all these distros.

You have zsh errors with the Debian as well, although it is not installed?

Is yt-dlp up to date? If you use this command on its own, do you get any errors?

I am trying to troubleshoot, but in the dark.

Yeah, I followed the instructions, created necessary folders. yt-dlp is not the latest version, but the latest from Debian bookworm repositories (2023.03.04). yt-dlp works perfectly to download and convert videos with ffmpeg.

When I try to browse trending yt-dlp says:

yt-dlp: error: playlist end "0" must be must be greater than or equal to playlist start "1"

I don't have zsh errors on Debian where only bash is installed, after searching for a video I got a blank screen with the only option:

Select video:
search videos 1 to 0:
> 1 Abort Selection

On Debian, what preference values have you entered (P option on misc menu)?

That P menu doesn't open on all systems that I've tried

You can open the P option by either double-clicking on it with the mouse, or entering capital P with the keyboard. You can get to select the P option through the misc menu.

Do you get any error messages when doing so?

Have you installed all the dependencies of the script (rofi in particular)?

I did not have rofi installed on my headless machine, from the description I understand it is a GUI application. After installing it I still could not get the Preferences menu to appear. Nothing happens when I press P, or more specifically there is a quick flash of something and it comes back to the m submenu

It sems to me that there were a few ommisions made during the installation of this script from your part.

If I were you, I would remove the whole git/magic-tape folder, and re-install the script, this following the detailed instructions from the README.

There are specific commands that take care of the dependencies, and of the directory structure.

Do that, and the chances are that you will have no problems.

I finally got to my main workstation with GUI, pulled the latest code, installed rofi there and it works now, I sill could not to get previews to show because of the draw_preview: command not found error. But I don't think rofi can run on a headless machine:

rofi
(process:1456958): X11Helper-WARNING **: 10:52:55.600: Failed to open display: (null)
(process:1456958): Rofi-WARNING **: 10:52:55.600: Connection has error

I think that apart from not installing the dependencies, both problems that you have faced in your machine (zsh-bash conflict, headless machine) are beyond the scope of this script and need to be examined individually.

At the end of the day, one could easily substitute rofi with fzf itself in the script, they do more or less the same job. I am not certain rofi is your main obstacle here.

I tried to substitute rofi with fzf in vim, and when I try Preferences - it says 😕 Selection canceled...

My main goal was to use this program on my server which has no GUI and I can access it from anywhere. For example, I successfully use newsboat and neomutt remotely. When I saw TUI, I thought I could use that too headless, but you may wanna put a disclaimer that the script requires a GUI application rofi.

Anyways, thanks for the project, I will keep an eye on it if it keeps developing, great idea! While troubleshooting this program I came across ytfzf that also supposedly supports subscriptions and seems like can work headlessly

9 more...
9 more...
9 more...
9 more...
9 more...
9 more...
9 more...
9 more...
9 more...
9 more...
9 more...
9 more...
9 more...