View Issue Details

IDProjectCategoryView StatusLast Update
0019346MMW 5Tagging / organizing (properties / auto-tools)public2022-10-20 16:15
Reporterpeke Assigned To 
PriorityhighSeveritytweakReproducibilityalways
Status closedResolutionreopened 
Target Version5.0.4Fixed in Version5.0.4 
Summary0019346: Masks: Add ability that n param can be string and not just numeric
Description$Left(string,n) -> $left('MediaMonkey',Mo) = 'Media'
$Right(string,n) -> $right('MediaMonkey',ia) = 'Monkey'

$mid have two cases:
a) $Mid(string,i,n) -> $mid('MediaMonkey',Mo,5) = 'Media'
b) $Mid(string,i,n) -> $mid('MediaMonkey',M,M) = 'Media'

This should allow users to use more complex Auto organize Masks natively eg.
$right(<Album>, :) -> Album: "Original Motion Picture Soundtrack: Footloose" = "Footloose"
$left(<album>,:)\($Right(<Album>, :) -> Album: "The Best of: ABBA" = "The Best of\ABBA"
Additional Informationhttps://www.mediamonkey.com/forum/viewtopic.php?t=102546
TagsNo tags attached.
Fixed in build2663

Relationships

related to 0019347 closedLudek Masks: Add ability to get the POS and LAST position of String within String 

Activities

Ludek

2022-09-05 11:54

developer   ~0069166

Last edited: 2022-09-05 12:35

I would not mix the $right function with something like that.

From what I see here: https://www.mediamonkey.com/forum/viewtopic.php?t=102546
user is rather asking for something like
$CutBefore(string,what)

i.e. $CutBefore(<album>, :) when album is "Original Motion Picture Soundtrack: Footloose" the result would be just "Footloose"

And we can add similar function $CutAfter(<album>, :) to get just the prefix "Original Motion Picture Soundtrack"

Ludek

2022-09-05 12:16

developer   ~0069168

Added $CutAfter and &CutBefore in 5.0.4.2662

Added todoc to be documented here https://www.mediamonkey.com/wiki/WebHelp:Configuring_Directory_and_File_Formats/5.0

Ludek

2022-09-05 14:27

developer   ~0069169

Last edited: 2022-09-05 14:29

OK, after testing I changed my mind and realized that you were right with the Left/Right terminology.
It will be better for the logic/consistency.

Renamed the function to $LeftFrom and $RightFrom
i.e. to get "Footloose" from "Original Motion Picture Soundtrack: Footloose" albub field use
$Trim($RightFrom(<album>, :))

lowlander

2022-09-09 16:58

developer   ~0069197

Mask as provided fails:
$RightFrom(<album>, :)

Without space it works:
$RightFrom(<album>,:)

$Left(<Album>, 5) does work though.

Ludek

2022-09-12 10:26

developer   ~0069211

Fixed in 2663

lowlander

2022-09-16 19:13

developer   ~0069327

Verified on 2663