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

boroda

  • Sr. Member
  • ****
  • Posts: 4659

boroda

  • Sr. Member
  • ****
  • Posts: 4659
Thanks! It's working now. But maybe it would be better if it writes display artist from performer tag rather than from original artist tag. That will allow to rewrite display artist value based on performer tag for any files regardless of their current artist tag.
http://www.mediafire.com/file/gbxicvbkghoe0k6/mb_TagTools_2018-03-16.zip


redwing

  • Guest
Thanks! I am testing it now.

By the way I found when this error occurs that you asked before:

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'AdvancedSearchAndReplacePlugin'.
   at System.Windows.Forms.Control.CreateHandle()
   at System.Windows.Forms.Form.CreateHandle()
   at System.Windows.Forms.Control.get_Handle()
   at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
   at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
   at MusicBeePlugin.PluginWindowTemplate.display(Boolean modalForm)
   at MusicBeePlugin.Plugin.asrEventHandler(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)

The plugin window is minimized, but the user forgets it and runs ASR command again to launch the window, then this error shows up and a restart of MB is required to use this plugin. 

redwing

  • Guest
this works for me: A/b|C/d|*(e)/\\@tc($1)

No, it doesn't handle correctly some punctuation characters.

Try

abcde, (ABCDE)

Then you get

bbddE,@1)


Maybe supporting exception words too in this preset is too much. Converting all to either lowercase or titlecase would be enough.


redwing

  • Guest
I'm not sure how the case conversion code works.

For instance, I have these two titles.

PIANO SONATA In G Major
symphony no. 1 in b minor

and want to convert them to

Piano Sonata in G major
Symphony No. 1 in B minor

Can you show me an example code that can convert both titles?

Regarding the bug, are you gonna allow multiple instances of the ASR command? I don't think it's a good idea because each window might have different template and it could end up losing the template the user wanted to use. Why not just restore the hidden window if the user runs the command again?
Last Edit: March 16, 2018, 10:30:20 PM by redwing

boroda

  • Sr. Member
  • ****
  • Posts: 4659
Regarding the bug, are you gonna allow multiple instances of the ASR command? I don't think it's a good idea because each window might have different template and it could end up losing the template the user wanted to use. Why not just restore the hidden window if the user runs the command again?
just because i'm failed to determine when and where existing hidden windows become disposed (still existing, but unusable anymore).

boroda

  • Sr. Member
  • ****
  • Posts: 4659
I'm not sure how the case conversion code works.

For instance, I have these two titles.

PIANO SONATA In G Major
symphony no. 1 in b minor

and want to convert them to

Piano Sonata in G major
Symphony No. 1 in B minor

Can you show me an example code that can convert both titles?
what command or preset do you meant?


redwing

  • Guest
Regarding the bug, are you gonna allow multiple instances of the ASR command? I don't think it's a good idea because each window might have different template and it could end up losing the template the user wanted to use. Why not just restore the hidden window if the user runs the command again?
just because i'm failed to determine when and where existing hidden windows become disposed (still existing, but unusable anymore).

I don't know but the hidden window is always usable for me. How about restoring it anyway even if it's unusable? Then the user will close it down and run the command again. I think that would be better than possibly having multiple hidden windows without knowing it.

boroda

  • Sr. Member
  • ****
  • Posts: 4659
I don't know but the hidden window is always usable for me. How about restoring it anyway even if it's unusable? Then the user will close it down and run the command again. I think that would be better than possibly having multiple hidden windows without knowing it.
then this exception arises. but i think i've found the problem, it seems that i've accidentally changed couple lines of code at some time. now its working fine for me as previously.

http://www.mediafire.com/file/gbxicvbkghoe0k6/mb_TagTools_2018-03-16.zip


boroda

  • Sr. Member
  • ****
  • Posts: 4659
what command or preset do you meant?

multiple search & replace preset.
i'm not sure what do you need this preset for this purposes for at all. use 'change case' command or preset. 'multiple search and replace' preset is not to change *rules* for one search/replace pattern, its for applying several (unlimited) steps of search/replace at once with the same rules.

edit: the examples we both tried were just for testing, not for some practical reasons.
Last Edit: March 17, 2018, 12:12:07 AM by boroda74

redwing

  • Guest
Of course I can use the change case command for that.
I just thought you meant it's possible when you show the example code "A/b|C/d|*(e)/\\@tc($1)" for case conversion.
If it's not supported, it's fine. Thanks for your support!