Skip to content

Add Custom API support#22

Open
shootlazer wants to merge 4 commits intokaraluh:masterfrom
shootlazer:master
Open

Add Custom API support#22
shootlazer wants to merge 4 commits intokaraluh:masterfrom
shootlazer:master

Conversation

@shootlazer
Copy link
Copy Markdown

Works with Maloja using /apis/listenbrainz/1/submit-listens

Comment thread ScrobblerBrainz.cs Outdated
about.Type = PluginType.General;

about.MinInterfaceVersion = 30;
about.MinInterfaceVersion = 60;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for this change? Also with such a high setting you won't be able to enable this plugin.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for this change? Also with such a high setting you won't be able to enable this plugin.

To be honest, I don't know how did this happen.
It's not even on the .cs file I have on my PC. This is obviously incorrect and will cause the plugin not to work. Probably caused when uploading it to github,

Comment thread ScrobblerBrainz.cs
customApiUrlLabel.Location = new Point(0, 40);
customApiUrlLabel.Text = "Custom API URL:";
customApiUrlTextBox = new System.Windows.Forms.TextBox();
customApiUrlTextBox.Location = new Point(customApiUrlLabel.Width + 35, 40);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spacing is incorrect. The textbox is not aligned correctly with the label and its bottom border is cut.

Comment thread ScrobblerBrainz.cs
ElementState.ElementStateDefault,
ElementComponent.ComponentForeground));
customApiUrlTextBox.BorderStyle = BorderStyle.FixedSingle;
customApiUrlTextBox.Text = Properties.Settings.Default.customApiUrl;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a possibility, that a user will accidentally edit this URL, which will break his scrobbling in a non-obvious way. This textbox should be non-editable by default, and there should be a checkbox labeled accordingly, that will make this field editable. A value for an API endpoint from this textbox should be used only when this checkbox is checked, otherwise LB URL should be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants