Skip to content

Commit

Permalink
Version 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dsafa committed Mar 5, 2019
2 parents ce465ef + f3888ed commit 73f48a7
Show file tree
Hide file tree
Showing 72 changed files with 3,664 additions and 367 deletions.
62 changes: 13 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[![Build status](https://ci.appveyor.com/api/projects/status/v32xl29r8uucuwj3?svg=true)](https://ci.appveyor.com/project/dsafa/audio-band)
|Branch|Build Status|
|---|---|
|Master (development)|[![Build Status](https://dsafa.visualstudio.com/AudioBand/_apis/build/status/AudioBand%20Dev%20CI?branchName=master)](https://dsafa.visualstudio.com/AudioBand/_build/latest?definitionId=3&branchName=master)|
|Release|[![Build Status](https://dev.azure.com/dsafa/AudioBand/_apis/build/status/AudioBand%20Release?branchName=release)](https://dev.azure.com/dsafa/AudioBand/_build/latest?definitionId=4&branchName=release)|

# Audio Band
Audio Band allows you to display song information in the taskbar.
Expand All @@ -18,56 +21,16 @@ Audio Band allows you to display song information in the taskbar.

![](screenshots/custom-2.png)

# Table of contents
1. [Installation](#installation)
2. [Usage](#usage)
3. [Plugins](#audiosources)
1. [Spotify](#spotify-setup)
2. [iTunes](#itunes)
3. [MusicBee](#musicbee)
4. [Customization](#customization)
## Quick Start
[Check the full documentation to get started](https://dsafa.github.io/audio-band/audioband/index.html)

## Installation
There is currently no installer available, however there are prereleases in the [Release](https://github.com/dsafa/audio-band/releases) page that come with a script to install manually.
1. Download from the [releases](https://github.com/dsafa/audio-band/releases) page.
2. Run `install.cmd`
3. Right click the taskbar > toolbars > Audio band
4. Right click the toolbar and select an audio source

## Usage
1. If nothing appears on your toolbar after installation, right click on the taskbar and select `Audio Band` from the toolbars submenu.
2. Right click on the Audio Band toolbar and select an audio source (ex. Spotify)

![](./screenshots/hover-over.png)

![](./screenshots/click-audiosource.png)

**IMPORTANT** If nothing happens after selecting `Audio Band` from the toolbars menu or if there are no options in the `Audio Source` menu, some files are being blocked by windows. To fix it, run `unblock.ps1` with powershell. If that doesn't work you can manually fix it by right clicking the files -> properties and clicking unblock. If there are still problems, feel free to post an issue.

## <a name="audiosources"></a>Current Supported Audio Sources (see below for setup instructions and issues)
- Spotify
- iTunes
- MusicBee

### Spotify Setup
1. Login to the [Spotify dashboard](https://developer.spotify.com/dashboard/login) and create a new App. Fill in the details, you can name it whatever you want. This app will be just for AudioBand.
2. Go to the app you created and click `Edit Settings`. Add `http://localhost:80` as a callback url.
1. You can use a different port for the local webserver (see next step)
3. Right click anywhere in the toolbar > Audio Band Settings > Audio Source Settings and fill in the fields `Spotify Client Id` and `Spotify Client Secret`. You can find them in the same dashboard page for the Spotify app you created.
1. You can also change the `Callback Port` if needed.
4. Your browser should open asking you to login and allow your spotify app to access your currently playing songs.
5. Sign-in and accept and it should now display song information (make sure spotify is selected as the audio source).

![](./screenshots/spotify-dashboard.png)
![](./screenshots/spotify-app-settings-callback.png)

#### Spotify Issues
- The first time you open up Spotify, the current song may not be displayed. This is because Spotify doesn't report any song information if you have no devices playing songs. Just start playing a song and it will start displaying.

### iTunes
- iTunes will open when the audio source is selected, and cannot be changed (as far as I know).

### MusicBee
- Make sure that the [Musicbee IPC plugin](https://getmusicbee.com/addons/plugins/138/musicbeeipc/) is installed for MusicBee. Use this [link](https://getmusicbee.com/forum/index.php?topic=11492.0) if that link doesn't work.

## Customization
Right click audio band and select `Audio Band Settings` and a new window will appear where you can do your customization. A description of the options can be found [here](https://github.com/dsafa/audio-band/wiki/Audio-Band-settings). *In app help coming soon*
## Audiosource development
[Click here for the documentation](https://dsafa.github.io/audio-band/audiosource-docs/index.html)

## Building
This project uses C# 7 features so a compatible compiler is required.
Expand All @@ -76,6 +39,7 @@ This project uses C# 7 features so a compatible compiler is required.
Help is appreciated
- Ask questions, report bugs, suggest features in issues
- Send pull requests
- Master branch is the main development branch

## License
[LICENSE](https://github.com/dsafa/audio-band/blob/master/LICENSE)
Expand Down
Binary file removed screenshots/click-audiosource.png
Binary file not shown.
Binary file removed screenshots/hover-over.png
Binary file not shown.
Binary file removed screenshots/spotify-app-settings-callback.png
Binary file not shown.
Binary file removed screenshots/spotify-dashboard.png
Binary file not shown.
4 changes: 4 additions & 0 deletions src/AudioBand.AudioSource/AudioSourceSettingAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,27 @@ public AudioSourceSettingAttribute(string name)
/// <summary>
/// Gets or sets the name of the setting.
/// </summary>
/// <value>The name of the setting.</value>
public string Name { get; set; }

/// <summary>
/// Gets or sets the <see cref="SettingOptions"/> flags for the setting.
/// </summary>
/// <value>The option flags for this setting.</value>
public SettingOptions Options { get; set; }

/// <summary>
/// Gets or sets the priority when changing more that one setting.
/// <para/>
/// A higher value is higher priority.
/// </summary>
/// <value>The priority of the setting.</value>
public int Priority { get; set; }

/// <summary>
/// Gets or sets the description of the setting.
/// </summary>
/// <value>The description of the setting.</value>
public string Description { get; set; }
}
}
3 changes: 2 additions & 1 deletion src/AudioBand.AudioSource/SettingChangedEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ public SettingChangedEventArgs(string settingName)
}

/// <summary>
/// Gets or sets the name of the setting's property that changed.
/// Gets or sets the name of the setting that changed.
/// </summary>
/// <value>The name of the setting.</value>
public string SettingName { get; set; }
}
}
5 changes: 5 additions & 0 deletions src/AudioBand.AudioSource/TrackInfoChangedEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,31 @@ private TrackInfoChangedEventArgs(SerializationInfo info, StreamingContext conte
/// <summary>
/// Gets or sets the track Name
/// </summary>
/// <value>The name of the track.</value>
public string TrackName { get; set; }

/// <summary>
/// Gets or sets the artist.
/// </summary>
/// <value>The name of the artist.</value>
public string Artist { get; set; }

/// <summary>
/// Gets or sets the album art image. If <see langword="null"/>, a placeholder will be used.
/// </summary>
/// <value>The album art.</value>
public Image AlbumArt { get; set; }

/// <summary>
/// Gets or sets the album name.
/// </summary>
/// <value>The name of the album.</value>
public string Album { get; set; }

/// <summary>
/// Gets or sets the length of the track
/// </summary>
/// <value>The length of the track.</value>
public TimeSpan TrackLength { get; set; }

/// <inheritdoc/>
Expand Down
66 changes: 66 additions & 0 deletions src/AudioBand.Logging/AudioBand.Logging.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D8E1D3E5-D0AB-43C4-8AF6-60C14C5C6843}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AudioBand.Logging</RootNamespace>
<AssemblyName>AudioBand.Logging</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Ben.Demystifier, Version=0.1.0.0, Culture=neutral, PublicKeyToken=a6d206e05440431a, processorArchitecture=MSIL">
<HintPath>..\packages\Ben.Demystifier.0.1.4\lib\net45\Ben.Demystifier.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Collections.Immutable, Version=1.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.1.4.0\lib\netstandard2.0\System.Collections.Immutable.dll</HintPath>
</Reference>
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Reflection.Metadata, Version=1.4.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Reflection.Metadata.1.5.0\lib\netstandard2.0\System.Reflection.Metadata.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AudioBandExceptionLayoutRenderer.cs" />
<Compile Include="AudioBandLogManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
26 changes: 26 additions & 0 deletions src/AudioBand.Logging/AudioBandExceptionLayoutRenderer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using NLog.LayoutRenderers;
using System;
using System.Diagnostics;
using System.Text;

namespace AudioBand.Logging
{
public class AudioBandExceptionLayoutRenderer : ExceptionLayoutRenderer
{
protected override void AppendToString(StringBuilder sb, Exception ex)
{
if (ex == null)
{
return;
}

sb.AppendLine();
sb.AppendLine("---START OF EXCEPTION---");
sb.AppendLine(ex.ToStringDemystified());
sb.AppendLine("---END OF EXCEPTION---");
sb.AppendLine("---ORIGINAL EXCEPTION---");
sb.AppendLine(ex.ToString());
sb.AppendLine("---END OF ORIGINAL EXCEPTION");
}
}
}
34 changes: 34 additions & 0 deletions src/AudioBand.Logging/AudioBandLogManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using NLog;
using NLog.Config;
using NLog.LayoutRenderers;
using System.IO;
using System.Reflection;

namespace AudioBand.Logging
{
/// <summary>
/// Log mananger for audioband loggers
/// </summary>
public static class AudioBandLogManager
{
private static LogFactory LogFactory = new LogFactory();

public static ILogger GetLogger(string name)
{
return LogFactory.GetLogger(name);
}

public static ILogger GetLogger<T>()
{
return LogFactory.GetLogger(typeof(T).FullName);
}

public static void Initialize()
{
LayoutRenderer.Register<AudioBandExceptionLayoutRenderer>("audioband-exception");
var configFileFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var config = new XmlLoggingConfiguration(Path.Combine(configFileFolder, "nlog.config"));
LogFactory.Configuration = config;
}
}
}
36 changes: 36 additions & 0 deletions src/AudioBand.Logging/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AudioBand.Logging")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AudioBand.Logging")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("d8e1d3e5-d0ab-43c4-8af6-60c14c5c6843")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
7 changes: 7 additions & 0 deletions src/AudioBand.Logging/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Ben.Demystifier" version="0.1.4" targetFramework="net461" />
<package id="NLog" version="4.5.11" targetFramework="net461" />
<package id="System.Collections.Immutable" version="1.4.0" targetFramework="net461" />
<package id="System.Reflection.Metadata" version="1.5.0" targetFramework="net461" />
</packages>
5 changes: 3 additions & 2 deletions src/AudioBand.Test/AudioBand.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AudioBand.Test</RootNamespace>
<AssemblyName>AudioBand.Test</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
Expand All @@ -20,6 +20,7 @@
<TestProjectType>UnitTest</TestProjectType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -66,7 +67,7 @@
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
16 changes: 8 additions & 8 deletions src/AudioBand.Test/app.config
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/></startup></configuration>
2 changes: 1 addition & 1 deletion src/AudioBand.Test/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
<package id="MSTest.TestFramework" version="1.4.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net461" />
<package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net47" />
</packages>
Loading

0 comments on commit 73f48a7

Please sign in to comment.