tmus

TUI Music Player
git clone https://git.sinitax.com/sinitax/tmus
Log | Files | Refs | Submodules | LICENSE | sfeed.txt

commit 530bf0da07a28e1edef6c346458d747c24a5457f
parent b44f4cb64ff6dbb05345c2cb297c3b7d84a11d24
Author: Louis Burda <quent.burda@gmail.com>
Date:   Sat,  5 Mar 2022 16:12:21 +0100

Alert track moves to same tag

Diffstat:
Msrc/cmd.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/cmd.c b/src/cmd.c @@ -60,6 +60,9 @@ cmd_move(const char *name) if (!link) CMD_ERROR("No track selected"); track = tracks_vis_track(link); + if (track->tag == tag) + CMD_ERROR("Same tag"); + newpath = aprintf("%s/%s", tag->fpath, track->name); OOM_CHECK(newpath); @@ -105,6 +108,9 @@ cmd_copy(const char *name) if (!link) CMD_ERROR("No track selected"); track = tracks_vis_track(link); + if (track->tag == tag) + CMD_ERROR("Same tag"); + newpath = aprintf("%s/%s", tag->fpath, track->name); OOM_CHECK(newpath);