Releases: pystardust/ytfzf
V2.6.2 !FINAL
IMPORTANT
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.
Additions
-csas an alias for-cS-csias an alias for-cSIselection_meta_keyfor a way to change all ytfzfalt-*shortcuts toctrl-*easilyaction_meta_keyfor a way to change all ytfzfctrl-*shortcuts toalt-*easily$preview_window_widthto specify how big the preview window should be
Fixes
- When scraping subscriptions, the whitespace in the channel url is not trimmed properly sometimes
- The last variable when setting previously exported variables is not used
--preview-sidecould be something ytfzf can't handle, such asbottom, when it should bedowntrim_blankdid not, in fact, trim the blanks, this is a feat of engineering- Fix: #717, thumbnails dont load when scraping new page
Addons
yt-music
Fixes
- #714, utf-8 not kept intact
2.6.1
Additions
- support ueberzugpp sway, and wlroots image output methods
- the
ytscraper has been readded to scrape youtube directly from-cachescraper, to scrape from ytfzf's cache.- to save to cache use
--keep-cache
- to save to cache use
--force-invidiousto make it use the chosen invidious instance instead of converting to youtube links- a file called
created-atis kept in all cache directories to keep track of when it was created
Fixes
--keep-cachedoes not keep cacheMscraper does not work (#683 @gardockt)--channel-urldoes not work withhttps://www.youtube.com/channel/@channel- use
waylandinstead ofwlrootsto align with ueberzugpp - Fix syntax errors on macos (#662 @readmemyrights)
- Export FZF_DEFAULT_OPTS (#656 @jellelicht)
- Subscriptions trim_blank url #677 (#692 @calbrecht)
- next_page tabular tui did not know about COLUMNS AND LINES (#693 @calbrecht)
Code
- remove unused
remove_quotes_on_var_valuefunction
V2.6.0
Changes
- ueberzugpp is now the main version of ueberzug that is recommended to use
ueberzugshould still work
Features
-
sixelthumbnail viewer- requires
ueberzugpp - only works in terminals with
sixelsupport, eg:wezterm,foot
- requires
-
kittythumbnail viewer- yes this was removed last update, however it now also requires
ueberzugpp - only works in terminals with
kittysupport, eg:kitty
- yes this was removed last update, however it now also requires
-
iterm2thumbnail viewer- requires
ueberzugpp - only works in terminals with
iterm2support, eg:wezterm,iterm2
- requires
-
when
-dfails to download, a notification will be sent if notify_playing is 1
Addons
Extensions
-
comments: detects if a video is playing in ytfzf and will scrape the comments for that video.- to use:
- have a ytfzf instance playing a video
ytfzf -e comments
- to use:
-
auto-thumb: basic kitty/sixel/iterm2 detection support (just checks which terminal you are using)
Fixes
-
thumbnail viewer not carried into submenu
-
ytdl_optsdoes not work -
--sortdoes not work (is_sort=1does) -
#699, thumbnails not downloading properly when quality is
high -
-s, instead of asking for new search, it used the old search -
$enable_histand$enable_search_histvariables 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
playlistsextension,--rfpand--atpdo not work
Code
- interface_scripting is now longer a thing, and has been replaced with an initial call to
auto_select, then torun_interfaceifauto_selectfails
V2.5.5
For Package Maintainers
- the Makefile will now take care of changing the default
YTFZF_SYSTEM_ADDON_DIRif it doesn't matchPREFIX
Removed
kittythumbnail viewer is no longer builtin due to it not working withfzfinkittyversion 0.27+ (see #636), it will remain an addon in case you have an older version ofkitty.
Features
- add timezone for search history timestamp (@jpgichw #630)
- streams, and playlist tabs can be scraped with
invidious-channel --disable-actions- Puts a blanket disable on all actions, including submenus, and the back button
--sort=<name>- An easier way to load a sort name.
--sort=<0|1>will still turn sorting on/off
Addons
Interfaces
sixel- Opens a very basic menu written in python but uses sixel to display thumbnails
kitty- Opens the same menu as sixel, but uses the kitty protocol for thumbnails
- both
sixel, andkittyrequire thesixel-menufolder.
Extensions
smart-thumb-download- Instead of downloading thumbnails into that current process' cache directory, save thumbnails in
$YTFZF_CUSTOM_THUMBNAILS_DIR, that way when the same results are loaded again there is no need to download the thumbnails again.
- Instead of downloading thumbnails into that current process' cache directory, save thumbnails in
auto-thumb- Automatically picks a thumbnail viewer based on the terminal, and current xdg session (wayland/X11/tty)
Scrapers
video-infogets information on a youtube video when provided a link.
Changes
-
A warning will no longer be printed for a non-absolute channel link such as:
@pewdiepie -
By default
$YTFZF_LOGFILEis empty instead of/dev/stderr -
-qsets$search_sourcetohistinstead ofhist:$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
- this allows for quoting strings.
-
Video descriptions are no longer folded to fit on half the width.
-
Changed how
SIscrapes subscriptions
Fixes
invidious-channelscraper, also used in-cSI.- ueberzug thumbnail viewer is broken
ctrl-pon busybox- When running
make installwith a custom prefix, the defaultYTFZF_SYSTEM_ADDON_DIRis not changed, this is an unecessary burden on the packager and end user. -sdoes not use$search_source, always uses prompt-fwith--format-selection=normalwithyoutube-dlis broken- Only one missing dependency could be shown at a time
- Kitty thumbnail causing problems (@greenfoo #628)
ardextension scraper
Code
- Remove the unused ueberzug fd 3
V2.5.4
Features
-
on_open_url_handler- Event function that is run right before the url handler is opened.
- Takes in the urls that were opened as function arguments.
-
Added much more information to
ytfzf --help
Addons
Extensions
subscription-manager, adds 2 options,--add-sub, and--remove-subto help manage thesubscriptionsfile.
Scrapers
picturescraper, scrapes$XDG_PICTURES_HOMEor if a search is given, will scrape that instead.- If
:wor:wallpaperis given as the search, it will search possible wallpaper folders. - Export
YTFZF_PICTURES_WALLPAPER_PATHwith different paths separated by:to change this.- By default, it will search:
/usr/share/wallpapers/usr/share/backgrounds~/.local/share/wallpapers~/.local/share/backgrounds
- By default, it will search:
- If
Thumbnail Viewers
- Added foot thumbnail viewer
- Extremely basic, does not try to position itself in a correct location
Changes
- ytfzf instance information is stored in $YTFZF_TEMP_DIR instead of $cache_dir
- $cache_dir is now only used if $keep_cache is 1, and for files such as search history.
- $YTFZF_TEMP_DIR defaults to
/tmp/ytfzf-$user-id
alt-pis nowctrl-pand it doesn't leave the menu.- if you want it to be
alt-pagain set,next_page_action_shortcut="alt-p"in your config file.
- if you want it to be
Technical Changes
sort_video_data_fnno longer takes in the old ytfzf line format, instead it takes in jsonl of videos.- Same goes for
video_info_text
- Same goes for
- The way previews work in
fzfhas been refactored completely to enable more possibilities withfzf - search history is now a fake extension
- history is also a fake extension
Fixes
-
long standing bug where
-ldoesn't save position infzf -
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-againis broken (#613)
Plans For Next Update
- Scraping shorts from a youtube channel
- making an addon to make
--sortwork with busybox (possibly using perl or another scripting language) - viewed date for history (#626)
V2.5.3
Features
-
With the
youtube-channelscraper, if the first word in the search is:videos,:streams, or:playlistsit will scrape that tab from the channel.--type=live,--type=playlist,--type=video, and--type=allalso all work
-
the
youtube-channel, andinvidious-channelscrapers now accept @user channel links -
swayimg-hyprlandthumbnail viewer, forces swayimg to work on hyprland- is a little hacky and will mess up rules you have for swayimg
Documentation
- The documentation misleadingly stated to set addon variables directly instead of using the load_* counterpart.
- for example: the docs said to use
url_handler=handlerinstead ofload_url_handler "handler"
- for example: the docs said to use
Changes
Technical
- Make the internal
_get_requestfunction a general utility function
Fixes
Bold = big fix.
-
-c S-cSImay 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-sidewas broken withswayimg -
--pagesand--pages-startwere 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 Rdoes not work -
If
$YTFZF_SYSTEM_ADDON_DIRdoes not exist, and--list-addonsis used, an unnecessary error is printed.
Addons
Scrapers
ani-category
- works again! in conjunction with tthe new scraper, ani-gogohd-link
Known issues
--pagesno longer works with-cinvidious-channel, use-c invidious-playlist --pages=x https://www.youtube.com/playlist?list=<channel-id>instead
V2.5.2
V2.5.1
Additions
Options
--available-inv-instances- prints available invidious instances and exists
--thumbnail-log- The file to print thumbnail viewer debug info to.
Docs
- Add the utility functions to the documentation.
Changes
-
breaking change:
on_search_<extention_name>has been renamed toext_on_search_<extention_name>to avoid clashes withon_search_<search> -
Running
make alldoes nothing for consistency with how make works (@brauliohms #577) -
Running
makewith gnu make will installdocand run the maininstall(@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_strinternal function to not usedd(@mathisto #591)
Fixes
(bolded = noticeable issue)
swayimgdoesn't kill previous windowsswayimgsteals focus for a split second.- Sometimes invidious instances without api are picked
- If
$cache_diris missing,ytfzfthrows an error. - interface does not carry to submenu
$session_cache_dirand$session_temp_dirare unset in thumbnail viewers- Typos in
ytfzf(1)andytfzf(5)(@brauliohms #575) --fullscreenandis_fullscreenmentioned in docs despite not existing.
V2.5.0
Additions
- Invidious instances are picked at random to avoid everyone using the same server (@BSGalvan #571)
scrape_next_pageaka the (alt-p) shortcut has been implemented forscrape_invidious_searchwhich is the main search function.- If
--notify-playingis enabled, after downloading a video with-d, there will be a notification saying download complete uscraper, similar toUscraper, but doesn't automatically play the video and exit.get_search_from_<src>: ifsearch_sourceor--search-sourceis set to<src>the function will be run. It is supposed to set the variable_searchto a search querydisplay_text_<interface>andinfo_wait_prompt_<interface>- This way interfaces can decide how the user picks the option for
info_wait, and how to display text in a copyable way.
- This way interfaces can decide how the user picks the option for
Addons
Extensions
-
playlists: manage local playlists- requires that the
rfpandatpurl handlers are put in either$YTFZF_SYSTEM_ADDON_DIR/url-handlersor~/.config/ytfzf/url-handlers - This addon is intended to always be loaded, ie: add
load_extension playliststo your config file. - create a playlist with
--create-playlist=name - play a playlist with
--playlist=name - add to a playlist with
--atp=name search query - remove something from a playlist with
--rfp=name - delete a playlist with
--del-playlist=name - list playlists with
--list-playlists - list items in a playlist with
--list-titles
- requires that the
-
bsm, integrates bash with ytfzf's search prompt (only works if /bin/sh points to bash), this allows for- bash's history expansion syntax in the search prompt, (eg:
!!to mean last search) - pressing up/down to cycle through search history
- ctrl-r to do history search
- bash's history expansion syntax in the search prompt, (eg:
Url Handlers
rfp: required for theplaylistsextension, removes items from a playlist.atp: required for theplaylistsextension, adds items to a playlist.
Interfaces
- implemented
display_textandinfo_wait_promptto the gui interface- this way a gui interface shows for text to be coppied instead of it being printed, and you dont have to type q/Q/m/Enter to continue.
Options
-isame as--interface-usame as--url-handler-Tsame as--thumb-viewer-esame as--ext--search-source: sets the source for search query- A list of sources include:
args: commandline argumentsprompt: search prompthist: search historynext: used internally whenmulti_searchis enabledfn-args: used internally to mean the arguments passed to the function.
--version-all: get the version ofytfzfand required dependencies.
Changes
-IVJnow puts everything into 1 array.
Fixes
-IVJand-IRshould now be significantly faster- url handlers in
$YTFZF_SYSTEM_ADDON_DIR/url-handlersare not loaded. - checking if a selected url has an associated action is too loose.
- no error is printed if
odysee_video_count> 50 hist_fileandsearch_hist_fileignorecache_dirif it was set in the config file
Deprecated
use_search_hist=1, usesearch_source=histinsteaduse_search_hist=0does nothing
Technical
- Large refactor to how ytfzf handles scrapers,
- there are no longer any builtin special cases to reduce code complexity.
handle_scrape_erroroccures for every scrape instead of at the end
- Large refactor to how searching works.
- search query comes from a "source" now, by default that is the argumentspassed to the program, if no arguments are passed it uses the
promptsource.
- search query comes from a "source" now, by default that is the argumentspassed to the program, if no arguments are passed it uses the
- Refactor to how -I, -L, and --info-wait work.
- Interfaces are no longer responsible for running
handle_keypress, that now happens in the main loop after the interface is run.
Plans for Next Update
on_search_<ext>will be changed to<ext>_on_searchto prevent clashes withon_search_<search_query>
V2.4.1
Additions
- A generic error for when a scraper fails
- When using
-h, any extensions that haveprint_help_<ext-name>(), will also print help load_interfacea command to load an interface the correct way instead of setting the intereface variable directly.load_thumbnail_viewersame asload_interfacebut for thumbnail viewersload_url_handlersame asload_interfacebut 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_EXISTScan now be used instead ofcheck_vars_exists
Addons
Extensions
buttons- adds extra buttons that when clicked do things such as:- enable audio only
- enable/disable detach
- ...
ipc- allows getting variables fromipc_filewhich is located in the session's cache dir, see$HOME/.cache/ytfzf- example usage:
echo "get is_audio_only" > ipc_file
cat "ipc_file.is_audio_onlyyeah it's a bit clunky but working with sockets would be worse
Changes
w3mthumbnail preview is now an addon- in
interface_textif tput is not found, default to$COLUMNS, then 80 columns instead of defaulting to 80 immediately - info wait uses
quick_menuinstead of thereadcommand. handle_actionsis much more efficient when handling many selections
Documentation
- Added example subscriptions file
- Added exit codes to ytfzf.1
Fixes
- curl adds a \r character causing weirdness when using --channel-link (issue: #557)
get_missing_thumbnailsalways says all thumbnails are missing, causing them to be redownloaded every time the menu is loaded with the-loption enabled.remove_ansi_escapesremoved more than just ansi escapes causing[to be missing from text.- Using new lines in exported variables or variables set before running ytfzf would cause errors (#552 @HoffsMH).
- line 163 unexpected operator when dependancy is not installed.
custom_shortcut_bindsnot doing anything.__is_submenudoes not save it's state when interface opens.- Writing watch history uses the jq command less, and should be slightly faster, more so if many videos are selected.
ytfzfassumescustom_info_wait_action_$info_wait_actionexists.- Makefile creates and deletes a file called
${PROG}.bak(issue: #556) - the wrong invidious instance was used in the
multiscraper.
Technical
- The codebase is shellcheck compliant (with many disable comments)
- refactor loading addons, such as interfaces, url_handlers, etc.. so that addons, or the user can just use
load_<addon-type> addon-name.
Plans for next update
- resolving #379 by adding a margin on the side
- implementing
next_pageor thealt-pshortcut in the invidious_search scraper