delete the mpv tmp file after creation #266
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, a temporary path was not only being generated but also touched, therefore the os.Stat check to verify mpv had started was really doing nothing and just succeeding at the first attempt.
Closes #265
In order to test on your machine (a Pi is not needed I believe) you can just add an
mpv
sh script to your$PATH
(before the actualmpv
) with just asleep 10
inside. This will simulate a somewhat slow process starting (what I guess happens on a Pi). Without this change, the error would have beenfailed to connect
as the startup check would always return a false positive. Now it properly hangs for 5s and errors out withmpv never started
.If you have the chance @marlop352, give this patch a try on your Pi. I don't currently have one on hand.