Jump to content

Search the Community

Showing results for tags 'c#'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements
    • Emby Premiere Purchase/Subscription Support
    • Feature Requests
    • Tutorials and Guides
  • Emby Server
    • General/Windows
    • Android Server
    • Asustor
    • FreeBSD
    • Linux
    • NetGear ReadyNAS
    • MacOS
    • QNAP
    • Synology
    • TerraMaster NAS
    • Thecus
    • Western Digital
    • DLNA
    • Live TV
  • Emby Apps
    • Amazon Alexa
    • Android
    • Android TV / Fire TV
    • Windows & Xbox
    • Apple iOS / macOS
    • Apple TV
    • Kodi
    • LG Smart TV
    • Linux & Raspberry Pi
    • Roku
    • Samsung Smart TV
    • Sony PlayStation
    • Web App
    • Windows Media Center
    • Plugins
  • Language-specific support
    • Arabic
    • Dutch
    • French
    • German
    • Italian
    • Portuguese
    • Russian
    • Spanish
    • Swedish
  • Community Contributions
    • Ember for Emby
    • Fan Art & Videos
    • Tools and Utilities
    • Web App CSS
  • Testing Area
    • WMC UI (Beta)
  • Other
    • Non-Emby General Discussion
    • Developer API
    • Hardware
    • Media Clubs

Blogs

  • Emby Blog

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 5 results

  1. Can I ask why this often gets called twice when the user requests it once? I have noticed this many times, and in one of my plugins I actually cancel duplicate tasks, but why after all this time (a few years) is this still often getting called twice? At first I was wondering if it was if the user clicked identfy in the Gui having filled in the Name dialog, before the Provider Ids Text boxes load, but its not. It still does it even if the user waits for the dialog to fully load. Is it something in Emby, or maybe because results wernt returned fast enough? Is there a timeout before it gets recalled? I log my plugins and can see this happening, sometimes the second task runs before the first is finished, causing the log to wriite interleaved into the first ones text. The functionallity still works just fine, but its annoying..as the results can reload or even just blank out (return nothing).
  2. I am wanting to use this interface for some data importing public Task<MetadataResult<MusicAlbum>> GetMetadata(ItemInfo info, LibraryOptions libraryOptions, IDirectoryService directoryService, CancellationToken cancellationToken) however from here I can get Album Name and The Album Id , but thats about it. I want to be able to get the Albums root path. I know how to get it from the Audio (song) by getting the parent path, but thats not the interface I want to use, I do not wish to probe every song when I probably don't need to. I only want to work at album level. Is that still possible? public Task<MetadataResult<Audio>> GetMetadata(ItemInfo info, LibraryOptions libraryOptions, IDirectoryService directoryService, CancellationToken cancellationToken) info.Path is blank/empty. info.ContaingFolder is blank/empty. I understand this decision was probably made to drop duplicate iformation from the database, but you are able to get the base path somehow when you select an album to delete it. So I am currently trying to get the delete paths, so that I can thus apply some logic and determine the basepath from that. var pathx = libraryManager.GetItemById(info.Id); List<FileSystemMetadata> dpths = pathx.GetDeletePaths(false); However when I try to use GetDeletePaths I keep getting GenericList Exceptions - Method Not Found *** Error Report *** Version: 4.8.0.78 Command line: C:\Users\mike\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp Operating system: Microsoft Windows 6.2.9200 Framework: .NET 6.0.26 OS/Process: x64/x64 Runtime: C:/Users/mike/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll Processor count: 4 Data path: C:\Users\mike\AppData\Roaming\Emby-Server\programdata Application path: C:\Users\mike\AppData\Roaming\Emby-Server\system System.MissingMethodException: System.MissingMethodException: Method not found: 'System.Collections.Generic.List`1<MediaBrowser.Model.IO.FileSystemMetadata> MediaBrowser.Controller.Entities.BaseItem.GetDeletePaths(Boolean)'. at LocalAlbumCoverImporter.LocalAlbumCoverImporter.GetMetadata(ItemInfo info, LibraryOptions libraryOptions, IDirectoryService directoryService, CancellationToken cancellationToken) at Emby.Providers.Manager.MetadataService`2.RefreshWithProviders(MetadataResult`1 metadata, TIdType id, MetadataRefreshMode metadataRefreshMode, Boolean replaceAllMetadata, MetadataRefreshOptions options, BaseItem[] collectionFolders, LibraryOptions libraryOptions, List`1 providers, ItemImageProvider imageService, CancellationToken cancellationToken) Source: LocalAlbumCoverImporter TargetSite: System.Threading.Tasks.Task`1[MediaBrowser.Controller.Providers.MetadataResult`1[MediaBrowser.Controller.Entities.Audio.MusicAlbum]] GetMetadata(MediaBrowser.Controller.Providers.ItemInfo, MediaBrowser.Model.Configuration.LibraryOptions, MediaBrowser.Controller.Providers.IDirectoryService, System.Threading.CancellationToken) Please tell me there is a simpler way to do this? i.e, to get the albums basepath from this Interface?
  3. How I can add a movie to a collection using C#? I'm developing a plugin and want to be able to add a movie to a newly created collection during, for example, Refresh Metadata/Identify action. I tried: QueryResult<BaseItem> collections = _libraryManager.QueryItems(new InternalItemsQuery() { IncludeItemTypes = new[] { "collections", "Boxset" }, Name = collectionName }); // one collection item found if (movieItem.AddCollection((BoxSet)collections.Items[0])) { // once with UpdateToRepository, once without movieItem.UpdateToRepository(ItemUpdateType.None); // movieItem.UpdateToRepository(ItemUpdateType.MetadataEdit); } and this: _collectionManager.AddToCollection(newCollection.InternalId, internalIdMovieItemsArray); During the action, I can add another movie to the newly created collection, but not the one I'm currently updating. How I can add a movie to a collection using C#?
  4. rhodges

    Emby ApiClient UpdateItem

    I'm running a GetItemsAsync and pulling back movies. I'm then iterating the items and on some I'm setting the DateCreated and calling UpdateItem, but I'm getting "The method or operation is not implemented". Am I doing something wrong with how I'm updating them, or is setting the DateCreated not supported? I'm trying to update the DateAdded (which I was thinking is the same as DateCreated, but maybe not).
  5. Hydro

    c# credentialProvider

    Hi I try to create a plugin for my home automation system to control emby. My home automation use c# plugins. So i install https://github.com/MediaBrowser/Emby.ApiClient with nugget and try the multi-server example. But i'm stuck at CredentialProvider. If i understand, i need to implement my own ICredentialProvider but i don't know how to do this. Is anyone having more informations about that point ? My code so far : using Constellation.Package; using MediaBrowser.ApiInteraction; using MediaBrowser.Model.Session; using MediaBrowser.Model.Logging; using MediaBrowser.ApiInteraction.Cryptography; using MediaBrowser.ApiInteraction.Net; using MediaBrowser.ApiInteraction.WebSocket; namespace Emby { public class Program : PackageBase { static void Main(string[] args) { PackageHost.Start<Program>(args); } public override void OnStart() { PackageHost.WriteInfo("Package starting - IsRunning: {0} - IsConnected: {1}", PackageHost.IsRunning, PackageHost.IsConnected); var logger = new NullLogger(); var capabilities = new ClientCapabilities(); var device = new Device { DeviceName = "My Device Name", DeviceId = "My Device Id" }; var credentialProvider = new CredentialProvider(); // If using the portable class library you'll need to supply your own INetworkConnection implementation. var networkConnection = new NetworkConnection(logger); // If using the portable class library you'll need to supply your own ICryptographyProvider implementation. var cryptoProvider = new CryptographyProvider(); // If using the portable class library you'll need to supply your own IServerLocator implementation. var serverLocator = new ServerLocator(logger); var connectionManager = new ConnectionManager(logger, credentialProvider, networkConnection, serverLocator, "My App Name", // Application version "1.0.0.0", device, capabilities, cryptoProvider, ClientWebSocketFactory.CreateWebSocket); } } } Thank for your help !
×
×
  • Create New...