Skip to content

Commit

Permalink
Changed the default behavior of pre-caching everything to optional, c…
Browse files Browse the repository at this point in the history
…ontrolled in the Settings window. Bumped version to v2.27
  • Loading branch information
midwan committed Apr 1, 2019
1 parent f17c7ce commit fd6539e
Show file tree
Hide file tree
Showing 11 changed files with 325 additions and 30 deletions.
1 change: 1 addition & 0 deletions MB_SubSonic/Domain/SubsonicSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public enum ServerType
public AuthMethod Auth { get; set; }
public string BitRate { get; set; }
public bool UseIndexCache { get; set; }
public bool PreCacheAll { get; set; }
}

public static class SubsonicSettingsExtensions
Expand Down
3 changes: 2 additions & 1 deletion MB_SubSonic/Helpers/SettingsHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public static bool IsSettingChanged(SubsonicSettings newSettings, SubsonicSettin
!newSettings.Auth.Equals(oldSettings.Auth) ||
!newSettings.Transcode.Equals(oldSettings.Transcode) ||
!newSettings.BitRate.Equals(oldSettings.BitRate) ||
!newSettings.UseIndexCache.Equals(oldSettings.UseIndexCache);
!newSettings.UseIndexCache.Equals(oldSettings.UseIndexCache) ||
!newSettings.PreCacheAll.Equals(oldSettings.PreCacheAll);
return result;
}

Expand Down
2 changes: 1 addition & 1 deletion MB_SubSonic/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public Interfaces.Plugin.PluginInfo Initialise(IntPtr apiInterfacePtr)
// current only applies to artwork, lyrics or instant messenger name that appears in the provider drop down selector or target Instant Messenger
_about.Type = Interfaces.Plugin.PluginType.Storage;
_about.VersionMajor = 2; // your plugin version
_about.VersionMinor = 26;
_about.VersionMinor = 27;
_about.Revision = 0;
_about.MinInterfaceVersion = Interfaces.Plugin.MinInterfaceVersion;
_about.MinApiRevision = Interfaces.Plugin.MinApiRevision;
Expand Down
4 changes: 2 additions & 2 deletions MB_SubSonic/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// 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("2.26.0.0")]
[assembly: AssemblyFileVersion("2.26.0.0")]
[assembly: AssemblyVersion("2.27.0.0")]
[assembly: AssemblyFileVersion("2.27.0.0")]
35 changes: 16 additions & 19 deletions MB_SubSonic/SubSonic.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -33,17 +32,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Costura, Version=3.3.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.3.3.2\lib\net40\Costura.dll</HintPath>
</Reference>
<Reference Include="RestSharp, Version=106.6.7.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.106.6.7\lib\net452\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="Microsoft.CSharp" />
Expand Down Expand Up @@ -90,24 +80,31 @@
<None Include="Domain\subsonic-rest-api-1.14.0.xsd">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
<None Include="SubSonic.png" />
</ItemGroup>
<ItemGroup>
<Content Include="FodyWeavers.xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Costura.Fody">
<Version>3.3.3</Version>
</PackageReference>
<PackageReference Include="Fody">
<Version>4.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="RestSharp">
<Version>106.6.9</Version>
</PackageReference>
<PackageReference Include="System.ValueTuple">
<Version>4.5.0</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy /Y "$(TargetDir)*.*" "D:\MusicBee\Plugins\"</PostBuildEvent>
</PropertyGroup>
<Import Project="..\packages\Fody.4.0.2\build\Fody.targets" Condition="Exists('..\packages\Fody.4.0.2\build\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Fody.4.0.2\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.4.0.2\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
5 changes: 2 additions & 3 deletions MB_SubSonic/Subsonic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ public static bool SaveSettings(SubsonicSettings settings)
{
SendNotificationsHandler.Invoke(Interfaces.Plugin.CallbackType.SettingsUpdated);
}

