Skip to content

Thumbnails for wrong file may be used if files from different URLs are played #44

@olifre

Description

@olifre

Description of the bug
Using for example ani-cli with mpv, URLs with patterns such as:

https://video.somewhere/video/somehash/1080p/mp4/file.mp4

will be played, differing by "hash" for different episodes. Playing two such URLs means the thumbnails from the first file are used for the second.

To Reproduce

  1. Play to different URLs with same "filename part".
  2. Observe thumbnails being reused for the second file.

Expected behavior
Thumnails to be recreated for the second file.

Debug log

Environment

  • OS: Gentoo Linux
  • mpv version: 0.35.1
  • mpv_thumbnail_script version: 0.5.2

Additional context
As expected, a subdirectory:

/tmp/mpv_thumbs_cache/file-0

is created and reused for all episodes.

Checking MPVs properties reveals:

$ echo '{ "command": ["get_property", "filename/no-ext"] }' | socat - ~/.mpv/ipc  
{"data":"file","request_id":0,"error":"success"}
$ echo '{ "command": ["get_property", "filename"] }' | socat - ~/.mpv/ipc  
{"data":"file.mp4","request_id":0,"error":"success"}
$ echo '{ "command": ["get_property", "path"] }' | socat - ~/.mpv/ipc  
{"data":"https://video.somewhere/video/somehash/1080p/mp4/file.mp4","request_id":0,"error":"success"}

So one way to fix this would be to use the property path in all cases where self.state.is_remote is true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions