Search the Community
Showing results for tags 'plugin development'.
-
-
Hi, I'm developing a plugin to update video metadata from 3rd party site. To the plugin, I added functionality to auto-update. After some time I noticed that the plugin switched off from the library and currently I'm not able to understand the reason for this. Code for the plugin update: var package = new PackageVersionInfo() { name = Plugin.PluginKey, versionStr = "1.123", classification = PackageVersionClass.Release, description = release.body, requiredVersionStr = "4.7.9", sourceUrl = "https://valid_url", checksum = checksum, targetFilename = DLL_NAME, infoUrl = null, runtimes = "netcore" }; try { await _installationManager.InstallPackage(package, true, progress, cancellationToken).ConfigureAwait(false); _logger.Info("Plugin installed successfully"); progress.Report(100d); } The question - why after a plugin update it switched off from the library?
-
Hi, How I can choose all video and series that have a specific ProviderId and doesn't have another ProviderId? I use the following code, but it looks like it takes actors as well QueryResult<BaseItem> itemsToUpdateResult = _libraryManager.QueryItems(new InternalItemsQuery() { IncludeItemTypes = new[] { CollectionType.Movies.ToString(), CollectionType.TvShows.ToString() }, MissingAnyProviderId = new[] { Plugin.PluginKey }, HasAnyProviderId = new[] { MetadataProviders.Imdb.ToString(), MetadataProviders.Tmdb.ToString() }, });
-
In my plugin I have successfully implemented Movie and Series Providers without any issues based on the examples from the Anime plugin. Now I am trying to do the same for people with no success. I have tried it first by implementing IRemoteMetadataProvider and when that didn't work I tested ILocalMetadataProvider also with no success. While debugging with breakpoints on the GetMetadata and GetSearchResults methods it seems like they are simply never called. Not while adding a person, not while manually refreshing the metadata and not while using the identify search. For reference these are my classes, stripped down to the minimum for testing: IRemoteMetadataProvider class MediaServerDBPersonProvider : IRemoteMetadataProvider<Person, PersonLookupInfo> { private readonly ILogger _log; private readonly IHttpClient _httpClient; private readonly IApplicationPaths _paths; private readonly IDirectoryService _directoryService; public static string provider_name = ProviderNames.MediaServerDB; public string Name => "MediaServerDB"; public MediaServerDBPersonProvider(IHttpClient httpClient, ILogger log, IDirectoryService directoryService, IApplicationPaths paths) { _httpClient = httpClient; _log = log; _directoryService = directoryService; _paths = paths; } public Task<MetadataResult<Person>> GetMetadata(PersonLookupInfo info, CancellationToken cancellationToken) { return Task.FromResult<MetadataResult<Person>>(new MetadataResult<Person>()); } public Task<IEnumerable<RemoteSearchResult>> GetSearchResults(PersonLookupInfo searchInfo, CancellationToken cancellationToken) { return Task.FromResult(Enumerable.Empty<RemoteSearchResult>()); } public Task<HttpResponseInfo> GetImageResponse(string url, CancellationToken cancellationToken) { return _httpClient.GetResponse(new HttpRequestOptions { CancellationToken = cancellationToken, Url = url }); } } ILocalMetadataProvider public class MediaServerDBLocalPersonProvider : ILocalMetadataProvider<Person> { private readonly ILogger _log; private readonly IApplicationPaths _paths; public static string provider_name = ProviderNames.MediaServerDB; public string Name => "MediaServerDB"; public MediaServerDBLocalPersonProvider(IApplicationPaths appPaths, ILogManager logManager) { _log = logManager.GetLogger(Name); _paths = appPaths; } public Task<MetadataResult<Person>> GetMetadata(ItemInfo info, IDirectoryService directoryService, CancellationToken cancellationToken) { return Task.FromResult<MetadataResult<Person>>(new MetadataResult<Person>()); } } One thing I noticed is that while for Movies and Series the used providers depend on the configuration of the library, the providers used for people seem to have a different configuration as even with all remote providers disabled in the library emby is still fetching remote metadata for people. So maybe I need to configure my provider to be used for people somehow? Any help would be appreciated. Thanks!
- 2 replies
-
- plugin development
- metadata
-
(and 1 more)
 Tagged with:
-
After plugin Html loads - any dynamically added control losses style
chef posted a topic in Developer API
I have a button on my my plugin html page. It creates dynamic List Items. However, after the server loads the Html in my plugin settings, when ever I press the button to create a new list item, the list item appears without any of the CSS styles from the server. I figure this is because the CSS has already bee read and used during load. How do I keep the styles for my new list items? <div style="vertical-align:middle;" id="newClientList"> <script type="text/javascript"> function AddProfileToList() { var e = document.getElementById("clientName"); strClientName = e.options[e.selectedIndex].text; //HERE is where the trouble begins var mainDiv = document.getElementById("newClientList"); var newUList = document.createElement("ul"); newUList.setAttribute("class", "ulForm ui-listview"); newUList.setAttribute("data-role", "listview"); newUList.setAttribute("data-inset", "true"); newUList.setAttribute("data-split-icon", "delete"); newUList.setAttribute("id", "clientProfiles"); //if (strClientName === "Dashboard") { var newLItem = document.createElement("li"); var configurationLink = document.createElement("a"); configurationLink.setAttribute("href", Dashboard.getConfigurationPageUrl("DashboardConfigPage")); configurationLink.innerText = "Represents a saved Profile 1"; var deleteButtonLink = document.createElement("a"); deleteButtonLink.setAttribute("href", "#"); deleteButtonLink.setAttribute("data-icon", "delete"); deleteButtonLink.setAttribute("class", "btnDeletePropfile"); deleteButtonLink.setAttribute("onclick", "deleteProfile(id)"); newLItem.appendChild(configurationLink); newLItem.appendChild(deleteButtonLink); newUList.appendChild(newLItem); mainDiv.appendChild(newUList); } </script>
