Skip to content

Conversation

@kaoneko
Copy link
Contributor

@kaoneko kaoneko commented Feb 5, 2025

Consider this directory layout:

Show/
├── Season 1
├── Season 2
└── Season 3

When starting mpv with mpv Show, and it's configured with directory-mode=auto or directory-mode=lazy (the default in mpv 0.37.0 it seems, as I found out after updating), it adds subdirectories themselves to the playlist instead of their contents, only to expand them with their content when they become the current playlist item.

When remove_files_without_extension is set to true for blacklist_extensions.lua, directories which do not have a dot in their name are also removed from the playlist, resulting in:

$ mpv Show
[blacklist_extensions] Removed everything from the playlist
Exiting... (No files played)

The issue is that blacklist_extensions.lua doesn't check whether a playlist entry is a directory before removing it. I added the check, which then also replaced string.find(filename, "://") since utils.file_info(filename) returns nil when filename is a stream URL instead of the path to a local file.

@occivink
Copy link
Owner

occivink commented Mar 9, 2025

Looks reasonable, thank you

@occivink occivink merged commit 65aa1da into occivink:master Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants