Skip to content

Commit

Permalink
Fixed Refresh would not reload the current folder files, missing chan…
Browse files Browse the repository at this point in the history
…ges in Rating/Star/Love settings. #49
  • Loading branch information
midwan committed Jun 8, 2019
1 parent a68149e commit 8447369
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
13 changes: 8 additions & 5 deletions 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 = 27;
_about.VersionMinor = 28;
_about.Revision = 0;
_about.MinInterfaceVersion = Interfaces.Plugin.MinInterfaceVersion;
_about.MinApiRevision = Interfaces.Plugin.MinApiRevision;
Expand Down Expand Up @@ -152,8 +152,7 @@ public void ReceiveNotification(string sourceFileUrl, Interfaces.Plugin.Notifica
break;

case Interfaces.Plugin.NotificationType.PlaylistMoved:
string[] filenames;
Subsonic.QueryPlaylistFilesEx(sourceFileUrl, out filenames);
Subsonic.QueryPlaylistFilesEx(sourceFileUrl, out var filenames);

// Get Song IDs to add to playlist
var songIds = new List<int>();
Expand Down Expand Up @@ -211,11 +210,15 @@ public string RetrieveArtwork(string sourceFileUrl, string albumArtist, string a
public void Refresh()
{
if (Subsonic.IsInitialized)
{
Subsonic.Refresh();
}
else
{
Subsonic.SendNotificationsHandler.Invoke(Subsonic.Initialize()
? Interfaces.Plugin.CallbackType.StorageReady
: Interfaces.Plugin.CallbackType.StorageFailed);
? Interfaces.Plugin.CallbackType.StorageReady
: Interfaces.Plugin.CallbackType.StorageFailed);
}
}

public bool IsReady()
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.27.0.0")]
[assembly: AssemblyFileVersion("2.27.0.0")]
[assembly: AssemblyVersion("2.28.0.0")]
[assembly: AssemblyFileVersion("2.28.0.0")]
4 changes: 1 addition & 3 deletions MB_SubSonic/Subsonic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,7 @@ public static KeyValuePair<byte, string>[][] GetFiles(string path)

if (!string.IsNullOrEmpty(path))
{
if (!cacheLoaded || _cacheUpdating || files == null)
return GetFolderFiles(path);
files = GetPathFilteredFiles(files, path);
return GetFolderFiles(path);
}
}

Expand Down

0 comments on commit 8447369

Please sign in to comment.