MetaBrainz.ListenBrainz
4.0.0
dotnet add package MetaBrainz.ListenBrainz --version 4.0.0
NuGet\Install-Package MetaBrainz.ListenBrainz -Version 4.0.0
<PackageReference Include="MetaBrainz.ListenBrainz" Version="4.0.0" />
paket add MetaBrainz.ListenBrainz --version 4.0.0
#r "nuget: MetaBrainz.ListenBrainz, 4.0.0"
// Install MetaBrainz.ListenBrainz as a Cake Addin #addin nuget:?package=MetaBrainz.ListenBrainz&version=4.0.0 // Install MetaBrainz.ListenBrainz as a Cake Tool #tool nuget:?package=MetaBrainz.ListenBrainz&version=4.0.0
MetaBrainz.ListenBrainz
This is a library providing access to the ListenBrainz API.
ListenBrainz keeps track of users' listens of music tracks (similar to sites like last.fm and libre.fm).
Debugging
The ListenBrainz
class provides a TraceSource
that can be used to
configure debug output; its name is MetaBrainz.ListenBrainz
.
Configuration
In Code
In code, you can enable tracing like follows:
// Use the default switch, turning it on.
ListenBrainz.TraceSource.Switch.Level = SourceLevels.All;
// Alternatively, use your own switch so multiple things can be
// enabled/disabled at the same time.
var mySwitch = new TraceSwitch("MyAppDebugSwitch", "All");
ListenBrainz.TraceSource.Switch = mySwitch;
// By default, there is a single listener that writes trace events to
// the debug output (typically only seen in an IDE's debugger). You can
// add (and remove) listeners as desired.
var listener = new ConsoleTraceListener {
Name = "MyAppConsole",
TraceOutputOptions = TraceOptions.DateTime | TraceOptions.ProcessId,
};
ListenBrainz.TraceSource.Listeners.Clear();
ListenBrainz.TraceSource.Listeners.Add(listener);
In Configuration
Starting from .NET 7 your application can also be set up to read tracing configuration from the application configuration file. To do so, the application needs to add the following to its startup code:
System.Diagnostics.TraceConfiguration.Register();
(Provided by the System.Configuration.ConfigurationManager
package.)
The application config file can then have a system.diagnostics
section
where sources, switches and listeners can be configured.
<configuration>
<system.diagnostics>
<sharedListeners>
<add name="console" type="System.Diagnostics.ConsoleTraceListener" traceOutputOptions="DateTime,ProcessId" />
</sharedListeners>
<sources>
<source name="MetaBrainz.ListenBrainz" switchName="MetaBrainz.ListenBrainz">
<listeners>
<add name="console" />
<add name="lb-log" type="System.Diagnostics.TextWriterTraceListener" initializeData="lb.log" />
</listeners>
</source>
</sources>
<switches>
<add name="MetaBrainz.ListenBrainz" value="All" />
</switches>
</system.diagnostics>
</configuration>
Release Notes
These are available on GitHub.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- MetaBrainz.Common (>= 3.0.0)
- MetaBrainz.Common.Json (>= 6.0.2)
-
net8.0
- MetaBrainz.Common (>= 3.0.0)
- MetaBrainz.Common.Json (>= 6.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on MetaBrainz.ListenBrainz:
Repository | Stars |
---|---|
PKBeam/AMWin-RP
A Discord Rich Presence client for Apple Music's native Windows app.
|