Welcome Guest

Pages: 1
Rename Mask for Plex
chrisGnPostApril 22, 2023, 05:43
Newbie
Posts: 17
Registered:
July 16, 2022, 07:20
Normal topicRename Mask for Plex

Hello,

could someone support me with a rename mask, which suits the Plex recommendation:

Music/ArtistName/AlbumName/TrackNumber - TrackName.ext

For Multi-disc:
Music/ArtistName/AlbumName/DiscNumberTrackNumber - TrackName.ext
example for disc 3:
302 - TrackName.ext

For the folder and filenames it needs to be ensured only standard characters are used. This is important because I work with m3u files for playlists.

Thank you!

One Note about the ArtistName: I would use the AlbumArtist

2MR2PostApril 22, 2023, 07:40
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicRename Mask for Plex

If you use a lot of m3u files, as do I, the only safe bet is to reduce the filename encoding to ASCII. Further, many m3u readers follow the old Windows implementation and do not like periods at the end of path components. I've run into this issue with Sonos reading my playlists. In fact many m3u readers don't like any ASCII characters that Windows didn't use to like. eg. \ * ? " < > |

All of this is easy to do.

This should be done in a Move via an action as opposed to a rename as it will properly handle any files that are in an incorrect folder structure now. These Move actions can be placed on the rename menus so that they're easy to find.

v6.15 of Yate has a new wizard to generate these Move actions from a rename template. I can send you a rename template and a replacement set suitable for all m3u readers and you can run the wizard. Alternately, if you reply with the root path your folder structure, I can send you a finished ready to go action. The root path is everything before the Artist component of the path. Let me know which way you want to go.

2MR2PostApril 22, 2023, 09:46
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicRename Mask for Plex

I've generated a move action and modified it to meet your constraints. The first time you run it you will be prompted for a root path. You will not be asked again unless you start the action while holding down the Option key.

Download and install the action at: https://2manyrobots.com/actions/Move--Plex.zip

This will give you an action named Move: Plex. The action will be on all file rename menus on the Actions submenu.

It forces ASCII and removes all non Windows acceptable characters and all trailing periods from path components.

The action will delete any containing and parent folder which becomes empty after the move. It attempts to move non audio files in the source folders. Existing files will be preserved and a duplicate will be created. Subfolders in the same folder as the audio files will be moved if they do not already exist at the destination.

Try it out and let me know if it works for you.

chrisGnPostApril 23, 2023, 03:31
Newbie
Posts: 17
Registered:
July 16, 2022, 07:20
Normal topicRename Mask for Plex

Thanks again for your great support. I will let you know how it works!

chrisGnPostApril 23, 2023, 03:45
Newbie
Posts: 17
Registered:
July 16, 2022, 07:20
Normal topicRename Mask for Plex

It worked 🙂

chrisGnPostAugust 11, 2023, 05:44
Newbie
Posts: 17
Registered:
July 16, 2022, 07:20
Normal topicRename Mask for Plex

Bringing up this rather old thread. The action works great. Now i wanted to modify the action in the following way:
The folder structure shall use an alpha group which is based on Sort Album Artist (ALBUMARTISTSORT).

example:
/music/Artist/A/Ryan Adams

I've tried to modify your action, with no success. I don't want to loose the functionality you have added in the action (e.g. force ASCII).

Thanks for your help!

chrisGnPostAugust 11, 2023, 07:38
Newbie
Posts: 17
Registered:
July 16, 2022, 07:20
Normal topicRename Mask for Plex

I think i solved it by myself. It was not so hard.
I just added the following to the rename template:
❨Folder Start❩
❨Sort Album Artist❩ ❨Truncate❩1

If there is a better (robust) way to do it, please let me know.

2MR2PostAugust 11, 2023, 07:51
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicRename Mask for Plex

That should do it but there is no error checking involved. ie. Sort Album Artist is empty.

There is an action on the resources page named Move to Alpha that has far more options. The only issue is that it uses Album Artist as the source ... not Sort Album Artist. I can always add a source field selector to the existing configuration.

source of alpha:
Album Artist
Sort Album Artist
Calculated Last Name in Album Artist
Sort Album Artist or Calculated Last Name in Album Artist (if Sort Album Artist is empty)

I can have a look at the action later this afternoon.

2MR2PostAugust 11, 2023, 16:49
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicRename Mask for Plex

Having looked at this again, I think the way you did it might be best. While the Move to Alpha action has far more options it was originally written when rename templates were far less powerful. A lot of what it is doing can be moved directly into a rename template these days.

I more than likely will update it sooner or later but what you've done will work.

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