A posix script to find and watch youtube videos from the terminal. (Without API)
This will likely be the last update I make regarding features and bug fixes for this project, because this is just no longer the project that I work on
If anyone wants to maintain a fork, create an issue, I don't have admin rights in this repo, so the best i can do is link the readme to your fork.
Thank you to everyone for following the project and giving me inspiration to work on it for so long.
-cs
as an alias for -cS
-csi
as an alias for -cSI
selection_meta_key
for a way to change all ytfzf alt-*
shortcuts to ctrl-*
easilyaction_meta_key
for a way to change all ytfzf ctrl-*
shortcuts to alt-*
easily$preview_window_width
to specify how big the preview window should be--preview-side
could be something ytfzf can't handle, such as bottom
, when it should be down
trim_blank
did not, in fact, trim the blanks, this is a feat of engineeringyt
scraper has been readded to scrape youtube directlyfrom-cache
scraper, to scrape from ytfzf's cache.
--keep-cache
--force-invidious
to make it use the chosen invidious instance instead of converting to youtube linkscreated-at
is kept in all cache directories to keep track of when it was created--keep-cache
does not keep cacheM
scraper does not work (#683 @gardockt)--channel-url
does not work with https://www.youtube.com/channel/@channel
wayland
instead of wlroots
to align with ueberzugppremove_quotes_on_var_value
functionueberzug
should still worksixel
thumbnail viewer
ueberzugpp
sixel
support, eg: wezterm
, foot
kitty
thumbnail viewer
ueberzugpp
kitty
support, eg: kitty
iterm2
thumbnail viewer
ueberzugpp
iterm2
support, eg: wezterm
, iterm2
when -d
fails to download, a notification will be sent if notify_playing is 1
comments
: detects if a video is playing in ytfzf and will scrape the comments for that video.
ytfzf -e comments
auto-thumb
: basic kitty/sixel/iterm2 detection support (just checks which terminal you are using)
thumbnail viewer not carried into submenu
ytdl_opts
does not work
--sort
does not work (is_sort=1
does)
#699, thumbnails not downloading properly when quality is high
-s
, instead of asking for new search, it used the old search
$enable_hist
and $enable_search_hist
variables do nothing (@futureisfoss #673)
-a/-r/-S are now compatible with -D and other interfaces
In ksh there is an error that says .../var-fifo [Interrupted system call]
in some shells, it complains that there is a syntax error
In the playlists
extension, --rfp
and --atp
do not work
auto_select
, then to run_interface
if auto_select
failsYTFZF_SYSTEM_ADDON_DIR
if it doesn't match PREFIX
kitty
thumbnail viewer is no longer builtin due to it not working with fzf
in kitty
version 0.27+ (see #636), it will remain an addon in case you have an older version of kitty
.invidious-channel
--disable-actions
--sort=<name>
--sort=<0|1>
will still turn sorting on/offsixel
kitty
sixel
, and kitty
require the sixel-menu
folder.smart-thumb-download
$YTFZF_CUSTOM_THUMBNAILS_DIR
, that way when the same results are loaded again there is no need to download the thumbnails again.auto-thumb
video-info
gets information on a youtube video when provided a link.A warning will no longer be printed for a non-absolute channel link such as: @pewdiepie
By default $YTFZF_LOGFILE
is empty instead of /dev/stderr
-q
sets $search_source
to hist
instead of hist:$search_source
, essentially it will not prompt you if nothign is selected from history
url_handler_opts is handled with eval instead of pure word splitting
Video descriptions are no longer folded to fit on half the width.
Changed how SI
scrapes subscriptions
invidious-channel
scraper, also used in -cSI
.ctrl-p
on busybox
make install
with a custom prefix, the default YTFZF_SYSTEM_ADDON_DIR
is not changed, this is an unecessary burden on the packager and end user.-s
does not use $search_source
, always uses prompt
-f
with --format-selection=normal
with youtube-dl
is brokenard
extension scraperon_open_url_handler
Added much more information to ytfzf --help
subscription-manager
, adds 2 options, --add-sub
, and --remove-sub
to help manage the subscriptions
file.picture
scraper, scrapes $XDG_PICTURES_HOME
or if a search is given, will scrape that instead.
:w
or :wallpaper
is given as the search, it will search possible wallpaper folders.YTFZF_PICTURES_WALLPAPER_PATH
with different paths separated by :
to change this.
/usr/share/wallpapers
/usr/share/backgrounds
~/.local/share/wallpapers
~/.local/share/backgrounds
/tmp/ytfzf-$user-id
alt-p
is now ctrl-p
and it doesn't leave the menu.
alt-p
again set, next_page_action_shortcut="alt-p"
in your config file.sort_video_data_fn
no longer takes in the old ytfzf line format, instead it takes in jsonl of videos.
video_info_text
fzf
has been refactored completely to enable more possibilities with fzf
long standing bug where -l
doesn't save position in fzf
some @channel youtube links dont find the correct uuid.
some addons didn't have dependancy checks.
Preview doesn't work when selecting multiple videos (#612)
-s
, --search-again
is broken (#613)
--sort
work with busybox (possibly using perl or another scripting language)With the youtube-channel
scraper, if the first word in the search is :videos
, :streams
, or :playlists
it will scrape that tab from the channel.
--type=live
, --type=playlist
, --type=video
, and --type=all
also all workthe youtube-channel
, and invidious-channel
scrapers now accept @user channel links
ytfzf -cyoutube-channel @pewdiepie
--channel-link
swayimg-hyprland
thumbnail viewer, forces swayimg to work on hyprland
url_handler=handler
instead of load_url_handler "handler"
/tmp
have a ytfzf
prefix to be cleaner. (#596 @ammgws)_get_request
function a general utility functionBold = big fix.
-c S
-cSI
may still be broken depending on whether the invidious instance has updated to the newest version of invidious.Thumbnails did not take into account how many text lines were produced (this is especially noticeable if the video has a description)
--preview-side
was broken with swayimg
--pages
and --pages-start
were broken with -c invidious-playlist
Thumbnails don't load in busybox
Playlists are out of order
Custom keypress functions not returning correct exit code
-c R
does not work
If $YTFZF_SYSTEM_ADDON_DIR
does not exist, and --list-addons
is used, an unnecessary error is printed.
--pages
no longer works with -cinvidious-channel
, use -c invidious-playlist --pages=x https://www.youtube.com/playlist?list=<channel-id>
insteadUeberzug
thumbnail viewer causes all output to be written to $ytfzf_thumbnail_log
--available-inv-instances
--thumbnail-log
breaking change: on_search_<extention_name>
has been renamed to ext_on_search_<extention_name>
to avoid clashes with on_search_<search>
Running make all
does nothing for consistency with how make works (@brauliohms #577)
Running make
with gnu make will install doc
and run the main install
(@mathisto #586)
Thumbnail viewers now print all non-thumbnail related information to $thumbnail_debug_log
, which by default is /dev/null
Internal change to the title_str
internal function to not use dd
(@mathisto #591)
(bolded = noticeable issue)
swayimg
doesn't kill previous windows
swayimg
steals focus for a split second.
$cache_dir
is missing, ytfzf
throws an error.
$session_cache_dir
and $session_temp_dir
are unset in thumbnail viewersytfzf(1)
and ytfzf(5)
(@brauliohms #575)--fullscreen
and is_fullscreen
mentioned in docs despite not existing.scrape_next_page
aka the (alt-p
) shortcut has been implemented for scrape_invidious_search
which is the main search function.--notify-playing
is enabled, after downloading a video with -d
, there will be a notification saying download completeu
scraper, similar to U
scraper, but doesn't automatically play the video and exit.get_search_from_<src>
: if search_source
or --search-source
is set to <src>
the function will be run. It is supposed to set the variable _search
to a search querydisplay_text_<interface>
and info_wait_prompt_<interface>
info_wait
, and how to display text in a copyable way.playlists
: manage local playlists
rfp
and atp
url handlers are put in either $YTFZF_SYSTEM_ADDON_DIR/url-handlers
or ~/.config/ytfzf/url-handlers
load_extension playlists
to your config file.--create-playlist=name
--playlist=name
--atp=name search query
--rfp=name
--del-playlist=name
--list-playlists
--list-titles
bsm
, integrates bash with ytfzf's search prompt (only works if /bin/sh points to bash), this allows for
!!
to mean last search)rfp
: required for the playlists
extension, removes items from a playlist.atp
: required for the playlists
extension, adds items to a playlist.display_text
and info_wait_prompt
to the gui interface
-i
same as --interface
-u
same as --url-handler
-T
same as --thumb-viewer
-e
same as --ext
--search-source
: sets the source for search query
args
: commandline argumentsprompt
: search prompthist
: search historynext
: used internally when multi_search
is enabledfn-args
: used internally to mean the arguments passed to the function.--version-all
: get the version of ytfzf
and required dependencies.-IVJ
now puts everything into 1 array.-IVJ
and -IR
should now be significantly faster$YTFZF_SYSTEM_ADDON_DIR/url-handlers
are not loaded.odysee_video_count
> 50hist_file
and search_hist_file
ignore cache_dir
if it was set in the config fileuse_search_hist=1
, use search_source=hist
instead
use_search_hist=0
does nothinghandle_scrape_error
occures for every scrape instead of at the endprompt
source.handle_keypress
, that now happens in the main loop after the interface is run.on_search_<ext>
will be changed to <ext>_on_search
to prevent clashes with on_search_<search_query>
-h
, any extensions that have print_help_<ext-name>()
, will also print helpload_interface
a command to load an interface the correct way instead of setting the intereface variable directly.load_thumbnail_viewer
same as load_interface
but for thumbnail viewersload_url_handler
same as load_interface
but for url handlerspost_scrape()
a function that happens after everything is scrapedprint_help_<ext-name>()
an extension can print it's own help textYTFZF_CHECK_VARS_EXISTS
can now be used instead of check_vars_exists
buttons
- adds extra buttons that when clicked do things such as:
ipc
- allows getting variables from ipc_file
which is located in the session's cache dir, see $HOME/.cache/ytfzf
echo "get is_audio_only" > ipc_file
cat "ipc_file.is_audio_only
yeah it's a bit clunky but working with sockets would be worse
w3m
thumbnail preview is now an addoninterface_text
if tput is not found, default to $COLUMNS
, then 80 columns instead of defaulting to 80 immediatelyquick_menu
instead of the read
command.handle_actions
is much more efficient when handling many selectionsget_missing_thumbnails
always says all thumbnails are missing, causing them to be redownloaded every time the menu is loaded with the -l
option enabled.remove_ansi_escapes
removed more than just ansi escapes causing [
to be missing from text.custom_shortcut_binds
not doing anything.__is_submenu
does not save it's state when interface opens.ytfzf
assumes custom_info_wait_action_$info_wait_action
exists.${PROG}.bak
(issue: #556)multi
scraper.load_<addon-type> addon-name
.next_page
or the alt-p
shortcut in the invidious_search scraper