Skip to content

Commit

Permalink
Version 0.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dsafa committed Aug 19, 2019
2 parents d985c78 + 283c956 commit 859bc82
Show file tree
Hide file tree
Showing 182 changed files with 12,918 additions and 12,598 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,18 @@ Audio Band allows you to display song information in the taskbar.
- Add support for your music player of choice through plugins
- Customizable

## Current included support for
- Spotify
- iTunes
- MusicBee

## Screenshots
![](screenshots/screenshot1.png)

![](./screenshots/screenshot.png)

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

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

## Getting started
[Click here to get started](https://dsafa.github.io/audio-band/audioband/index.html)
Expand Down
Binary file added screenshots/screenshot1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/AudioBand.Test/AudioBand.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<Compile Include="ValueConverters\TimeSpanToMsConverterTests.cs" />
<Compile Include="ViewModels\AlbumArtPopupViewModelTests.cs" />
<Compile Include="ViewModels\AlbumArtViewModelTests.cs" />
<Compile Include="ViewModels\AudioBandViewModelTests.cs" />
<Compile Include="ViewModels\GeneralSettingsViewModelTests.cs" />
<Compile Include="ViewModels\CustomLabelsViewModelTests.cs" />
<Compile Include="Settings\SettingsMigrationTests.cs" />
<Compile Include="ViewModels\AudioSourceSettingsCollectionTests.cs" />
Expand Down
32 changes: 16 additions & 16 deletions src/AudioBand.Test/Settings/SettingsMigrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void MigrateV1ToV2_Main()
AudioSource = "test"
};

var v2 = Migration.MigrateSettings<V2Settings>(v1, "0.1", "2");
var v2 = SettingsMigration.MigrateSettings<V2Settings>(v1, "0.1", "2");

Assert.Equal("2", v2.Version);
Assert.Equal("test", v2.AudioSource);
Expand All @@ -46,7 +46,7 @@ public void MigrateV1ToV2_AlbumArtPopup()
AlbumArtPopupAppearance = setting,
};

var v2 = Migration.MigrateSettings<V2Settings>(v1, "0.1", "2");
var v2 = SettingsMigration.MigrateSettings<V2Settings>(v1, "0.1", "2");

Assert.Equal(v2.AlbumArtPopupSettings.Width, setting.Width);
Assert.Equal(v2.AlbumArtPopupSettings.Height, setting.Height);
Expand All @@ -73,7 +73,7 @@ public void MigrateV1ToV2_AlbumArt()
AlbumArtAppearance = setting
};

var v2 = Migration.MigrateSettings<V2Settings>(v1, "0.1", "2");
var v2 = SettingsMigration.MigrateSettings<V2Settings>(v1, "0.1", "2");

Assert.Equal(v2.AlbumArtSettings.Width, setting.Width);
Assert.Equal(v2.AlbumArtSettings.Height, setting.Height);
Expand All @@ -97,7 +97,7 @@ public void MigrateV1ToV2_Audioband()
AudioBandAppearance = setting
};

var v2 = Migration.MigrateSettings<V2Settings>(v1, "0.1", "2");
var v2 = SettingsMigration.MigrateSettings<V2Settings>(v1, "0.1", "2");

Assert.Equal(v2.AudioBandSettings.Width, setting.Width);
Assert.Equal(v2.AudioBandSettings.Height, setting.Height);
Expand All @@ -121,7 +121,7 @@ public void MigrateV1ToV2_NextSong()
NextSongButtonAppearance = setting
};

var v2 = Migration.MigrateSettings<V2Settings>(v1, "0.1", "2");
var v2 = SettingsMigration.MigrateSettings<V2Settings>(v1, "0.1", "2");

Assert.Equal(v2.NextButtonSettings.Width, setting.Width);
Assert.Equal(v2.NextButtonSettings.Height, setting.Height);
Expand Down Expand Up @@ -152,7 +152,7 @@ public void MigrateV1ToV2_AudioSourceSettings()
AudioSourceSettings = settings
};

var v2 = Migration.MigrateSettings<V2Settings>(v1, "0.1", "2");
var v2 = SettingsMigration.MigrateSettings<V2Settings>(v1, "0.1", "2");

Assert.Equal(v2.AudioSourceSettings.Count, settings.Count);
Assert.Equal(v2.AudioSourceSettings[0].AudioSourceName, setting1.Name);
Expand Down Expand Up @@ -181,7 +181,7 @@ public void MigrateV1ToV2_PlayPauseButton()
};

var v1 = new V1Settings {PlayPauseButtonAppearance = setting};
var v2 = Migration.MigrateSettings<V2Settings>(v1, "0.1", "2");
var v2 = SettingsMigration.MigrateSettings<V2Settings>(v1, "0.1", "2");

