Skip to content

Commit

Permalink
update trailer format
Browse files Browse the repository at this point in the history
  • Loading branch information
LukePulverenti committed Aug 20, 2024
1 parent a348e1b commit 7bd869b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion NfoMetadata/Parsers/BaseNfoParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,8 @@ protected virtual async Task FetchDataFromXmlNode(XmlReader reader, MetadataResu

if (!string.IsNullOrWhiteSpace(val))
{
val = val.Replace("plugin://plugin.video.youtube/?action=play_video&videoid=", BaseNfoSaver.YouTubeWatchUrl, StringComparison.OrdinalIgnoreCase).Replace("plugin://plugin.video.youtube/play/?video_id=", BaseNfoSaver.YouTubeWatchUrl, StringComparison.OrdinalIgnoreCase);
val = val.Replace("plugin://plugin.video.youtube/?action=play_video&videoid=", BaseNfoSaver.YouTubeWatchUrl, StringComparison.OrdinalIgnoreCase)
.Replace("plugin://plugin.video.youtube/play/?video_id=", BaseNfoSaver.YouTubeWatchUrl, StringComparison.OrdinalIgnoreCase);

item.AddTrailerUrl(val);
}
Expand Down
2 changes: 1 addition & 1 deletion NfoMetadata/Savers/BaseNfoSaver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ private void AddCommonNodes(BaseItem item, LibraryOptions libraryOptions, XmlWri
private string GetOutputTrailerUrl(string url)
{
// This is what xbmc expects
return url.Replace(YouTubeWatchUrl, "plugin://plugin.video.youtube/?action=play_video&videoid=", StringComparison.OrdinalIgnoreCase);
return url.Replace(YouTubeWatchUrl, "plugin://plugin.video.youtube/play/?video_id=", StringComparison.OrdinalIgnoreCase);
}

private void AddImages(BaseItem item, XmlWriter writer, ILibraryManager libraryManager, LibraryOptions libraryOptions)
Expand Down

0 comments on commit 7bd869b

Please sign in to comment.