Welcome Guest

Pages: 1 2
Rename/moving files
chrisg81PostAugust 22, 2016, 17:55
Newbie
Posts: 13
Registered:
August 22, 2016, 19:49
Hot topicRename/moving files

I have a simple question/request regarding rename and moving files with yate.

I want to move my complete music collection to the following file structure:

.../(Genre)/(Album Artist)/(Year) – (Album)/(track number) (title)

In case of a multi disc album
.../(Genre)/(Album Artist)/(Year) – (Album)/(disc number)-(track number) (title)

It can be assumed that all above mentioned tags are correctly maintained.
Important: All non audio files shall be moved also (e.g. folder.jpg)

For playback i’m using sonos which cannot handle m3u8 playlists (no UTF-8 support). So i have to stick with m3u. This means it is really important only ascii characters are used for the filenames.

I found several actions here in this forum which fulfill some of my requirements but i am not able to put this together to get exactly what i described above.

Thank for your support.

2MR2PostAugust 22, 2016, 18:17
Avatar photo
Administrator
Posts: 2397
Registered:
August 23, 2012, 19:27
Hot topicRe: Rename/moving files

Questions:

1) Do you want Track and Disc numbers padded. eg. 01 as opposed to 1
2) Is your 'Disc Count' field maintained or will it be necessary to check for the presence of more than one Disc Number. I'm assuming that you only want the diskless form if all the tracks have Disc 1. (or 0?). Basically, how would you like more than one disc evaluated if Disc Count is not set?
3) Are you going to load multiple albums in the UI or do one album at a time or run it through the batch processor with one folder==one album? Or some other structure. This is largely irrelevant unless Disc Count is unreliable and has to be calculated. Further having multiple albums in the same folder will definitely mess up the movement of the non audio files. Optimal is one album/folder.
4) Do you want to specify an absolute path for everything on top of Genre, or is it relative to the current folder? If relative, I need the relationship.

I'm on Sonos as well and they will handle Latin-1 characters so UTF-8 only has to be dropped to Latin-1.

Let me know the answers and I'll send you something to work with.

chrisg81PostAugust 23, 2016, 02:42
Newbie
Posts: 13
Registered:
August 22, 2016, 19:49
Hot topicRe: Rename/moving files

Wow, thank you for the quick reply.

1) Track number padded (2 digits), disc number 1 digit
2) Disc Count field is maintained. Diskless form is only needed if all tracks have Disc 1 or Disc Count is not set.
3) One folder is always one album. This is already given with my actual file structure. Is it possible to support both ways (multiple albums and one album in the UI)?
4) Everything on top of Genre is a absolute path

If Latin-1 is sufficient than i'm fine. Additionally to Sonos is use Audio Station (Package from Synology). I think Audio Station also handles Latin-1 characters.

2MR2PostAugust 23, 2016, 06:37
Avatar photo
Administrator
Posts: 2397
Registered:
August 23, 2012, 19:27
Hot topicRe: Rename/moving files

Great. As your stuff is all properly tagged and structured, the action will work in any execution mode.

I'm flying out this morning for a day trip so I'll get you something tomorrow morning or later tonight. My laptop is running the upcoming v3.14 so I need a test machine to generate the action for you.

chrisg81PostAugust 23, 2016, 12:12
Newbie
Posts: 13
Registered:
August 22, 2016, 19:49
Hot topicRe: Rename/moving files

Great to hear!

Thank you! I'm looking forward to the new action.

2MR2PostAugust 23, 2016, 17:21
Avatar photo
Administrator
Posts: 2397
Registered:
August 23, 2012, 19:27
Hot topicRe: Rename/moving files

Delivered by email

chrisg81PostAugust 24, 2016, 13:56
Newbie
Posts: 13
Registered:
August 22, 2016, 19:49
Hot topicRe: Rename/moving files

...and works like a charm. Thank you