catch (Exception ex)
{
_lastEx = ex;
Expand Down Expand Up @@ -746,7 +745,7 @@ private static void GetFolderFiles(string baseFolderName, string folderId,
{
SetBackgroundTaskMessage($"Processing MusicDirectory {index} of {total}...");
var childEntry = content.child[index];
if (childEntry.isDir)
if (childEntry.isDir && _currentSettings.PreCacheAll)
{
GetFolderFiles(baseFolderName, childEntry.id, files);
}
Expand Down Expand Up @@ -778,7 +777,7 @@ private static void GetFolderFiles(string baseFolderName, string folderId,
{
SetBackgroundTaskMessage($"Processing MusicDirectory {index} of {total}...");
var childEntry = content.child[index];
if (childEntry.isDir)
if (childEntry.isDir && _currentSettings.PreCacheAll)
{
GetFolderFiles(baseFolderName, childEntry.id, files);
}
Expand Down
13 changes: 13 additions & 0 deletions MB_SubSonic/Windows/SettingsWindow.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion MB_SubSonic/Windows/SettingsWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ private SubsonicSettings GetFormSettings()
BitRate = string.IsNullOrEmpty(ComboBoxBitrate.SelectedItem.ToString())
? "128K"
: ComboBoxBitrate.SelectedItem.ToString(),
UseIndexCache = CheckBoxCache.Checked
UseIndexCache = CheckBoxCache.Checked,
PreCacheAll = CheckBoxPreCache.Checked
};
}

Expand Down
165 changes: 165 additions & 0 deletions MigrationBackup/eed776a6/Subsonic/NuGetUpgradeLog.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
<!DOCTYPE html>
<!-- saved from url=(0014)about:internet -->

<html xmlns:msxsl="urn:schemas-microsoft-com:xslt"><head><meta content="en-us" http-equiv="Content-Language" /><meta content="text/html; charset=utf-16" http-equiv="Content-Type" /><title _locID="NuGetUpgradeReportTitle">
NuGetMigrationLog
</title><style>

/* Body style, for the entire document */
body
{
background: #F3F3F4;
color: #1E1E1F;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
font-size: 12pt;
padding: 0;
margin: 0;
}

/* Header1 style, used for the main title */
h1
{
padding: 10px 0px 10px 10px;
font-size: 21pt;
background-color: #E2E2E2;
border-bottom: 1px #C1C1C2 solid;
color: #201F20;
margin: 0;
font-weight: normal;
}

/* Header2 style, used for "Overview" and other sections */
h2
{
font-size: 18pt;
font-weight: normal;
padding: 15px 0 5px 0;
margin: 0;
}

/* Header3 style, used for sub-sections, such as project name */
h3
{
font-weight: normal;
font-size: 15pt;
margin: 0;
padding: 15px 0 5px 0;
background-color: transparent;
}

.info-text
{
margin: 0px 0 0.75em 0;
}

/* Color all hyperlinks one color */
a
{
color: #1382CE;
}

/* Table styles */
table
{
border-spacing: 0 0;
border-collapse: collapse;
font-size: 11pt;
}

table th
{
background: #E7E7E8;
text-align: left;
text-decoration: none;
font-weight: normal;
padding: 3px 6px 3px 6px;
}

table td
{
vertical-align: top;
padding: 3px 6px 5px 5px;
margin: 0px;
border: 1px solid #E7E7E8;
background: #F7F7F8;
}

/* Local link is a style for hyperlinks that link to file:/// content, there are lots so color them as 'normal' text until the user mouse overs */
.localLink
{
color: #1E1E1F;
background: #EEEEED;
text-decoration: none;
}

.localLink:hover
{
color: #1382CE;
background: #FFFF99;
text-decoration: none;
}

.issueCell
{
width: 100%;
}

.packageIssue
{
margin-left: 25px;
}

/* Padding around the content after the h1 */
#content
{
padding: 0px 20px 20px 20px;
}

.issues table
{
width: 97%;
}

/* All Icons */
.IconSuccessEncoded, .IconInfoEncoded, .IconWarningEncoded, .IconErrorEncoded
{
min-width:18px;
min-height:18px;
background-repeat:no-repeat;
background-position:center;
}

.IconSuccessEncoded
{
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABcElEQVR4Xq2TsUsCURzHv15g8ZJcBWlyiYYgCIWcb9DFRRwMW5TA2c0/QEFwFkxxUQdxVlBwCYWOi6IhWgQhBLHJUCkhLr/BW8S7gvrAg+N+v8/v+x68Z8MGy+XSCyABQAXgBgHGALoASkIIDWSLeLBetdHryMjd5IxQPWT4rn1c/P7+xxp72Cs9m5SZ0Bq2vPnbPFafK2zDvmNHypdC0BPkLlQhxJsCAhQoZwdZU5mwxh720qGo8MzTxTTKZDPCx2HoVzp6lz0Q9tKhyx0kGs8Ny+TkWRKk8lCROwEduhyg9l/6lunOPSfmH3NUH6uQ0KHLAe7JYvJjevm+DAMGJHToKtigE+vwvIidxLamb8IBY9e+C5LiXREkfho3TSd06HJA13/oh6T51MTsfQbHrsMynQ5dDihFjiK8JJAU9AKIWTp76dCVN7HWHrajmUEGvyF9nkbAE6gLIS7kTUyuf2gscLoJrElZo/Mvj+nPz/kLTmfnEwP3tB0AAAAASUVORK5CYII=);
}

.IconInfoEncoded
{
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABHElEQVR4Xs2TsUoDQRRF7wwoziokjZUKadInhdhukR9YP8DMX1hYW+QvdsXa/QHBbcXC7W0CamWTQnclFutceIQJwwaWNLlwm5k5d94M76mmaeCrrmsLYOocY12FcxZFUeozCqKqqgYA8uevv1H6VuPxcwlfk5N92KHBxfFeCSAxxswlYAW/Xr989x/mv9gkhtyMDhcAxgzRsp7flj8B/HF1RsMXq+NZMkopaHe7lbKxQUEIGbKsYNoGn969060hZBkQex/W8oRQwsQaW2o3Ago2SVcJUzAgY3N0lTCZZm+zPS8HB51gMmS1DEYyOz9acKO1D8JWTlafKIMxdhvlfdyT94Vv5h7P8Ky7nQzACmhvKq3zk3PjW9asz9D/1oigecsioooAAAAASUVORK5CYII=);
}

.IconWarningEncoded
{
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAx0lEQVR4XpWSMQ7CMAxFf4xAyBMLCxMrO8dhaBcuwdCJS3RJBw7SA/QGTCxdWJgiQYWKXJWKIXHIlyw5lqr34tQgEOdcBsCOx5yZK3hCCKdYXneQkh4pEfqzLfu+wVDSyyzFoJjfz9NB+pAF+eizx2Vruts0k15mPgvS6GYvpVtQhB61IB/dk6AF6fS4Ben0uIX5odtFe8Q/eW1KvFeH4e8khT6+gm5B+t3juyDt7n0jpe+CANTd+oTUjN/U3yVaABnSUjFz/gFq44JaVSCXeQAAAABJRU5ErkJggg==);
}

