Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: autoload looping a file when only a single file in directory
closes #768
- Loading branch information
c982622
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.
When
loop-playlist
is on it might be desired that the same file gets played over and over again if it's the only one in the directory.c982622
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.
But that's what
loop-file
is for.loop-playlist
won't loop single file either, as there's no playlist then. I think we'd be loadingloop-playlist
with implicit behavior it doesn't currently have.c982622
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.
loop-playlist
does loop single files. The difference toloop-file
in that case is that the file gets reopened (so all cache is discarded).There has even been some discussion if mpv should optimize the case with a single playlist item to behave the same as
loop-file
, because it doesn't make sense to reopen the file in such a case.c982622
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.
Nvm, I should have tested this before writing anything (but didn't want to update because I was working on something).
It does in fact actually already loop for single directory items, no need to change anything. It's actually better this way, because then it doesn't circumvent the aforementioned optimization in case it ever gets implemented.