Skip to content

Commit a68149e

Browse files
committed
Updated to .NET Framework 4.6.1, small code cleanup
1 parent 20e5ee3 commit a68149e

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

MB_SubSonic/Properties/Resources.Designer.cs

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MB_SubSonic/SubSonic.csproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>MusicBeePlugin</RootNamespace>
1111
<AssemblyName>mb_Subsonic</AssemblyName>
12-
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<NuGetPackageImportStamp>
1515
</NuGetPackageImportStamp>
16+
<TargetFrameworkProfile />
1617
</PropertyGroup>
1718
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1819
<DebugSymbols>true</DebugSymbols>

MB_SubSonic/Subsonic.cs

+5-4
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ namespace MusicBeePlugin
1616
{
1717
public static class Subsonic
1818
{
19-
private const int TagCount = 13;
19+
private const int TagCount = 14;
2020
private const string ApiVersion = "1.13.0";
2121
private const string CaptionServerError = "Error reported from Server";
2222
private static SubsonicSettings _currentSettings;
23-
private static SubsonicSettings.ServerType _serverType = SubsonicSettings.ServerType.Subsonic;
23+
private static SubsonicSettings.ServerType _serverType;
2424
public static bool IsInitialized;
2525
public static string SettingsFilename;
2626
public static string CacheFilename;
@@ -77,8 +77,7 @@ public static bool PingServer(SubsonicSettings settings)
7777
};
7878
var response = SendRequest(request);
7979
_serverType = GetServerTypeFromResponse(response);
80-
var isPingOk = IsPingOk(response);
81-
return isPingOk;
80+
return IsPingOk(response);
8281
}
8382
catch (Exception ex)
8483
{
@@ -1160,6 +1159,7 @@ private static KeyValuePair<byte, string>[] GetTags(Child child, string baseFold
11601159
tags[12] = new KeyValuePair<byte, string>((byte) Interfaces.Plugin.MetaDataType.RatingLove,
11611160
child.starred != default ? "L" : "");
11621161
tags[13] = new KeyValuePair<byte, string>((byte) Interfaces.Plugin.MetaDataType.Custom16, child.id ?? "");
1162+
tags[14] = new KeyValuePair<byte, string>((byte) Interfaces.Plugin.MetaDataType.Rating, child.userRating.ToString());
11631163

11641164
return tags;
11651165
}
@@ -1197,6 +1197,7 @@ private static KeyValuePair<byte, string>[] GetTags(LibreSonicAPI.Child child, s
11971197
tags[12] = new KeyValuePair<byte, string>((byte) Interfaces.Plugin.MetaDataType.RatingLove,
11981198
child.starred != default ? "L" : "");
11991199
tags[13] = new KeyValuePair<byte, string>((byte) Interfaces.Plugin.MetaDataType.Custom16, child.id ?? "");
1200+
tags[14] = new KeyValuePair<byte, string>((byte) Interfaces.Plugin.MetaDataType.Rating, child.userRating.ToString());
12001201

12011202
return tags;
12021203
}

0 commit comments

Comments
 (0)