xjasonlyu 2 Posted April 5, 2021 Share Posted April 5, 2021 I’ve recently been trying to write a metadata plugin for my Emby server, everything was just fine except I can’t find a way to get real movie path from GetMetadata method. If it was first time emby find the movie and call GetMetadata, the info.Name of MovieInfo would seem to be the file name of that movie, but if I manually use Identify to search this movie then the info.Name would be the name I set on the GetSearchResults. In Jellyfin, they have a info.Path for MovieInfo to retrieve movie path info but I can't find alternative property in emby's MovieInfo class.. So is there a way to retrieve the video path (or just file name) within GetMetadata method? public class MovieProvider : IRemoteMetadataProvider<Movie, MovieInfo> { public MovieProvider(IHttpClient httpClient, IJsonSerializer jsonSerializer, ILogManager logManager) : base( httpClient, jsonSerializer, logManager.CreateLogger<MovieProvider>()) { ... } public async Task<MetadataResult<Movie>> GetMetadata(MovieInfo info, CancellationToken cancellationToken) { info.Name // "Se7en.1995.REMASTERED.1080p.BluRay.x264-SADPANDA.mkv" First time automaticly scaned and called by emby. info.Name // "Se7en" When I use Identify search this movie, the Name would be I set on GetSearchResults => RemoteSearchResult. } ... } I googled and searched the emby community but still haven’t found the answer. So I would really be appreciate it if someone can help me with it. Link to comment Share on other sites More sharing options...
Luke 36878 Posted April 6, 2021 Share Posted April 6, 2021 Hi there, I'm curious. What's the use case for having the full file name? Link to comment Share on other sites More sharing options...
xjasonlyu 2 Posted April 7, 2021 Author Share Posted April 7, 2021 In my case, I have a lot of movies with hardcoded subtitles which have suffixes like .eng.mp4 .cht.mkv. Since it’s difficult to detect which language sub that movie has, I wanna extract the information from the original file name and add them as one of genres so I can quickly filter movies by genres. Link to comment Share on other sites More sharing options...
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