ginjaninja 616 Posted 4 hours ago Posted 4 hours ago (edited) good find.. could be this then https://dev.emby.media/reference/pluginapi/MediaBrowser.Controller.Entities.BaseItem.html#MediaBrowser_Controller_Entities_BaseItem_GetInternalMetadataPath and this GetImagePath(BaseItem, ImageType) https://dev.emby.media/reference/pluginapi/MediaBrowser.Controller.Entities.BaseItemExtensions.html edit seems the ai gods agree using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Logging; using MediaBrowser.Model.Tasks; namespace Emby.PersonPathExporter { public class ExportPersonPathsTask : IScheduledTask { private readonly ILibraryManager _libraryManager; private readonly ILogger _logger; // Emby automatically injects dependencies via the constructor public ExportPersonPathsTask(ILibraryManager libraryManager, ILogManager logManager) { _libraryManager = libraryManager; _logger = logManager.GetLogger(Name); } public string Name => "Export Person Paths and Metadata"; public string Key => "ExportPersonPathsAndMetadataTask"; public string Description => "Logs the InternalMetadataPath and ImagePath for every person in the Emby library."; public string Category => "Maintenance"; public async Task Execute(CancellationToken cancellationToken, IProgress<double> progress) { _logger.Info("Starting Person Path Export task..."); // Query items of type 'Person' recursively across the entire database var query = new InternalItemsQuery { IncludeItemTypes = new[] { Tuple.Create(typeof(Person).Name, false) }, Recursive = true }; var people = _libraryManager.GetItemList(query); if (people == null || people.Length == 0) { _logger.Info("No people found in the library database."); progress.Report(100); return; } int totalCount = people.Length; int currentCount = 0; _logger.Info($"Found {totalCount} people. Iterating and logging paths..."); foreach (var item in people) { cancellationToken.ThrowIfCancellationRequested(); if (item is Person person) { // Extract paths string name = person.Name ?? "Unknown"; string internalMetadataPath = person.InternalMetadataPath ?? "No internal metadata path available"; // Retrieve the primary image path if it exists string imagePath = person.GetImagePath(ImageType.Primary) ?? "No primary image path found"; // Output directly to Emby server's primary logs _logger.Info($"Person: {name} | MetadataPath: {internalMetadataPath} | ImagePath: {imagePath}"); } currentCount++; progress.Report((double)currentCount / totalCount * 100); } _logger.Info("Finished exporting person paths."); await Task.CompletedTask; } public IEnumerable<TaskTriggerInfo> GetDefaultTriggers() { // Provides a template for manual execution, but can be scheduled to run weekly if needed return new[] { new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerManual } }; } } } Edited 3 hours ago by ginjaninja
Smitty018210 162 Posted 1 hour ago Author Posted 1 hour ago (edited) 3 hours ago, Lessaj said: Do you have Emby Data Explorer plugin installed? You can view the people data that way and it might point you in the right direction. EDIT: I noticed some newer people in my server don't have a path mentioned, in the data below there is still mention of where their primary image is stored, so that could still be a data point. I installed this plugin, but I do not see explore item detail option. Edited 1 hour ago by Smitty018210
Lessaj 511 Posted 1 hour ago Posted 1 hour ago Try hard refreshing the web UI, disabling cache with Dev tools, use incognito or another browser. I remember it didn't appear right away, something with cache.
Smitty018210 162 Posted 1 hour ago Author Posted 1 hour ago (edited) 10 minutes ago, Lessaj said: Try hard refreshing the web UI, disabling cache with Dev tools, use incognito or another browser. I remember it didn't appear right away, something with cache. Yeah, work on different browser and in incognito. Thanks for the heads up! Edited 1 hour ago by Smitty018210 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now