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

BeeBeeKing

  • Full Member
  • ***
  • Posts: 236
Yes  I want the index and text all in the comment tag as in my ripping program it is easy to enter it there. Sometimes it is a bio on the artist and some times I just put the country of origin. They are all albums so shouldnt effect the sorting as the 5 digit number will be at the beginning of the tag.
This is something I should have told you at the beginning, sorry.
Also did you see my "edit" in the previous post?

boroda

  • Sr. Member
  • ****
  • Posts: 4595
Yes  I want the index and text all in the comment tag as in my ripping program it is easy to enter it there. Sometimes it is a bio on the artist and some times I just put the country of origin. They are all albums so shouldnt effect the sorting as the 5 digit number will be at the beginning of the tag.
This is something I should have told you at the beginning, sorry.
No, your clarification was useful.

Also did you see my "edit" in the previous post?
Yes, but after I wrote my post.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
bluesbeat, try this presets. I think you should delete previous presets because they have similar names and you don't need them.

BeeBeeKing

  • Full Member
  • ***
  • Posts: 236
Well I tried that. This time it only added the 4 zero's to tags that had a number then text. Those fields that just had a number were not operated on.


BeeBeeKing

  • Full Member
  • ***
  • Posts: 236
Thank you boroda74, I tried a small sample and that appears to work fine.
By the way the last preset adding the zero's took about 1 hour, during which music bee appears not to respond, but when the hard drive stopped flashing I figured it was done and closed the program from task manager. Iwas processing 210GB of files so probably why.

I am unsure what the buttons, submit, download new, dowload all are supposed to do? also unsure how "Tick presets which should be automatically applied if tags have changed?

Thank you once agin for your fine preset and patient help.
Geoff

boroda

  • Sr. Member
  • ****
  • Posts: 4595
By the way the last preset adding the zero's took about 1 hour, during which music bee appears not to respond, but when the hard drive stopped flashing I figured it was done and closed the program from task manager. Iwas processing 210GB of files so probably why.
I'm doubful that I can speedup this command, but 210GB is really large library (my library is ~40GB). Probably when the hard drive stopped flashing MB needs some time to refresh UI, but I wouldn't recommend to close MB from task manager.

I am unsure what the buttons, submit, download new, dowload all are supposed to do? also unsure how "Tick presets which should be automatically applied if tags have changed?
Its only a beta version of command. 'Submit' will e-mail me selected preset (this currenly works), both 'download' buttons don't work for now. Also there are a bugs with refreshing list of presets after creating/editing presets and creating/editing requires to run MB as admin, etc.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
boroda74, i dont know exactly what is being done but each plugin runs in its own thread so any tasks within the plugin shouldnt impact the MB GUI (apart from generally slowing down the computer of course). The only command which i expect you would be using that invokes the GUI thread is MB_RefreshPanels() and i wouldnt recommend using that too often as its a fairly expensive in terms of processing.

However, if you do anything in your plugin that invokes the MB GUI thread and runs that thread then it would lock up the MB GUI. As you have a dialog window I guess you might be doing that? If that is the case you could create your own thread when performing long tasks

boroda

  • Sr. Member
  • ****
  • Posts: 4595
is MB_RefreshPanels() and i wouldnt recommend using that too often as its a fairly expensive in terms of processing.
I always call MB_RefreshPanels() only once after all file updates were done. Actually I think that MB_RefreshPanels() should be executed very quickly even if very large number of files were updated, so I'm not fully understanding how it can be that mb is still freezed and there is no hdd activity.

However, if you do anything in your plugin that invokes the MB GUI thread and runs that thread then it would lock up the MB GUI. As you have a dialog window I guess you might be doing that?
I'm not doing anything special to execute plugin in GUI thread.

each plugin runs in its own thread so any tasks within the plugin shouldnt impact the MB GUI (apart from generally slowing down the computer of course).
Yes, but this is true only when plugin command is invoked by receiving notification (like 'auto rate at startup' option which executes background task), but not when command is invoked from MB menu.

If that is the case you could create your own thread when performing long tasks
Yes, I thought about creating threads for long tasks, but there is problem: if one command executes QueryFiles/GetNextFile loop and another command (of the same plugin but in different thread) executes similar loop then 1st loop is terminated.

BeeBeeKing

  • Full Member
  • ***
  • Posts: 236
On both occasions when I processed the batch for changes in the comments fields I waited until there was no hdd activity and then exited MB via task manager. I checked the tags and all appear to be processed. I am on Win 7 64 bit with a quad core processor....added that in case it helps.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
On both occasions when I processed the batch for changes in the comments fields I waited until there was no hdd activity and then exited MB via task manager.
How much time you were waiting between noticed no hdd activity and terminated MB from task manager?

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
each plugin runs in its own thread so any tasks within the plugin shouldnt impact the MB GUI (apart from generally slowing down the computer of course).
Yes, but this is true only when plugin command is invoked by receiving notification (like 'auto rate at startup' option which executes background task), but not when command is invoked from MB menu.
you are right about that and something i overlooked. I want to avoid as much as possible plugins interfering with the MB GUI, so i will look to have plugin commands that are invoked from the menu run in the plugin thread as well

If that is the case you could create your own thread when performing long tasks
Yes, I thought about creating threads for long tasks, but there is problem: if one command executes QueryFiles/GetNextFile loop and another command (of the same plugin but in different thread) executes similar loop then 1st loop is terminated.
that is right but is that really much of a problem? I dont think its too much of a restriction that the user can only run one tagging operation at a time and it would complicate things on the MB side. But if i address the first point above hopefully it will solve this issue, although i'm not sure how forms behave when created on their own thread - i do know its advisable not to access forms/controls and update them from a different thread.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
that is right but is that really much of a problem? I dont think its too much of a restriction that the user can only run one tagging operation at a time and it would complicate things on the MB side. But if i address the first point above hopefully it will solve this issue, although i'm not sure how forms behave when created on their own thread - i do know its advisable not to access forms/controls and update them from a different thread.
How plugin should notify user what is happening in friendly way? For example user opened several plugin windows then click 'Procced' in one window. What should be happened with other windows? Are they must just become disabled? Or clicking on 'procced' in other windows should display warning?

And the main problem: how user can terminate plugin background tasks?

I think it would be great if you provide a way to invoke 'MB background task' thread with some access to MB statusbar which already have means to terminate backgroud task.

EDIT:
I would want that plugin commands behave exactly as native commands.
Last Edit: August 14, 2011, 01:59:52 PM by boroda74

BeeBeeKing

  • Full Member
  • ***
  • Posts: 236
On both occasions when I processed the batch for changes in the comments fields I waited until there was no hdd activity and then exited MB via task manager.
How much time you were waiting between noticed no hdd activity and terminated MB from task manager?
Probably 10 minutes the first time and 5 minutes the second time.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
When you iterate through a query resultset, MB needs to keep a list of the matching files and the current position you have iterated to and there is no mechanism to associate a GetNext call with a specific query. The API is built around using standard string and integer datatypes so its easy to work with C++ - thats why it doesnt return an enumerator object for each query.
You could simply do a test when the user clicks Proceed and show a message if another of your commands is still running, or alternatively iterate though the query resultset quickly and build up your own internal resultset which you then use to run your file operations from.

MB internally has a class that can run tasks in the background and have them display the status on the taskbar with the termination button, so i will look to expose that via the API.