Closed klundry closed 2 years ago
What is the output of ls -l $(which sh)
,
i'm assuming nothing is happening because it thinks that it's already downloaded the thumbnails, which should only happen if something weirdd happens in get_missing_thumbnails.
But idk,
it could also be because of some oddity in one of the busybox utils, assuming your distro uses busybox
/bin/busybox
I have my user's shell set to bash but I guess ytfzf is not using that?
I've changed my default shell to bash. I'm running ytfzf in a bash shell and I still get no thumbnails. Is there anything else I can try? I've also tried running "bash ytfzf" and still no thumbnails either.
As most scripts do, ytfzf uses /bin/sh (or wherever your sh file is) not the user shell.
Running bash ytfzf
should make ytfzf use bash, changing the user shell does nothing.
However at least now I know its not a problem with the shell as using bash didnt work.
You could try deleting everything in ~/.cache/ytfzf. This will remove your search and watch history, unless you avoid deleting the hist files.
As mentioned before it could have smth to do with busybox utils, but i need to do some testing, and reading of documentation.
Do you have a config file, if so whats in it?
Deleted everything in .cache/ytfzf/ and no change.
I have a conf.sh in .config/ytfzf/ with the following contents.
show_thumbnails=1
thumbnail_viewer=chafa
video_pref="[height<=720]
When I dig into the cache folders the thumbnail folders are empty so it's definitely just that they aren't getting downloaded.
Found the bug, it does have to do with busybox utils, busybox's diff outputs something slightly different by default than gnu's diff, I'll need to find a better way to get the data i need. I'll update you when this is fixed.
Fixed (https://github.com/pystardust/ytfzf/commit/ad7b5a67c481a25f8a370038c6a6cdf1fab2405c)
You can run
git clone -b development https://github.com/pystardust/ytfzf
cd ytfzf
sudo make install doc
to get the latest commit.
Awesome, thanks for the quick fix!
One more question. I'm not sure why the thumbnails are so small and not using all the space they have available. Is there a way to turn off the info that displays above the thumbnail?
![Uploading 20220309_13h38m14s_grim.png…]()
That image didn't load, so i'm not entirely sure about the small thumbnails.
As for disabling the info you can add
thumbnail_video_info () {
}
to your config.
Since the original problem is solved I'll be closing this, but you can continue to talk here, or make a new issue about the small thumbnails, I'll see it either way.
Trying this image upload again.
When I put that in my conf.sh and then run ytfzf I get a syntax error: unexpected "}"
When I put that in my conf.sh and then run ytfzf I get a syntax error: unexpected "}"
Good to know busybox sh doesn't like empty {}, try using:
thumbnail_video_info () {
:
}
I think the thumbnail is small because the height of your screen is small, but i doubt it.
get_ueberzug_positioning_left (){
width=$(($1+16))
height=$(($2-0))
x=2
y=10
}
You can add this this to your config and fiddle with how much is being added or subtracted.
Ok, thanks. No error now but the video info is still there.
With that second snippet I'm adjust the numbers but nothing is changing.
My screen is small but the chafa preview is only like half the size of the available space it has.
The function should be called thumbnail_video_info_text
not thumbnail_video_info
oops.
The get_ueberzug_positioning_left
thing isn't working because apparently I didn't let it work with chafa. I will fix this later cause i'm lazy rn.
Edit: if it's not fixed within 48 hours, feel free to ping me lol
Haha, ok thank you.
Fixed (ee077a5d2550a812c8f6a25c8bc2b331fb47187c)
Or at least get_ueberzug_positioning
has an effect on chafa now, your small thumbnail problem will probably still persist.
That's definitely better! Even with the video info text enabled again the thumbnails are bigger.
nice!
Relevant system info: PostmarketOS (Alpine) Edge on a Pinephone ytfzf version 2.2 terminal: sakura, foot
When I launch a search it will show "Fetching thumbnails" but I don't see any download output like I do on my laptop where the thumbnails are working. I have curl so I'm not sure why it's not downloading them.