Code: Select all
E:\Music\($MovePrefix($First(<Album Artist>))\<Album>\
Moderator: Gurus
Code: Select all
E:\Music\($MovePrefix($First(<Album Artist>))\<Album>\
I suck at math!Teknojnky wrote:Its like math, the innermost parenthesis evaluate first.
Auto-organize uses the music tag to mask (produce) the eventual file path and name.chrisjj wrote:As an aside, could someone explan why these are called 'mask' functions? I can see no masking!
I get the impression that K1LL3M wants to only have the "Disc 1" and "Disc 2" if there is 2 discs in the compilation. Many albums put a 1 in the disc metadata, even if there is only 1 disc producing...Seeker wrote:Does this work for you?K1LL3M wrote:Is there a way for these new mask to allow a variation in the tags such as an additional folder, with the disc number, to be added to the mask only if there is multiple discs
E.g.
If album has multiple disks, tag = path\<AlbumArtist>\<year> - <Album>\<Disc#> - <Album>\ Track # & name
Album is single disc - tag = path\<AlbumArtist>\<year> - <Album>\ Track # & name
If this is already available; could someone tell be how please
path\<AlbumArtist>\<year> - <Album>\$IF(<Disc#>,<Disc#> - <Album>$\,)Track # & name
note - I followed your convention - these won't work exactly correctly with mediamonkey rules.
This could be done with the RegExp Find & Replace script - folders with the Disc Number will be created only if some song from the album has this field >=2; if all songs from the album have disc number = 1 or undefined then this folder will not be created. Here are settings for the first mentioned example (path\<AlbumArtist>\<year> - <Album>\<Disc#> - <Album>\ Track # & name):Crow25 wrote:I get the impression that K1LL3M wants to only have the "Disc 1" and "Disc 2" if there is 2 discs in the compilation.
Code: Select all
(.+?)\\(.+)\\([^\\]+)\.([^\.\\]+)$
Code: Select all
IIf(Len(oSongData.AlbumArtistName ) > 0 And Len(oSongData.AlbumName) > 0 And Len(oSongData.Title) > 0, "$1\My Music\" & SDB.Tools.FileSystem.CorrectFilename(oSongData.AlbumArtistName & "\" & IIf(oSongData.Year > 0, oSongData.Year & " - ", "") & oSongData.AlbumName & "\" & IIf(SQLQuery("SELECT Max(CAST(DiscNumber AS integer)) FROM Songs WHERE IDAlbum = " & oSongData.Album.ID & " GROUP BY IDAlbum") > 1, oSongData.DiscNumberStr & " - " & oSongData.AlbumName & "\", "") & IIf(Len(oSongData.TrackOrderStr) > 0, oSongData.TrackOrderStr & " - ", "") & oSongData.Title & ".$4"), "$&")
Code: Select all
IIf(Len(oSongData.AlbumArtistName ) > 0 And Len(oSongData.AlbumName) > 0 And Len(oSongData.Title) > 0, "$1\My Music\" & SDB.Tools.FileSystem.CorrectFilename(oSongData.AlbumArtistName & " - " & oSongData.AlbumName & IIf(oSongData.Year > 0, " - " & oSongData.Year, "") & "\" & IIf(SQLQuery("SELECT Max(CAST(DiscNumber AS integer)) FROM Songs WHERE IDAlbum = " & oSongData.Album.ID & " GROUP BY IDAlbum") > 1, "Disc " & oSongData.DiscNumberStr & "\", "") & IIf(Len(oSongData.TrackOrderStr) > 0, oSongData.TrackOrderStr & ". ", "") & oSongData.ArtistName & " - " & oSongData.Title & ".$4"), "$&")