Richienb / audic

Play some audio.
MIT License
71 stars 9 forks source link

Fixed loop=false wasn't working properly #22

Closed yuyaryshev closed 1 year ago

yuyaryshev commented 1 year ago

Fixed Fixed loop=false wasn't working properly see https://github.com/Richienb/audic/issues/19

The problem was caused by the fact that VLC have two separate flags: repeat and loop. See here https://wiki.videolan.org/VLC_HTTP_requests/

So I just added both of them.

Richienb commented 1 year ago

What's the difference between loop and repeat?

yuyaryshev commented 1 year ago

I don't really know, but I suppose that loop - repeats single track, and repeat repeats whole playlist which in our case is the same single track, but in VLC it can be more than that.

Anyway, you can't disable "loop" by triggering "repeat"...

You can see this two distinct options in VLC UI - loop 1 track or repeat whole playlist.

I'm not a developer of VLC so as for API i'm not sure. But as i've tested my workaround - it works.

Richienb commented 1 year ago

Since there is only ever one audio file loaded, we should run both pl_repeat and pl_loop at the same time under the loop property instead of adding another one.

yuyaryshev commented 1 year ago

I've made another pull request where I did as you sad above.