Add ExternalId

This commit is contained in:
xjasonlyu
2022-05-24 23:23:00 +08:00
parent 7a889a4ac5
commit f4d536bf8f

View File

@@ -0,0 +1,71 @@
using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
#if !__EMBY__
using MediaBrowser.Model.Providers;
#endif
namespace Jellyfin.Plugin.JavTube.ExternalIds;
public class JavTubeExternalId: IExternalId
{
#if __EMBY__
public string Name => Constant.JavTube;
#else
public string ProviderName => Constant.JavTube;
#endif
public string Key => Constant.JavTube;
public string UrlFormatString => "{0}";
#if !__EMBY__
public ExternalIdMediaType? Type => ExternalIdMediaType.Movie;
#endif
public bool Supports(IHasProviderIds item)
{
return item is Movie;
}
}
public class JavTubeIdExternalId: IExternalId
{
#if __EMBY__
public string Name => Constant.JavTubeId;
#else
public string ProviderName => Constant.JavTubeId;
#endif
public string Key => Constant.JavTubeId;
public string UrlFormatString => null;
#if !__EMBY__
public ExternalIdMediaType? Type => ExternalIdMediaType.Movie;
#endif
public bool Supports(IHasProviderIds item)
{
return item is Movie;
}
}
public class JavTubeProviderExternalId: IExternalId
{
#if __EMBY__
public string Name => Constant.JavTubeProvider;
#else
public string ProviderName => Constant.JavTubeProvider;
#endif
public string Key => Constant.JavTubeProvider;
public string UrlFormatString => null;
#if !__EMBY__
public ExternalIdMediaType? Type => ExternalIdMediaType.Movie;
#endif
public bool Supports(IHasProviderIds item)
{
return item is Movie;
}
}