Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - karaluh

Pages: 1 2
I created a label and a check box but they are using default Windows appearance and not MusicBee skin. How can I change it? Below is the screenshot and code.

                Label playCountSyncLabel = new Label();
                playCountSyncLabel.Location = new Point(0, 25);
                playCountSyncLabel.AutoSize = true;
                playCountSyncLabel.Text = "synchronise from ListenBrainz to your library on startup:";
                // Check box.
                playCountSyncCheckBox = new CheckBox();
                playCountSyncCheckBox.Location = new Point(0, 43);
                playCountSyncCheckBox.AutoSize = true;
                playCountSyncCheckBox.Text = "synchronise Play Count";

The below code is executed each time a track is skipped, even in the cases where the track playcount is not increased.

case NotificationType.PlayCountersChanged:

The first - and hopefully last - beta. Offline scrobbling implemented, no listens should be lost from now on.

I just released another alpha (link below) which is much more stable. I'm scrobbling in parallel to and ListenBrainz and am actually getting higher scrobble count in ListenBrainz. That's probably because I'm scrobbling very short tracks also, which the plugin doesn't seem to be doing.

Please note that there is still no offline scrobbling so in case of issues with your internet connection or ListenBrainz internal problems your scrobbles will be lost.

And here's the link to the download:

MusicBee Wishlist / Re: Listenbrainz as alternative to
« on: April 18, 2020, 11:58:38 PM »
I wrote a ListenBrainz plug-in, keep in mind that this is a very early version.

It's so fresh that it's still hot, it's not yet well tested even by me and has several restrictions:

1. As I said it's not very well tested, I just created the first version.
2. Breaks when there are issues on ListenBrainz side. If suddenly a dialog box appears with some errors regarding ListenBrainz I would very much like to get the full error message from you.
3. No MBIDs in the scrobble, MusicBee doesn't expose them in the API. I might be able to workaround it using custom tags, but if that fails I would have to read tags for each format supported by MusicBee myself which would be A LOT of work.
4. No offline scrobbling, all scrobbles are lost when there's no internet.
5. No playcount sync.
6. No "now listening".
7. Or any other feature the scrobbler has.

You can see the code, report bugs, etc. on GitHub. Also, since this is my first C# project a code review would be much appreciated. I'm also not sure if the licence can be GPL, if that's not the case please let me know.

The compiled plug-in is here:

To be able to use it you obviously need a ListenBrainz account. The plugin requires your user token to be able to submit scrobbles which you can get here

Developers' Area / The best way to display errors to the user
« on: April 18, 2020, 12:48:32 PM »
I'm currently using MessageBox.Show(), is there a better way? If not, can the dialog be at least displayed with MB skin?

MusicBee API / Re: MusicBee API
« on: April 16, 2020, 10:11:56 PM »
I'm writing a ListenBrainz scrobbler plugin, is it possible to extend the NowPlaying_GetFileTag method to get MBIDs?

MusicBee API / Re: Newbie question: how to save plugin settings?
« on: April 16, 2020, 09:53:46 PM »
Ok, I figured it out that saving plugin settings aren't handled by the API and you have to take care of your shit yourself. There is no need to call the SaveSettings method, you just have to implement everything you need to do in its body.

Developers' Area / Re: Newbie here, stuck on tutorial
« on: April 06, 2020, 08:10:46 PM »
My issue was my stupidity. I forgot to enable the plugin :P

MusicBee API / Newbie question: how to save plugin settings?
« on: April 05, 2020, 09:26:57 PM »
I have no prior knowledge of neither C# nor Visual Studio but managed to finish the plugin tutorial. I did that because I want to write a ListenBrainz scrobbler. The first thing I need is a text box for user ID and a working save button in the configure dialog. I've set about.ConfigurationPanelHeight to a non-zero value and the textBox is displayed, but how do I save the settings? I suspect I have to call the SaveSettings() method but where in the code should I do it?

Developers' Area / Re: Newbie here, stuck on tutorial
« on: March 23, 2020, 09:10:57 PM »
Same issue here. The code compiles, there are no warnings, but there is no menu entry either.

namespace MusicBeePlugin
    public partial class Plugin
        private MusicBeeApiInterface mbApiInterface;
        private PluginInfo about = new PluginInfo();

        public PluginInfo Initialise(IntPtr apiInterfacePtr)
            [some default code removed]


            return about;

        [some default code removed]

        private void createMenuItem() {
            mbApiInterface.MB_AddMenuItem("mnuTools/Start My Plugin", "HotKey For Start My Plugin", menuClicked);

        private void menuClicked(object sender, EventArgs args) {
            Form1 myForm = new Form1(); myForm.Show();

Beyond MusicBee / Re: MusicBrainz Picard q & a thread
« on: August 12, 2017, 10:26:33 PM »
Is there a way for Picard to recognize MB rating? I'm trying to sync my ratings with MusicBrainz and this would be the best course of action.

Pages: 1 2