-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: thumbnails support #1211
feat: thumbnails support #1211
Conversation
i also refactored the args to be in alphabetical order |
TODO:
|
fix: better placement of thumbnail window
This is a lot of code (50+ lines, which is a 10% increase) already for a feature that's optional. @port19x what do you think? |
there will be more if we go for rofi implementation too |
I'm conflicted. 50 loc is a lot indeed, but perhaps warranted for a large feature like thumbnails. Considering this doesn't include the rofi implementation I'd say it's not worth it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a good opportunity for a poll
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also some shellcheck thingy to look into.
I'm glad to have work continue on this feature
if [ "$thumbnails" = "1" ]; then | ||
search_anime "$query" | ||
image_preview | ||
title=$(printf "%s" "$choice" | sed -nE "s/(.*) \([0-9]* episodes\) .*/\1 /p") | ||
id=$(printf "%s" "$choice" | sed -nE "s/.* \([0-9]* episodes\) (.*)\.jpg/\1/p") | ||
else | ||
anime_list=$(search_anime "$query") | ||
[ -z "$anime_list" ] && die "No results found!" | ||
[ "$index" -eq "$index" ] 2>/dev/null && result=$(printf "%s" "$anime_list" | sed -n "${index}p") | ||
[ -z "$index" ] && result=$(printf "%s" "$anime_list" | nl -w 2 | sed 's/^[[:space:]]//' | nth "Select anime: ") | ||
[ -z "$result" ] && exit 1 | ||
title=$(printf "%s" "$result" | cut -f2) | ||
id=$(printf "%s" "$result" | cut -f1) | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to placement of the code addition, I'm semi-confident that thumbnails will not work with history search
Please elaborate on the case for image caching |
I think I get it. |
Let's be real, this will never get done and that's not even much of an issue. |
Pull Request Template
Type of change
Description
requires fzf version 0.44.0: https://github.com/junegunn/fzf/releases/tag/0.44.0
didn't document in help, man or readme bc lazy
Checklist
-c
history and continue work-d
downloads work-s
syncplay works-q
quality works-v
vlc works-e
select episode works-S
select index works-r
range selection works--dub
and regular (sub) mode both work-h
help info is up to dateAdditional Testcases