sxyazi / yazi

💥 Blazing fast terminal file manager written in Rust, based on async I/O.
https://yazi-rs.github.io
MIT License
16.72k stars 389 forks source link

Re-generate 0 byte previews in cache #1901

Closed hakan-demirli closed 1 week ago

hakan-demirli commented 1 week ago

yazi --debug output

Yazi
    Version: 0.3.3 (Nixpkgs 2024-09-04)
    Debug  : false
    OS     : linux-x86_64 (unix)

Ya
    Version: 0.3.3 (Nixpkgs 2024-09-04)

Emulator
    Emulator.via_env: ("xterm-kitty", "")
    Emulator.via_csi: Ok(Kitty)
    Emulator.detect : Kitty

Adapter
    Adapter.matches: Kitty

Desktop
    XDG_SESSION_TYPE           : Some("wayland")
    WAYLAND_DISPLAY            : Some("wayland-1")
    DISPLAY                    : Some(":1")
    SWAYSOCK                   : None
    HYPRLAND_INSTANCE_SIGNATURE: Some("4520b30d498daca8079365bdb909a8dea38e8d55_1731308910_1725297900")
    WAYFIRE_SOCKET             : None

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

Variables
    SHELL              : Some("/run/current-system/sw/bin/bash")
    EDITOR             : Some("hx")
    VISUAL             : None
    YAZI_FILE_ONE      : None
    YAZI_CONFIG_HOME   : None

Text Opener
    default: Some(Opener { run: "$EDITOR \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
    block  : Some(Opener { run: "$EDITOR \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })

Multiplexers
    TMUX               : false
    tmux version       : tmux 3.5a
    ZELLIJ_SESSION_NAME: None
    Zellij version     : No such file or directory (os error 2)

Dependencies
    file             : 5.45
    ueberzugpp       : No such file or directory (os error 2)
    ffmpegthumbnailer: 2.2.2
    magick           : 7.1.1-39
    fzf              : 0.56.0
    fd               : 10.2.0
    rg               : 14.1.1
    chafa            : 1.14.4
    zoxide           : 0.9.6
    7z               : No such file or directory (os error 2)
    7zz              : 24.08
    jq               : 1.7.1

--------------------------------------------------
When reporting a bug, please also upload the `yazi.log` log file - only upload the most recent content by time.
You can find it in the "/home/emre/.local/state/yazi" directory.

Please describe the problem you're trying to solve

Yazi sometimes generates 0 byte previews in .cache/yazi: image

This happens when I enter a directory with bunch of videos and hold j. The first couple and last couple videos have correct previews however the ones in the middle gets 0 byte previews.

Would you be willing to contribute this feature?

Describe the solution you'd like

Delete 0 byte previews and retry. It works.

Additional context

No response

Validations

sxyazi commented 1 week ago

That's weird, it's already been supported in https://github.com/sxyazi/yazi/commit/491f8b8fb16103183be40240e692eb8a992896d2#diff-c5808432f9562244fb2dffe649cd04fe1dbde38aec2caa8e8ab364e0ecda15bb

Are you sure it's still not working in the latest nightly?

hakan-demirli commented 1 week ago

Ok. My bad.

After cleaning the cache, I have used yazi from nixpkgs to go the videos directory which created bunch of 0 byte files on arrival. Then switching to the newest yazi via nix run github:sxyazi/yazi fixed some of the 0 byte files but there were still some since the new one didnt scrolled over the same files.