Skip to content

Commit

Permalink
player: remove --term-remaining-playtime option
Browse files Browse the repository at this point in the history
This wasn't useful and didn't even really do what it said anyway.
Closes mpv-player#12167.
  • Loading branch information
Dudemanguy committed Jan 20, 2024
1 parent 5871ba8 commit a39f9b6
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 9 deletions.
1 change: 1 addition & 0 deletions DOCS/interface-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Interface changes
- add `--sub-filter-sdh-enclosures` option
- added the `mp.input` scripting API to query the user for textual input
- add `forced` choice to `subs-with-matching-audio`
- remove `--term-remaining-playtime` option
--- mpv 0.37.0 ---
- `--save-position-on-quit` and its associated commands now store state files
in %LOCALAPPDATA% instead of %APPDATA% directory by default on Windows.
Expand Down
4 changes: 0 additions & 4 deletions DOCS/man/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4887,10 +4887,6 @@ Terminal

See `Property Expansion`_.

``--term-remaining-playtime``, ``--no-term-remaining-playtime``
When printing out the time on the terminal, show the remaining time adjusted by
playback speed. Default: ``yes``

``--term-status-msg=<string>``
Print out a custom string during playback instead of the standard status
line. Expands properties. See `Property Expansion`_.
Expand Down
2 changes: 0 additions & 2 deletions options/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,6 @@ static const m_option_t mp_opts[] = {

{"term-osd-bar", OPT_BOOL(term_osd_bar), .flags = UPDATE_OSD},
{"term-osd-bar-chars", OPT_STRING(term_osd_bar_chars), .flags = UPDATE_OSD},
{"term-remaining-playtime", OPT_BOOL(term_remaining_playtime), .flags = UPDATE_OSD},
{"term-title", OPT_STRING(term_title), .flags = UPDATE_OSD},

{"term-playing-msg", OPT_STRING(playing_msg)},
Expand Down Expand Up @@ -978,7 +977,6 @@ static const struct MPOpts mp_default_opts = {
.frame_dropping = 1,
.term_osd = 2,
.term_osd_bar_chars = "[-+-]",
.term_remaining_playtime = true,
.consolecontrols = true,
.playlist_pos = -1,
.play_frames = -1,
Expand Down
1 change: 0 additions & 1 deletion options/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ typedef struct MPOpts {
int term_osd;
bool term_osd_bar;
char *term_osd_bar_chars;
bool term_remaining_playtime;
char *term_title;
char *playing_msg;
char *osd_playing_msg;
Expand Down
3 changes: 1 addition & 2 deletions player/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,9 @@ static char *get_term_status_msg(struct MPContext *mpctx)
saddf(&line, ": ");

// Playback position
double speed = opts->term_remaining_playtime ? mpctx->video_speed : 1;
sadd_hhmmssff(&line, get_playback_time(mpctx), opts->osd_fractions);
saddf(&line, " / ");
sadd_hhmmssff(&line, get_time_length(mpctx) / speed, opts->osd_fractions);
sadd_hhmmssff(&line, get_time_length(mpctx), opts->osd_fractions);

sadd_percentage(&line, get_percent_pos(mpctx));

Expand Down

0 comments on commit a39f9b6

Please sign in to comment.