Use plugin names when possible #1088
Open
+38
−17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Plugins have a
namefield in the config that was initially used to create an instance of the plugin. This no longer seems to be the case, so it can be repurposed to allow plugins to use it for identification and logging.This PR will better allow plugins to utilize the

namefield in the config to set a friendly plugin name and display it later. The primary benefit of this would be to better identify when multiple instances of the same plugin are sending data to different servers within the logs:If left blank, the
namewill default to the base filename. Individual plugins may choose to handle the default value by the exchanging it for a friendly display name instead.This has been implemented for the three main upload plugins (Rdio, Broadcastify, OpenMHz). Setting a custom name for the latter two plugins can be accomplished by manually creating a plugin entry such as:
{ "name": "BCFY", "library": "libbroadcastify_uploader.so", "broadcastifyCallsServer": "https://api.broadcastify.com/call-upload", "systems": [ { "shortName": "mysystem", "broadcastifySystemId": 1123, "broadcastifyApiKey": "API-key" } ] }or
{ "name": "OpenMHz.com", "library": "libopenmhz_uploader.so", "uploadServer": "https://api.openmhz.com", "systems": [ { "shortName": "mysystem", "openmhzSystemId": "myopenmhzsystem", "apiKey": "api-KEY" } ] }instead of having the plugin info commingled with system configuration data.
This should also directly address #1087.