cromPostSeptember 1, 2016, 10:14
Newbie
Posts: 9
Registered:
September 1, 2016, 13:55
Hot topicRe: Rename/moving files

Any chance you can post the script here? I am thinking about migrating across from media monkey and working through a list of 'must haves'. One of these is the ability to rename, create a directory structure and move files based upon certain rules. Examples of these rules are:

Artist
|
- album 1 [year] [bitrate]
- album 2 [year] [bitrate]
-disk 1
-disk 2
- album 3 [year] [bitrate]

Not very complicated but I will probably need to at least customise some existing actions.

Also, I've had a look around but can't find an intro to action writing?

Thanks,
Crom

2MR2PostSeptember 1, 2016, 10:48
Avatar photo
Administrator
Posts: 2397
Registered:
August 23, 2012, 19:27
Hot topicRe: Rename/moving files

Not complicated at all. I'll modify the action for your format and post it here. I'm assuming disk 1, disk2 are sub-folders in album 2???

Can I assume that your Disc Count metadata is populated? What do you want the filenames to look like?

Bitrate on the album folders could be problematic in the case of VBR encoded files as each track may have a different bitrate. This only applies to mp3 tracks but even with higher quality audio formats it is conceivable that different tracks have different bitrates. You may not care about this.

Also, just my opinion but for a lot of audio players with libraries it is a better policy to keep the content of albums with multiple CDs intact in the same folder. Further it is better to give all tracks in a multiple CD album the same Album name. (i.e.. no not append the disc number to the Album field). Use the Disc and Disc Count fields to differentiate the tracks. Use disc-track numbers on filenames to handle potential name duplicates or simply use Yate's duplicate modifications when renaming. Just my opinion and I am willing to proceed however you'd like.

Post a few answers and I'll put something together for you.

As far as an intro to action writing...I sheepishly have to say that its been promised for quite a while now. I've got quite a bit written and I'm planning to finish it off now that v3.14 is out the door.

2MR2PostSeptember 1, 2016, 18:02
Avatar photo
Administrator
Posts: 2397
Registered:
August 23, 2012, 19:27
Hot topicRe: Rename/moving files

I had some time so I put together an action to implement the folder structure you requested.

The action is definitely overkill. The actual Move code is about 10 statements. There are about 150 lines of documentation and sanity checks included. I did this as I have no idea how clean your metadata is. I validated anything I could think of.

- the action will work in all possible modes, regardless as to how many albums are loaded. The action would have been far simpler if I could assume a single album was all that was loaded.
- the action will stop immediately if any tracks are missing the Album field.
- No album which has empty or inconsistent Artist, Year or Bit Rate data will be moved. If you're running interactively, you will be notified as to which albums had issues. As I said in the previous post, VBR encoded mp3 files will almost certainly fail the sanity checks.
- I'm basing it totally on Disc number and ignoring the Disc count. If any track in an album has a Disc number > 1, it will be moved to a Disc sub-folder. Again, far simpler if I knew that Disc Count could be trusted.
- Non audio files will be moved to the 'album' folder.
- Filenames are not changed as I don't know what you wanted. If for some strange reason the original filename is a duplicate when moved, all tracks will be preserved by duplicate handling in the rename template on the move statements.

You must edit the action to change the destination folder. It is currently set to \h/Temp/Test which is a test folder off my home directory. The statement to be changed is clearly marked and is the first non comment statement in the action.

The action can be downloaded at: https://2manyrobots.com/actions/CromMove.zip

Unzip the file and import it via Yate>Import Preferences or by dragging it to the main window's file list area. An action named 'Crom-Move' and a rename template named 'Start Filename' will be installed.

I've done some non exhaustive testing. Try it out. If you'd like anything changed or if you'd like it simplified, left me know about your metadata situation. A simple move based on metadata such as /basepath/Artist/Album/file can be done in a single statement. Two if you want to move the non audio files šŸ™‚

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