lvtianyi 1 Posted February 9, 2025 Posted February 9, 2025 How I can add a movie to a collection using C#? public class MovieProvider : BaseProvider, IRemoteMetadataProvider<Movie, MovieInfo>, IHasOrder{ ..... public async Task<MetadataResult<Movie>> GetMetadata(MovieInfo info, CancellationToken cancellationToken){ var result = new MetadataResult<Movie>{ ...... }; // Add collection. if (Configuration.EnableCollections && !string.IsNullOrWhiteSpace(m.Series)) result.Item.AddCollection(m.Series); ...... } }
lvtianyi 1 Posted February 9, 2025 Author Posted February 9, 2025 need implement IHasMetadataFeatures?
Luke 42077 Posted February 12, 2025 Posted February 12, 2025 On 2/9/2025 at 8:11 AM, lvtianyi said: need implement IHasMetadataFeatures? Hi, yes. this will get the option to show up in library settings to import collections from internet metadata. And then yes, item.AddCollection should do it.
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