using System; using System.Collections.Generic; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Plugins; using MediaBrowser.Model.Plugins; using MediaBrowser.Model.Serialization; using WatchParty.Configuration; namespace WatchParty { // ----------------------------------------------------------------------- // Emby plugin entry point. Builds clean against the real // MediaBrowser.Server.Core/MediaBrowser.Common 4.9.1.90 assemblies // (restored from NuGet) - BasePlugin, IHasWebPages and PluginPageInfo's // Name/EmbeddedResourcePath are all confirmed as used below. See // docs/architecture.md#assumptions-to-verify for what's still only // compile-checked rather than run against a real server (e.g. whether the // dashboard actually renders this settings page correctly). // ----------------------------------------------------------------------- public class Plugin : BasePlugin, IHasWebPages { public static Plugin Instance { get; private set; } public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer) : base(applicationPaths, xmlSerializer) { Instance = this; } // Generated once for this project - keep it stable across every release, // Emby uses it to identify the plugin (and its config file) across upgrades. public override Guid Id => new Guid("5b6a1e2c-6e3a-4b8b-9c1a-1f7a2c9d4e10"); public override string Name => "Watch Party"; public override string Description => "Watch the same title together with other users on this server: " + "start or join a party, and the server nudges everyone's existing " + "playback back in sync using Emby's normal remote-control commands."; /// Admin-only settings page (thresholds etc.) - see Configuration/configPage.html. public IEnumerable GetPages() { yield return new PluginPageInfo { Name = "WatchParty", EmbeddedResourcePath = GetType().Namespace + ".Configuration.configPage.html" }; } } }