Jump to content

C# IRemoteMetadataProvider - How to impliment interface?


mickle026

Recommended Posts

mickle026

How do I get my plugin to appear here and be called as required (what interfaces do I need)?  I cannot find any documentation on this.

I am trying to add them all (Person,Movie,Series,Artist,MusicAlbum etc) but trying with Music Album first, it appears that interfacing incorrectly kills the server process and emby just exits , but I'm close now because I can get Song Metadata Provider to show, but I dont need that one as Emby shows nothing from it anyway - LOL!

The Person Remote Interface appears to be Empty ??

 

1951542208_Screenshot2022-02-09at15-09-27Emby.png.ae055f8dd8b1a358f57a831ac922f1a2.png633669769_Screenshot2022-02-09at15-09-06Emby.png.3d9b9fa46b8e2cc8cb256689f4cda2de.png

 

So I tried this and it compiles and runs ok

    public partial class CustomProvider : IRemoteMetadataProvider<MusicAlbum, AlbumInfo>
    {

        public Task<IEnumerable<RemoteSearchResult>> GetSearchResults(AlbumInfo searchInfo, CancellationToken cancellationToken)
        {
            throw new NotImplementedException();

        }
        Task<MetadataResult<MusicAlbum>> IRemoteMetadataProvider<MusicAlbum, AlbumInfo>.GetMetadata(AlbumInfo info, CancellationToken cancellationToken)
        {
            return GetMetadata(info, cancellationToken);
        }

        private Task<MetadataResult<MusicAlbum>> GetMetadata(AlbumInfo info, CancellationToken cancellationToken)
        {
            throw new NotImplementedException();
        }


    }

It does not appear in the Library settings, however if I do the same thing for song it does!

1689157013_Screenshot2022-02-09at16-02-02Emby.png.eb78beacc1ea5aacd415b1bb2c260d25.png

IRemoteMetadataProvider<Audio, SongInfo>

 

By Using MusicAlbum or MusicArtist they are not showing

IRemoteMetadataProvider<MusicArtist, ArtistInfo>
IRemoteMetadataProvider<MusicAlbum, AlbumInfo>

 

Please advise on what I need to do to get them to show here, thanks.

Edited by mickle026
Link to comment
Share on other sites

mickle026
2 hours ago, Luke said:

People will never show up there, so that's expected, just fyi.

I cannot get any to show in metadata other than song..  What do i need to get Music Album and Artist, Movie etc to show?

Edited by mickle026
Link to comment
Share on other sites

  • 3 weeks later...
mickle026
4 hours ago, Luke said:

It could be because you did a partial class.

Figured it out, the partial class isn't the problem, its ok to split the class over several files.

It was a typo, yes ! as silly as that! - that the debugger wasn't underlining!  I was on the right track with the code.

695582962_Screenshot2022-03-02at22-10-21Emby.png.1d78a96e320cc746f2cb43281f9c9022.png

1431913096_Screenshot2022-03-02at22-09-45Emby.png.46673384ab0fb13859332eabadb6152f.png

188808277_Screenshot2022-03-02at22-15-36Emby.png.0d080d1a4196d55e9fb9196b12902a93.png

Thank you

 

Edited by mickle026
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...