Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't decrement --loop-file=N and --ab-loop-count=N #14302

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Jul 4, 2024

  1. player: don't decrement --loop-file=N and add remaining-file-loops

    This stops decreasing numerical values of --loop-file on each iteration
    so that loop-file=N loops every playlist entry without having to add
    --loop-file to --reset-on-next-file.
    
    The current behavior confuses users as seen in:
    
    mpv-player#2481
    mpv-player#5943
    mpv-player#11291
    mpv-player#13860
    https://www.reddit.com/r/mpv/comments/rcwnrw/looping_each_file_n_times_in_a_playlist/
    
    Also options are supposed to reflect the value configured by the user
    and not change on their own.
    
    A remaining-file-loops property is exposed as a replacement to check how
    many loops are left.
    guidocella committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    e0200d0 View commit details
    Browse the repository at this point in the history
  2. player: don't decrement --ab-loop-count=N and add remaining-ab-loops

    Follow up to the previous commit. Stop decreasing --ab-loop-count=N on
    each iteration so it is preserved across different loops. In particular
    it is preserved between different files without adding it to
    --reset-on-next-file. Add a property to expose the remaning A-B loop
    count instead.
    
    The current behavior of --ab-loop-count=N is even worse than --loop-file
    since it also doesn't reset when defining a new A-B loop in the same
    file. Defining it has no effect after --ab-loop-count has decreased to
    0, and this can't be fixed by adding it to --reset-on-next-file. This
    commit also resets remaining-ab-loops every time --ab-loop-a and
    --ab-loop-b are set to fix this.
    guidocella committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    fdb24a9 View commit details
    Browse the repository at this point in the history