Skip to content

Commit

Permalink
Reconcile branches
Browse files Browse the repository at this point in the history
* cmus/master (cmus/cmus@971204b)
* pgaskin/fix-passwd-docs (a3c8677)
* pgaskin/bracketed-paste (ec4c79c)
* gavtroy/count-albumtracks (gavtroy/cmus@67ff2d9)
* gavtroy/sort-albums-by-date (gavtroy/cmus@b339e82)
* gavtroy/flat-library-view (gavtroy/cmus@7697e0a)
* gavtroy/sorted-album-next (gavtroy/cmus@305cb46)
* gavtroy/fix-unmute-softvol (gavtroy/cmus@b0cbafd)
  • Loading branch information
pgaskin committed Jul 29, 2023
9 parents def777c + 971204b + a3c8677 + ec4c79c + 67ff2d9 + b339e82 + 7697e0a + 305cb46 + b0cbafd commit 45a5045
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
15 changes: 12 additions & 3 deletions command_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1200,14 +1200,23 @@ static int parse_vol_arg(const char *arg, int *value, unsigned int *flags)
static void cmd_mute(char *arg)
{
int l = 0, r = 0;
int *vl, *vr;

if (volume_l == 0 && volume_r == 0) {
if (soft_vol) {
vl = &soft_vol_l;
vr = &soft_vol_r;
} else {
vl = &volume_l;
vr = &volume_r;
}

if (*vl == 0 && *vr == 0) {
// unmute
l = mute_vol_l;
r = mute_vol_r;
} else {
mute_vol_l = volume_l;
mute_vol_r = volume_r;
mute_vol_l = *vl;
mute_vol_r = *vr;
}

int rc = player_set_vol(l, 0, r, 0);
Expand Down
4 changes: 2 additions & 2 deletions lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ struct track_info *lib_goto_next_album(void)
if (play_sorted)
track = sorted_album_first_track(track);
} else if (play_sorted) {
track = sorted_album_last_track(track);
track = sorted_album_last_track(lib_cur_track);
track = (struct tree_track *)simple_list_get_next(&lib_editable.head,
(struct simple_track *)track, aaa_mode_filter, true);
} else {
Expand All @@ -592,7 +592,7 @@ struct track_info *lib_goto_prev_album(void)
else if (track)
track = album_first_track(track->album);
} else if (play_sorted) {
track = sorted_album_first_track(track);
track = sorted_album_first_track(lib_cur_track);
track = (struct tree_track *)simple_list_get_prev(&lib_editable.head,
(struct simple_track *)track, aaa_mode_filter, true);
track = sorted_album_first_track(track);
Expand Down

0 comments on commit 45a5045

Please sign in to comment.