Assert.Equal(v2.PlayPauseButtonSettings.Width, setting.Width);
Assert.Equal(v2.PlayPauseButtonSettings.Height, setting.Height);
Expand All @@ -206,7 +206,7 @@ public void MigrateV1ToV2_PreviousButton()
};

var v1 = new V1Settings {PreviousSongButtonAppearance = setting};
var v2 = Migration.MigrateSettings<V2Settings>(v1, "0.1", "2");
var v2 = SettingsMigration.MigrateSettings<V2Settings>(v1, "0.1", "2");

Assert.Equal(v2.PreviousButtonSettings.Height, setting.Height);
Assert.Equal(v2.PreviousButtonSettings.Width, setting.Width);
Expand All @@ -231,7 +231,7 @@ public void MigrateV1ToV2_ProgressBar()
};

var v1 = new V1Settings {ProgressBarAppearance = setting};
var v2 = Migration.MigrateSettings<V2Settings>(v1, "0.1", "2");
var v2 = SettingsMigration.MigrateSettings<V2Settings>(v1, "0.1", "2");

Assert.Equal(v2.ProgressBarSettings.Width, setting.Width);
Assert.Equal(v2.ProgressBarSettings.Height, setting.Height);
Expand Down Expand Up @@ -263,7 +263,7 @@ public void MigrateV1ToV2_CustomText()

var texts = new List<TextAppearance>() {text1};
var v1 = new V1Settings {TextAppearances = texts};
var v2 = Migration.MigrateSettings<V2Settings>(v1, "0.1", "2");
var v2 = SettingsMigration.MigrateSettings<V2Settings>(v1, "0.1", "2");

Assert.Equal(v2.CustomLabelSettings.Count, texts.Count);
Assert.Equal(v2.CustomLabelSettings[0].Color, text1.Color);
Expand Down Expand Up @@ -418,7 +418,7 @@ public void MigrateV2ToV3_MigratesSuccessfully()
var settings = TomlHelper.DefaultSettings;

var v2 = Toml.ReadString<V2Settings>(settingsFile, settings);
var v3 = Migration.MigrateSettings<SettingsV3>(v2, "2", "3");
var v3 = SettingsMigration.MigrateSettings<SettingsV3>(v2, "2", "3");

Assert.Equal("3", v3.Version);
Assert.Equal(v2.AudioSource, v3.AudioSource);
Expand All @@ -436,8 +436,8 @@ public void MigrateV2ToV3_MigratesSuccessfully()
Assert.Equal(v2.AlbumArtSettings.YPosition, v3.Profiles[SettingsV3.DefaultProfileName].AlbumArtSettings.YPosition);
Assert.Equal(v2.AlbumArtSettings.PlaceholderPath, v3.Profiles[SettingsV3.DefaultProfileName].AlbumArtSettings.PlaceholderPath);

Assert.Equal(v2.AudioBandSettings.Width, v3.Profiles[SettingsV3.DefaultProfileName].AudioBandSettings.Width);
Assert.Equal(v2.AudioBandSettings.Height, v3.Profiles[SettingsV3.DefaultProfileName].AudioBandSettings.Height);
Assert.Equal(v2.AudioBandSettings.Width, v3.Profiles[SettingsV3.DefaultProfileName].GeneralSettings.Width);
Assert.Equal(v2.AudioBandSettings.Height, v3.Profiles[SettingsV3.DefaultProfileName].GeneralSettings.Height);

Assert.Equal(v2.NextButtonSettings.Width, v3.Profiles[SettingsV3.DefaultProfileName].NextButtonSettings.Width);
Assert.Equal(v2.NextButtonSettings.Height, v3.Profiles[SettingsV3.DefaultProfileName].NextButtonSettings.Height);
Expand Down Expand Up @@ -558,11 +558,11 @@ public void ChainedMigrations_V1ToV3_SuccessfulMigration()
";
var v1 = Toml.ReadString<V1Settings>(v1Settings, TomlHelper.DefaultSettings);
var v3 = Migration.MigrateSettings<SettingsV3>(v1, "0.1", "3");
var v3 = SettingsMigration.MigrateSettings<SettingsV3>(v1, "0.1", "3");
var v3Profile = v3.Profiles[SettingsV3.DefaultProfileName];

Assert.Equal(v1.AudioBandAppearance.Width, v3Profile.AudioBandSettings.Width);
Assert.Equal(v1.AudioBandAppearance.Height, v3Profile.AudioBandSettings.Height);
Assert.Equal(v1.AudioBandAppearance.Width, v3Profile.GeneralSettings.Width);
Assert.Equal(v1.AudioBandAppearance.Height, v3Profile.GeneralSettings.Height);

