Author Topic: Additional Tagging & Reporting Tools  (Read 808338 times)

redwing

  • Guest
So if I clear the word list in change case command and click ASR button, would any presets work as it used to?
it will just clear the list of excepted words for asr, i.e. asr wont except any words by default and functions \@tc($1) and \@tc($1,) will do the same.

So far it's working fine for me as it used to. But \@tc($1,a the an) function can't be used for classical music title formatting as it always capitalizes last word. So I have to use \@lc in a separate step.

BTW I noticed ASR preset folder includes one Russian named MSR test preset.

boroda

  • Hero Member
  • *****
  • Posts: 4171
"Sort performers by their roles" preset is no longer working. It gives syntax error. I wonder if you may have changed something when you're working on another performer preset later.
its not only this preset, almost half of presets were affected by this bug. update plugin and reimport all presets. also now use '\(' and '\)' instead of explicit (not service) '(' and ')' in both search (this was required previously) and *replace* patterns of ASR/MSR.

http://www.mediafire.com/file/h2t08o9562efboi/mb_TagTools_latest.zip

boroda

  • Hero Member
  • *****
  • Posts: 4171

So far it's working fine for me as it used to. But \@tc($1,a the an) function can't be used for classical music title formatting as it always capitalizes last word. So I have to use \@lc in a separate step.
what is the common practice of capitalizing in english? must the last word be capitalized always, sometimes of never?

BTW I noticed ASR preset folder includes one Russian named MSR test preset.
i'll delete it.

redwing

  • Guest
its not only this preset, almost half of presets were affected by this bug. update plugin and reimport all presets.

Thanks! it's now working.

what is the common practice of capitalizing in english? must the last word be capitalized always, sometimes of never?

Never. It's only capitalized in titles (books, movies, albums, songs, etc).
But that rule doesn't apply to classical music title since its format is too diverse partly depending on its sub-genre. I'm not asking you any new feature about this. Just saying the support for excepted words in that format isn't of much help.

redwing

  • Guest
also now use '\(' and '\)' instead of explicit (not service) '(' and ')' in both search (this was required previously) and *replace* patterns of ASR/MSR.

- It's only required in regex mode, right?
- For search \( works. For replace, ( works in my test (both in MSR window and MSR preset)

boroda

  • Hero Member
  • *****
  • Posts: 4171
more exactly its required if you use asr functions (they can be used in non-regex mode, though they are useless without regexes).

a minor bug is fixed:

http://www.mediafire.com/file/h2t08o9562efboi/mb_TagTools_latest.zip

boroda

  • Hero Member
  • *****
  • Posts: 4171
what is the common practice of capitalizing in english? must the last word be capitalized always, sometimes of never?

Never. It's only capitalized in titles (books, movies, albums, songs, etc).
ofc i meant titles, not generic text.

redwing

  • Guest
Getting this error message if you minimize copy tag command window and run the command again:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.Collections.ArrayList.get_Item(Int32 index)
   at System.Windows.Forms.DataGridViewColumnCollection.get_Item(Int32 index)
   at System.Windows.Forms.DataGridView.FlushDisplayedChanged()
   at System.Windows.Forms.DataGridView.PerformLayoutPrivate(Boolean useRowShortcut, Boolean computeVisibleRows, Boolean invalidInAdjustFillingColumns, Boolean repositionEditingControl)
   at System.Windows.Forms.DataGridView.OnColumnCollectionChanged_PreNotification(CollectionChangeEventArgs ccea)
   at System.Windows.Forms.DataGridViewColumnCollection.Clear()
   at System.Windows.Forms.DataGridView.Dispose(Boolean disposing)
   at System.ComponentModel.Component.Dispose()
   at System.Windows.Forms.Control.Dispose(Boolean disposing)
   at System.Windows.Forms.Form.Dispose(Boolean disposing)
   at MusicBeePlugin.CopyTagCommand.Dispose(Boolean disposing)
   at System.Windows.Forms.Form.Close()
   at MusicBeePlugin.PluginWindowTemplate.display(Boolean modalForm)
   at MusicBeePlugin.Plugin.copyTagEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

You may want to check all other commands about the same error.
Last Edit: March 23, 2018, 07:21:38 AM by redwing

boroda

  • Hero Member
  • *****
  • Posts: 4171
i cant reproduce this bug, redownload plugin from permanent link as i've changed something related recently:

http://www.mediafire.com/file/h2t08o9562efboi/mb_TagTools_latest.zip

if the bug persists i'll make debug version.

redwing

  • Guest
That fixed it. Now re-running the command restores the hidden window. Thanks!

redwing

  • Guest
"Convert all artists with their roles after comma to performers" preset is no longer working with syntax error. I think it's about () to be replaced by \( \) in the code, but I can't fix it myself.

Alina

  • Newbie
  • *
  • Posts: 4
I have no experience with regex, and probably no talent for it :-(
Still i made an effort to accomplish this:

Many of my music files contain dates such as 1-1-1970 or 1980-11-12
But i do not care about days and months, and would like to permanently change these tags so they only contain the year (1970, 1980 etc.)

I found that to isolate the year, this regex should work:
[0-9]{4}
And it indeed works when i tried it on an online regex tester.

But, i can't figure out how to setup this plugin to make this work.
I tried if i could start with some 'extract' presets to perhaps tweak those, but failed miserably.

It would be great if somebody would be willing to show what i need to enter where exactly.

redwing

  • Guest
Many of my music files contain dates such as 1-1-1970 or 1980-11-12
But i do not care about days and months, and would like to permanently change these tags so they only contain the year (1970, 1980 etc.)

I found that to isolate the year, this regex should work:
[0-9]{4}
And it indeed works when i tried it on an online regex tester.

But, i can't figure out how to setup this plugin to make this work.
I tried if i could start with some 'extract' presets to perhaps tweak those, but failed miserably.

It would be great if somebody would be willing to show what i need to enter where exactly.

It's much easier to tweak an existing code than to create a new one from scratch. Also the chances are such code already exists if it's for a common task.
Run advanced search & replace command and import all presets.
Type "year" in the filter bar at the top.
Then you will fined "Replace full date with year in Tag 1" preset.
Select tracks and click preview to see if it shows a correct result and proceed.

Now if you want to edit the code, click copy button, then it will create a copy of the preset.
Select that preset, click edit button, then edit the code.  That's how you create a custom preset with your own code.

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8664
No need for regex. Or for modifying an existing preset.
I see two presets which might help you. Search for 'date' and you'll come up with:
- Remove month and day from release date
- Replace full date with year in '<Tag 1>'

I think the second one will do what you want. But I suggest you test on one or two tracks before you run everything through it.
Download the latest MusicBee v3.5 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

Alina

  • Newbie
  • *
  • Posts: 4
No need for regex. Or for modifying an existing preset.
I see two presets which might help you. Search for 'date' and you'll come up with:
- Remove month and day from release date
- Replace full date with year in '<Tag 1>'

I think the second one will do what you want. But I suggest you test on one or two tracks before you run everything through it.

Thank you Phred!

That's working great indeed. (the first one)
And a bit silly of me that i had overlooked that existing preset.

(the one that redwing proposed did not work for yyyy/mm/dd)