We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b072a77 commit 49b729dCopy full SHA for 49b729d
1 file changed
mutate
@@ -259,7 +259,11 @@ def remove(what, df):
259
def edit(df, idx, col):
260
if idx == None:
261
if col == f_filename:
262
- val = prompt("New template for 'filename': ", default="%n %a - %t")
+ single_artist = df[f_artist].nunique() == 1
263
+ val = prompt(
264
+ "New template for 'filename': ",
265
+ default = "%%n %s%%t" % ('' if single_artist else "%a - ")
266
+ )
267
zero_pad = None
268
if '%n' in val and f_num in df.columns:
269
zero_pad = str(df[f_num].map(lambda x: len(str(x))).max())
0 commit comments