- July 25, 2010
- 4,024
- 1,420
- Home Country
- Germany
- Thread starter
- #41
This is what I did:
But I am not sure if this is right
@morpheus_xx
Maybe a bit offtopic here, but hwile I am writing:
How do I get Fanart for a episode? I use this code:
And fet this in my log:
Code:
case "subtitles":
if (Utils.IsNowPlaying())
{
ISubtitlePlayer subtitlePlayer = ServiceRegistration.Get<IPlayerContextManager>().PrimaryPlayerContext.CurrentPlayer as ISubtitlePlayer;
if (subtitlePlayer != null)
{
var availableSubtitlesList = subtitlePlayer.Subtitles.ToList();
int index = availableSubtitlesList.FindIndex(x => x == subtitlePlayer.CurrentSubtitle);
if (index == (availableSubtitlesList.Count - 1))
index = 0;
subtitlePlayer.SetSubtitle(availableSubtitlesList[index]);
}
}
break;
case "audiotrack":
if (Utils.IsNowPlaying())
{
ISharpDXVideoPlayer videoPlayer = ServiceRegistration.Get<IPlayerContextManager>().PrimaryPlayerContext.CurrentPlayer as ISharpDXVideoPlayer;
if (videoPlayer != null)
{
var availableAudiotracksList = videoPlayer.AudioStreams.ToList();
int index = availableAudiotracksList.FindIndex(x => x == videoPlayer.CurrentAudioStream);
if (index == (availableAudiotracksList.Count - 1))
index = 0;
videoPlayer.SetAudioStream(availableAudiotracksList[index]);
}
}
break;
/*case "screenshot":
button = Key.Screenshot;
break;*/
case "aspectratio":
if (Utils.IsNowPlaying())
{
ISharpDXVideoPlayer videoPlayer = ServiceRegistration.Get<IPlayerContextManager>().PrimaryPlayerContext.CurrentPlayer as ISharpDXVideoPlayer;
if (videoPlayer != null)
{
var availableGeometriesList = availableGeometries.Values.ToList();
int index = availableGeometriesList.FindIndex(x => x.Name == videoPlayer.GeometryOverride.Name);
if (index == (availableGeometriesList.Count - 1))
index = 0;
videoPlayer.GeometryOverride = availableGeometriesList[index];
}
}
break;
But I am not sure if this is right
@morpheus_xx
Maybe a bit offtopic here, but hwile I am writing:
How do I get Fanart for a episode? I use this code:
Code:
IList<FanArtImage> fanart = ServiceRegistration.Get<IFanArtService>().GetFanArt(fanArtMediaType, fanartType, name, 0, 0, true);
And fet this in my log:
So "name" is the name of the Episode in the SeriesAspect. I also tried Thumbnail instead of Banner as a fallback, but same result. I could reverse the patterns for season, and seres, but not for an actual episode :/GetArtworkResized: no fanart found - fanArtMediaType: Series, fanartType: Banner, name: Pilot