Assert.Equal(v1.PlayPauseButtonAppearance.Width, v3Profile.PlayPauseButtonSettings.Width);
Assert.Equal(v1.PlayPauseButtonAppearance.Height, v3Profile.PlayPauseButtonSettings.Height);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Globalization;
using System.Windows;
using AudioBand.ValueConverters;
using AudioBand.UI;
using Xunit;
using Visibility = System.Windows.Visibility;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Globalization;
using System.Windows;
using System.Windows.Media;
using AudioBand.ValueConverters;
using AudioBand.UI;
using Xunit;

namespace AudioBand.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using AudioBand.ValueConverters;
using AudioBand.UI;
using Xunit;

namespace AudioBand.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Globalization;
using AudioBand.ValueConverters;
using AudioBand.UI;
using Xunit;

namespace AudioBand.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Globalization;
using System.Windows;
using AudioBand.ValueConverters;
using AudioBand.UI;
using Xunit;

namespace AudioBand.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
using AudioBand.ValueConverters;
using AudioBand.UI;
using Xunit;

namespace AudioBand.Test
Expand Down
2 changes: 1 addition & 1 deletion src/AudioBand.Test/ValueConverters/PointConverterTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Globalization;
using System.Windows;
using Xunit;
using PointConverter = AudioBand.ValueConverters.PointConverter;
using PointConverter = AudioBand.UI.PointConverter;

namespace AudioBand.Test
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Globalization;
using System.Windows;
using System.Windows.Media;
using AudioBand.ValueConverters;
using AudioBand.UI;
using Xunit;

namespace AudioBand.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AudioBand.ValueConverters;
using AudioBand.UI;
using Xunit;

namespace AudioBand.Test
Expand Down
67 changes: 61 additions & 6 deletions src/AudioBand.Test/ViewModels/AlbumArtPopupViewModelTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using AudioBand.Messages;
using AudioBand.Models;
using AudioBand.Settings;
using AudioBand.ViewModels;
using AudioBand.UI;
using Moq;
using Xunit;

Expand All @@ -22,20 +22,75 @@ public AlbumArtPopupViewModelTests()
[Fact]
public void AlbumArtPopupViewModel_ProfileChangedEvent_ListensToProfileChanges()
{
var first = new AlbumArtPopup() {Height = 10};
var second = new AlbumArtPopup() {Height = 20};
_appSettings.SetupSequence(m => m.AlbumArtPopup)
var first = new UserProfile()
{
AlbumArtPopup = new AlbumArtPopup() {Height = 10}
};

var second = new UserProfile
{
AlbumArtPopup = new AlbumArtPopup() {Height = 20}
};
_appSettings.SetupSequence(m => m.CurrentProfile)
.Returns(first)
.Returns(second)
.Returns(second);

var vm = new AlbumArtPopupViewModel(_appSettings.Object, _messageBus.Object);

Assert.Equal(first.Height, vm.Height);
Assert.Equal(first.AlbumArtPopup.Height, vm.Height);
_appSettings.Raise(m => m.ProfileChanged += null, EventArgs.Empty);

Assert.False(vm.IsEditing);
Assert.Equal(second.Height, vm.Height);
Assert.Equal(second.AlbumArtPopup.Height, vm.Height);
}

[Fact]
public void AlbumArtPopupViewModel_EndEdit_WritesChangesToAppSettings()
{
var profile = new UserProfile
{
AlbumArtPopup = new AlbumArtPopup {Width = 50}
};
const int newWidth = 100;
_appSettings.SetupGet(m => m.CurrentProfile).Returns(profile);
var vm = new AlbumArtPopupViewModel(_appSettings.Object, _messageBus.Object);

vm.Width = newWidth;
vm.EndEdit();

Assert.Equal(newWidth, profile.AlbumArtPopup.Width);
}

[Fact]
public void AlbumArtPopupViewModel_CancelEdit_DoesNotWriteChangesToAppSettings()
{
const int initialWidth = 50;
var profile = new UserProfile
{
AlbumArtPopup = new AlbumArtPopup { Width = initialWidth }
};
const int newWidth = 100;
_appSettings.SetupGet(m => m.CurrentProfile).Returns(profile);
var vm = new AlbumArtPopupViewModel(_appSettings.Object, _messageBus.Object);

vm.Width = newWidth;
vm.CancelEdit();

Assert.Equal(initialWidth, profile.AlbumArtPopup.Width);
}

[Fact]
public void AlbumArtPopupViewModel_UsesMessageBus()
{
var profile = new UserProfile
{
AlbumArtPopup = new AlbumArtPopup()
};
_appSettings.SetupGet(m => m.CurrentProfile).Returns(profile);
var vm = new AlbumArtPopupViewModel(_appSettings.Object, _messageBus.Object);

_messageBus.Verify(m => m.Subscribe(It.IsAny<Action<EditEndMessage>>()));
}
}
}
Loading

0 comments on commit 859bc82

Please sign in to comment.