Archived
1
0
Fork 0

gnu: ytfzf: Fix loading of thumbnails.

* gnu/packages/patches/ytfzf-programs.patch: Modify.
This commit is contained in:
Raghav Gururajan 2021-07-07 01:53:39 -04:00
parent 601063c612
commit f480f27c9c
No known key found for this signature in database
GPG key ID: 5F5816647F8BE551

View file

@ -1,21 +1,21 @@
From 2118630fe9ac85f4e59135100047cdfb2683c81d Mon Sep 17 00:00:00 2001 From 3f1eaf5a1645b28ca18cfa028417dc225b7a557f Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name> From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Mon, 5 Jul 2021 06:45:49 -0400 Date: Mon, 5 Jul 2021 06:45:49 -0400
Subject: [PATCH 1/2] Modify the strings of referenced programs. Subject: [PATCH] Modify the strings of referenced programs.
Pattern the strings of referenced programs, so that they can be easily Pattern the strings of referenced programs, so that they can be easily
substituted with absolute paths using a custom-phase. substituted with absolute paths using a custom-phase.
Co-authored-by: jgart <jgart@dismail.de> Co-authored-by: jgart <jgart@dismail.de>
--- ---
ytfzf | 204 +++++++++++++++++++++++++++++----------------------------- ytfzf | 198 +++++++++++++++++++++++++++++-----------------------------
1 file changed, 102 insertions(+), 102 deletions(-) 1 file changed, 99 insertions(+), 99 deletions(-)
diff --git a/ytfzf b/ytfzf diff --git a/ytfzf b/ytfzf
index f4d2e0d..f0f2e16 100755 index f4d2e0d..e8bb60b 100755
--- a/ytfzf --- a/ytfzf
+++ b/ytfzf +++ b/ytfzf
@@ -49,19 +49,19 @@ cache_dir=${YTFZF_CACHE-${cache_dir-$HOME/.cache/ytfzf}} @@ -49,17 +49,17 @@ cache_dir=${YTFZF_CACHE-${cache_dir-$HOME/.cache/ytfzf}}
#video type preference (mp4/1080p, mp4/720p, etc..) #video type preference (mp4/1080p, mp4/720p, etc..)
video_pref=${YTFZF_PREF-${video_pref-}} video_pref=${YTFZF_PREF-${video_pref-}}
#the menu to use instead of fzf when -D is specified #the menu to use instead of fzf when -D is specified
@ -35,11 +35,8 @@ index f4d2e0d..f0f2e16 100755
-audio_player=${YTFZF_AUDIO_PLAYER-${audio_player-mpv --no-video}} -audio_player=${YTFZF_AUDIO_PLAYER-${audio_player-mpv --no-video}}
+audio_player=${YTFZF_AUDIO_PLAYER-${audio_player-@mpv@ --no-video}} +audio_player=${YTFZF_AUDIO_PLAYER-${audio_player-@mpv@ --no-video}}
#the command to use for displaying thumbnails #the command to use for displaying thumbnails
-thumb_disp_method=${YTFZF_THUMB_DISP_METHOD-${thumb_disp_method-ueberzug}} thumb_disp_method=${YTFZF_THUMB_DISP_METHOD-${thumb_disp_method-ueberzug}}
+thumb_disp_method=${YTFZF_THUMB_DISP_METHOD-${thumb_disp_method-@ueberzug@}}
#Storing the argument and location for autogenerated subtitles #Storing the argument and location for autogenerated subtitles
[ -z "$YTFZF_SUBT_NAME" ] && YTFZF_SUBT_NAME=""
#Stores the language for the auto genereated subtitles
@@ -85,8 +85,8 @@ subscriptions_file=${subscriptions_file-$config_dir/subscriptions} @@ -85,8 +85,8 @@ subscriptions_file=${subscriptions_file-$config_dir/subscriptions}
#> stores the pid of running ytfzf sessions #> stores the pid of running ytfzf sessions
pid_file="$cache_dir/.pid" pid_file="$cache_dir/.pid"
@ -307,7 +304,7 @@ index f4d2e0d..f0f2e16 100755
..|.playlistRenderer? | ..|.playlistRenderer? |
select(. !=null) | select(. !=null) |
{ {
@@ -904,31 +904,31 @@ get_search_query () { @@ -904,28 +904,28 @@ get_search_query () {
#> To select videos from videos_data #> To select videos from videos_data
user_selection () { user_selection () {
#remove subscription separators #remove subscription separators
@ -332,8 +329,7 @@ index f4d2e0d..f0f2e16 100755
- dep_ck "ueberzug" "fzf" - dep_ck "ueberzug" "fzf"
+ dep_ck "@ueberzug@" "@fzf@" + dep_ck "@ueberzug@" "@fzf@"
export YTFZF_THUMB_DISP_METHOD="$thumb_disp_method" export YTFZF_THUMB_DISP_METHOD="$thumb_disp_method"
- [ "$thumb_disp_method" = "ueberzug" ] && start_ueberzug [ "$thumb_disp_method" = "ueberzug" ] && start_ueberzug
+ [ "$thumb_disp_method" = "@ueberzug@" ] && start_ueberzug
#thumbnails only work in fzf, use fzf #thumbnails only work in fzf, use fzf
- menu_command="fzf -m --tabstop=1 --bind change:top --delimiter=\"$tab_space\" \ - menu_command="fzf -m --tabstop=1 --bind change:top --delimiter=\"$tab_space\" \
+ menu_command="@fzf@ -m --tabstop=1 --bind change:top --delimiter=\"$tab_space\" \ + menu_command="@fzf@ -m --tabstop=1 --bind change:top --delimiter=\"$tab_space\" \
@ -342,11 +338,7 @@ index f4d2e0d..f0f2e16 100755
+ --layout=reverse --preview \"@sh@ $0 -U {}\" \ + --layout=reverse --preview \"@sh@ $0 -U {}\" \
--preview-window \"$PREVIEW_SIDE:50%:noborder:wrap\"" --preview-window \"$PREVIEW_SIDE:50%:noborder:wrap\""
selected_data=$( title_len=200 video_menu "$videos_data" ) selected_data=$( title_len=200 video_menu "$videos_data" )
- [ "$thumb_disp_method" = "ueberzug" ] && stop_ueberzug [ "$thumb_disp_method" = "ueberzug" ] && stop_ueberzug
+ [ "$thumb_disp_method" = "@ueberzug@" ] && stop_ueberzug
# Deletes thumbnails if no video is selected
[ -z "$selected_data" ] && clean_up
#show regular menu
@@ -951,10 +951,10 @@ handle_shortcuts () { @@ -951,10 +951,10 @@ handle_shortcuts () {
case $selected_key in case $selected_key in
"$urls_shortcut") printf "%s\n" $selected_urls; return 1 ;; "$urls_shortcut") printf "%s\n" $selected_urls; return 1 ;;