Welcome Guest

Pages: 1
Need help with rename/move
SvenMPostOctober 14, 2023, 02:00
Newbie
Posts: 2
Registered:
October 14, 2023, 05:17
Normal topicNeed help with rename/move

I've been struggling with renaming an moving my audio files.
When buying music online, I will download it to a /downloads/music folder, where I use Yate to review and update metadata. Once I've made the necessary changes, I want to move it to a folder structure on my NAS.

The file & folder structure on the NAS is as follows:

For compilations:
[Compilation] > (Grouping >) Album > (D#-)T# - Artist - Title

For non-compilation albums
(Sort) Album Artist > (Grouping >) Album > (D#-)T# - Title

If the Sort Album Artist is available, it is used, otherwise Album Artist is used for the Album Artist folder level. The "Grouping" level is optional and should only be created when the grouping tag is set. This is where I'm strugling.

With previous version, this was working as expected with the template below:

❨IfMultiDisc❩
    ❨Disc Pad2❩-
❨endIf❩
❨Track Pad2❩
❨IfCompilation❩
     - ❨Artist❩
❨endIf❩
 - ❨Title❩
❨IfDup❩
     (❨Dup #❩)
❨endIf❩

❨Folder Start❩

❨Album❩
❨IfExists Version❩
     [❨Version❩]
❨endIf❩

❨Folder Start❩

❨IfExists Grouping❩
    ❨Grouping❩
❨endIf❩

❨Folder Start❩

❨IfCompilation❩
    [Compilations]
❨Else❩
    ❨IfExists Sort Album Artist❩
        ❨Sort Album Artist❩
    ❨Else❩
        ❨Album Artist❩
    ❨endIf❩
❨endIf❩

With the latest update, I'm now getting an error status that Folder Start 2 could not be resolved when initiating a move using the template. I can understand this being the case when a Grouping is not defined as it basically means there is a Folder Start without a folder name.

After searching on the forum, I found this example: https://2manyrobots.com/forum/?mingleforumaction=viewtopic&t=1012, which seemed to be similar what I was trying to achieve, so I adapted my template using the (Current Folder) as follows:

❨IfMultiDisc❩
    ❨Disc Pad2❩-
❨endIf❩
❨Track Pad2❩
❨IfCompilation❩
     - ❨Artist❩
❨endIf❩
 - ❨Title❩
❨IfDup❩
     (❨Dup #❩)
❨endIf❩

❨Folder Start❩

❨Album❩
❨IfExists Version❩
     [❨Version❩]
❨endIf❩

❨Folder Start❩

❨IfExists Grouping❩
    ❨Grouping❩
❨Else❩
    ❨IfCompilation❩
        [Compilations]
    ❨Else❩
        ❨IfExists Sort Album Artist❩
            ❨Sort Album Artist❩
        ❨Else❩
            ❨Album Artist❩
        ❨endIf❩
    ❨endIf❩
❨endIf❩

❨Folder Start❩

❨IfExists Grouping❩
    ❨IfCompilation❩
        [Compilations]
    ❨Else❩
        ❨IfExists Sort Album Artist❩
            ❨Sort Album Artist❩
        ❨Else❩
            ❨Album Artist❩
        ❨endIf❩
    ❨endIf❩
❨Else❩
    ❨Current Folder❩
❨endIf❩

Although the error is gone, and the move is executed, I now find that I have two levels of Album Artist folders:
Album Artist > Album Artists > Album > Track

Maybe I'm not understand the use of the (Current Folder), or maybe it's the combination of the rename template with the move action which is different from the example I found.
Any help would be greatly appreaciated.

2MR2PostOctober 14, 2023, 07:49
Avatar photo
Administrator
Posts: 2364
Registered:
August 23, 2012, 19:27
Normal topicNeed help with rename/move

This is due to my overzealous desire to get rid of inadvertent empty folders path components.

However, I can see that your grouping logic was using the empty folder to avoid a path altogether. This makes sense. Current Folder inserts a previously existing folder path and doesn't help in this case as you simply don't want the path component.

I'm going to treat this as a bug and go back to allowing empty path components in a template.

I'll see if I can get out a patch or v6.7.1 (which is ready) later today.

SvenMPostOctober 14, 2023, 07:55
Newbie
Posts: 2
Registered:
October 14, 2023, 05:17
Normal topicNeed help with rename/move

Thanks for the quick response.

2MR2PostOctober 14, 2023, 10:02
Avatar photo
Administrator
Posts: 2364
Registered:
August 23, 2012, 19:27
Normal topicNeed help with rename/move

It turns out there are valid reasons for flagging empty path components as errors. Far too many people do not use IfExists and get unexpected results.

I think the best solution is to flag empty path components as errors by default. I'll introduce a new token which when placed in a Folder Start definition causes the entire Folder Start to be ignored if the resultant data is empty. Something like (Ignore if Empty).

This would mean that you'd have to add the token before your (IfExists Grouping) token or as an (Else). The new token has to be placed in each (Folder Start) where it is applicable.

❨Folder Start❩
❨Ignore if Empty❩
❨IfExists Grouping❩
❨Grouping❩
❨endIf❩

Will this work for you?

2MR2PostOctober 14, 2023, 17:30
Avatar photo
Administrator
Posts: 2364
Registered:
August 23, 2012, 19:27
Normal topicNeed help with rename/move

v6.17.1 will be released tomorrow. The Ignore if Empty token works well. It allows for the disabling of the error message when you know it is valid and yet lets the unexpected errors come through.

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.036 seconds.