Skip to content

Commit

Permalink
Style clean-up and general house-keeping.
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseward committed Aug 2, 2020
1 parent ec6ed96 commit 70ec987
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 64 deletions.
77 changes: 15 additions & 62 deletions Jellyfin.Plugin.Lastfm/Plugin.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
namespace Jellyfin.Plugin.Lastfm
{
using System;
using System.Collections.Generic;
using Configuration;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Model.Plugins;
using MediaBrowser.Model.Serialization;
using System;
using System.Threading;
using System.Linq;
using System.Collections.Generic;
using System.IO;
using MediaBrowser.Model.Drawing;
using Microsoft.Extensions.Logging;

/// <summary>
/// Class Plugin
/// </summary>

public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
{
/// <summary>
Expand All @@ -24,17 +17,24 @@ public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
public static bool Syncing { get; internal set; }


public PluginConfiguration PluginConfiguration
{
get { return Configuration; }
}
public PluginConfiguration PluginConfiguration => Configuration;

public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer, ILoggerFactory loggerFactory)
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer)
: base(applicationPaths, xmlSerializer)
{
Instance = this;
}

public override Guid Id { get; } = new Guid("de7fe7f0-b048-439e-a431-b1a7e99c930d");

public override string Name
=> "Last.fm";

public override string Description
=> "Scrobble your music collection to Last.fm";

public static Plugin Instance { get; private set; }

public IEnumerable<PluginPageInfo> GetPages()
{
return new[]
Expand All @@ -46,52 +46,5 @@ public IEnumerable<PluginPageInfo> GetPages()
}
};
}

private Guid _id = new Guid("de7fe7f0-b048-439e-a431-b1a7e99c930d");
public override Guid Id
{
get { return _id; }
}

/// <summary>
/// Gets the name of the plugin
/// </summary>
/// <value>The name.</value>
public override string Name
{
get { return "Last.fm"; }
}

/// <summary>
/// Gets the description.
/// </summary>
/// <value>The description.</value>
public override string Description
{
get
{
return "Scrobble your music collection to Last.fm";
}
}

public Stream GetThumbImage()
{
var type = GetType();
return type.Assembly.GetManifestResourceStream(type.Namespace + ".thumb.png");
}

public ImageFormat ThumbImageFormat
{
get
{
return ImageFormat.Png;
}
}

/// <summary>
/// Gets the instance.
/// </summary>
/// <value>The instance.</value>
public static Plugin Instance { get; private set; }
}
}
2 changes: 0 additions & 2 deletions Jellyfin.Plugin.Lastfm/ServerEntryPoint.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
namespace Jellyfin.Plugin.Lastfm
{
using Api;
using Configuration;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Plugins;
using MediaBrowser.Controller.Session;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Model.Tasks;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
Expand Down

0 comments on commit 70ec987

Please sign in to comment.