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

whoozwah

  • Jr. Member
  • **
  • Posts: 22
I'm having a problem with Advanced Search and replace. I have set up a rule to automatically rate any song 3.5 when Love=L and another one that does the reverse, Love a song if it's rated 3.5. This works generally when I'm using it but I have a script set to launch Musicbee, wait 60 seconds and close at night so that it syncs my playcounts and loves (from the day when using my phone) so that those stats are accurate. My phone doesn't use Loves so I'm trying to get musicbee to automatically rate songs 3.5 once the love sync happens but it's not doing it. I have an everything playlist that encompasses my entire library and I have the ASR presets I built set to run automatically if the song is in my everything playlist and I've tested it and it doesn't run. Help please.

If there is no way to automatically run ASR presets at startup would it be possible to add the "if Loved" criteria to the auto-rate tracks functionality so that it could be run at startup? All I'm after is some sort of automatic way for Musicbee to rate my loved tracks so that I can keep my Loves synced between Last.fm, my flac server and my phone.
Last Edit: December 15, 2019, 03:09:07 AM by whoozwah

boroda

  • Hero Member
  • *****
  • Posts: 4744
If there is no way to automatically run ASR presets at startup would it be possible to add the "if Loved" criteria to the auto-rate tracks functionality so that it could be run at startup? All I'm after is some sort of automatic way for Musicbee to rate my loved tracks so that I can keep my Loves synced between Last.fm, my flac server and my phone.
asr presets can't be run automatically on mb startup. they are run if any tag is changed (or if new track(s) is added to the library). but you tick preset to set Loved status if you change rating.

whoozwah

  • Jr. Member
  • **
  • Posts: 22
If there is no way to automatically run ASR presets at startup would it be possible to add the "if Loved" criteria to the auto-rate tracks functionality so that it could be run at startup? All I'm after is some sort of automatic way for Musicbee to rate my loved tracks so that I can keep my Loves synced between Last.fm, my flac server and my phone.
asr presets can't be run automatically on mb startup. they are run if any tag is changed (or if new track(s) is added to the library). but you tick preset to set Loved status if you change rating.

I have all the presets I created ticked to run automatically. Also, functionally, the last.fm love sync DOES update the tags when it runs but the ASR presets don't reflect this (and run accordingly) when that sync is done. Is there anything that can be done to fix this?

EDIT: Love is not a tag. It's a virtual tag in the musicbee database. That's why it's not running. No actual tag is being updated at startup. I'm going to create custom tag (not virtual) called Loved and another ASR preset that says if Love = L, make Loved = L also. Then run my rating preset against the Loved field since it's an actual tag and see if that works.

EDIT 2: That didn't work. I am formally requesting that running ASR presets at startup OR Auto-rate tracks based on Love status be added as a feature to the plugin.
Last Edit: December 15, 2019, 05:28:46 PM by whoozwah

boroda

  • Hero Member
  • *****
  • Posts: 4744
Loved *is* a tag, though it's stored in mb database only. virtual tags are not stored anywhere at all, they are calculated dynamically.

I have all the presets I created ticked to run automatically. Also, functionally, the last.fm love sync DOES update the tags when it runs but the ASR presets don't reflect this (and run accordingly) when that sync is done. Is there anything that can be done to fix this?
this must work. what happens if you run preset manually?

whoozwah

  • Jr. Member
  • **
  • Posts: 22
Loved *is* a tag, though it's stored in mb database only. virtual tags are not stored anywhere at all, they are calculated dynamically.

I have all the presets I created ticked to run automatically. Also, functionally, the last.fm love sync DOES update the tags when it runs but the ASR presets don't reflect this (and run accordingly) when that sync is done. Is there anything that can be done to fix this?
this must work. what happens if you run preset manually?
If I select a Loved track and run the ASR preset manually it will work. If I Love a track within Musicbee then the rating will update automatically. But when I love a track outside of musicbee the ASR preset doesn't run automatically after the love sync happens at startup.

boroda

  • Hero Member
  • *****
  • Posts: 4744
but how do you love track outside mb? 'love' is mb database tag, you can't update it outside mb.

whoozwah

  • Jr. Member
  • **
  • Posts: 22
but how do you love track outside mb? 'love' is mb database tag, you can't update it outside mb.

"Love" is a last.fm rating method. You can love tracks on last.fm by going to the site and clicking the heart icon there provided you're logged into your account. I usually do it with the scrobbling app on my phone. This updates the love status in my account. Then when you open musicbee the last.fm playcount, love status and last played date are synced with the musicbee database if you have it set up to do this (which I do, I'm very invested in last.fm playback stats), updating those tags. If I love a song outside of musicbee then the next time musicbee opens, those songs are flagged as loved in the mb database due to this sync operation. But even though these tags are updated in the sync, the ASR presets don't run as a result of the last.fm sync. It only seems to run if I either manually run the ASR or if I manually love the song within musicbee. I do listen to a lot of music on my phone outside of musicbee and I do love songs on last.fm from my phone so I'm trying to get ASR to play nice with this workflow and run automatically as a result of the last.fm sync. Hope that clears up what I do and what I'm trying to accomplish. I really do appreciate your help :)

boroda

  • Hero Member
  • *****
  • Posts: 4744
asr preset *must* be run if any tag is changed by any means (eg. due to syncing with last.fm). the only reason why this wouldn't happen is if plugin is started after last.fm syncing (last.fm plugin is built-in into mb and starts before any other plugin). i think i'll add 'apply on startup' option to asr.

whoozwah

  • Jr. Member
  • **
  • Posts: 22
that's great to hear! looking forward to testing it out once you finish the patch. Thank you so much.  :)


whoozwah

  • Jr. Member
  • **
  • Posts: 22
the download link is broken. Can you please update? Thanks for turning that around so fast  8)


whoozwah

  • Jr. Member
  • **
  • Posts: 22
right on. that works. I just made it to work. I'll be home in 9 hours and I can test it against my use case and see what happens. Thanks again.

whoozwah

  • Jr. Member
  • **
  • Posts: 22
the app just crashes. I continually get this error:

MusicBee v3.3.7261.33657D  (Win10.0), 18 Dec 2019 17:25:

System.NullReferenceException: Object reference not set to an instance of an object.
   at MusicBeePlugin.AdvancedSearchAndReplaceCommand.InitializeComponent()
   at MusicBeePlugin.AdvancedSearchAndReplaceCommand..ctor(Plugin tagToolsPluginParam)
   at MusicBeePlugin.Plugin.asrEventHandler(Object sender, EventArgs e)
   at #=zUvgbLIsM5RlUtBS5uFvcgMr53IcC.#=z39UB1WA=(Object #=zRDI$Mj4=, EventArgs #=zRiDv2sk=)
   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)

boroda

  • Hero Member
  • *****
  • Posts: 4744