getmusicbee.com

Support => Developers' Area => MusicBee API => Topic started by: stax76 on March 14, 2017, 10:59:13 AM

Title: using api to change rating in auto playlist
Post by: stax76 on March 14, 2017, 10:59:13 AM
I'm changing the rating which works fine. How do I remove the track from the current view if it don't fit the rating criteria of the current auto playlist? The built in rating action does that too.

Code
    Sub Rate1(sender As Object, e As EventArgs)
        Dim currentPath = mbApiInterface.NowPlaying_GetFileUrl()
        mbApiInterface.Player_PlayNextTrack()
        mbApiInterface.Library_SetFileTag(currentPath, MetaDataType.Rating, "1")
        mbApiInterface.Library_CommitTagsToFile(currentPath)
        mbApiInterface.MB_RefreshPanels()
    End Sub

Title: Re: using api to change rating in auto playlist
Post by: Steven on March 14, 2017, 07:41:47 PM
Its an oversight on my part which i will correct. But only for v3.1

edit:
actually it should already be refreshing auto-playlists when MB_RefreshPanels() is called but i see there is a bug which should be fixed for the next v3.1 update
Title: Re: using api to change rating in auto playlist
Post by: Steven on March 14, 2017, 10:48:58 PM
http://musicbee.niblseed.com/V3_1/MusicBee31_Patched.zip

unzip and replace the exist musicbee application files
Title: Re: using api to change rating in auto playlist
Post by: stax76 on March 15, 2017, 08:00:02 PM
Thanks for the build, works fine.


I'm pretty much finished with my migration from MM, I was using it almost daily 11 years, R.I.P.