.IconErrorEncoded
{
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABQElEQVR4XqWTvUoEQRCE6wYPZUA80AfwAQz23uCMjA7MDRQEIzPBVEyNTQUFIw00vcQTTMzuAh/AxEQQT8HF/3G/oGGnEUGuoNnd6qoZuqltyKEsyzVJq5I6rnUp6SjGeGhESikzzlc1eL7opfuVbrqbU1Zw9NCgtQMaZpY0eNnaaL2fHusvTK5vKu7sjSS1Y4y3QUA6K3e3Mau5UFDyMP7tYF9o8cAHZv68vipoIJg971PZIZ5HiwdvYGGvFVFHmGmZ2MxwmQYPXubPl9Up0tfoMQGetXd6mRbvhBw+boZ6WF7Mbv1+GsHRk0fQmPAH1GfmZirbCfDJ61tw3Px8/8pZsPAG4jlVhcPgZ7adwNWBB68lkRQWFiTgFlbnLY3DGGM7izIJIyT/jjIvEJw6fdJTc6krDzh6aMwMP9bvDH4ADSsa9uSWVJkAAAAASUVORK5CYII=);
}

</style></head><body><h1>
NuGet Migration Report - Subsonic</h1><div id="content"><h2 _locID="OverviewTitle">Overview</h2><div class="info-text">Migration to PackageReference was completed successfully. Please build and run your solution to verify that all packages are available.</div><div class="info-text">
If you run into any problems, have feedback, questions, or concerns, please
<a href="https://github.com/NuGet/Home/issues/">file an issue on the NuGet GitHub repository.</a></div><div class="info-text">
Changed files and this report have been backed up here:
<a href="D:\Github\MB_Subsonic\MigrationBackup\eed776a6\Subsonic">D:\Github\MB_Subsonic\MigrationBackup\eed776a6\Subsonic</a></div><div class="info-text"><a href="https://aka.ms/nuget-pc2pr-migrator-rollback">Help me rollback to packages.config</a></div><h2 _locID="PackagesTitle">Packages processed</h2><h3 _locID="IncludePackagesTitle">Top-level dependencies:</h3><div class="issues"><table><tr><th class="issueCell">Package Id</th><th>Version</th></tr><tr><td class="issueCell"><span>Costura.Fody</span></td><td><span>
v3.3.3</span></td></tr><tr><td class="issueCell"><span>Fody</span></td><td><span>
v4.2.1</span></td></tr><tr><td class="issueCell"><span>RestSharp</span></td><td><span>
v106.6.9</span></td></tr><tr><td class="issueCell"><span>System.ValueTuple</span></td><td><span>
v4.5.0</span></td></tr></table></div><p /><h3 _locID="IncludePackagesTitle">Transitive dependencies:</h3><div class="issues"><table><tr><th class="issueCell">Package Id</th><th>Version</th></tr><tr><td class="issueCell">
No transitive dependencies found.
</td><td /></tr></table></div><h2 _locID="IssuesTitle">Package compatibility issues</h2><div class="issues"><table><tr><th /><th class="issueCell" _locID="DescriptionTableHeader">Description</th></tr><tr><td class="IconInfoEncoded" /><td class="issueCell">
No issues were found.
</td></tr></table></div></div></body></html>
Loading

0 comments on commit fd6539e

Please sign in to comment.