public static void FillInfo(this Video m, HistoryInfo info) { if (info != null) { if (info.Key != null) { m.Key = Proxyfy(info); } if (info.ParentKey != null) { m.ParentKey = PlexHelper.PlexProxy(info.ParentKey); } if (info.GrandParentKey != null) { m.GrandparentKey = PlexHelper.PlexProxy(info.GrandParentKey); } m.Title = info.Title ?? ""; m.ParentTitle = info.ParentTitle ?? ""; m.GrandparentTitle = info.GrandParentTitle ?? ""; m.Title1 = info.GrandParentTitle; m.Title2 = info.ParentTitle; m.Art = info.Art; m.ParentArt = info.ParentArt; m.GrandparentArt = info.GrandParentArt; m.Thumb = info.Thumb; m.ParentThumb = info.ParentThumb; m.GrandparentThumb = info.GrandParentThumb; } }
private static string Proxyfy(HistoryInfo info) { string key = info.Key; if (key.Contains("/GetMetadata/")) { return(PlexHelper.PlexProxy(key + "/" + info.ToKey())); } return(PlexHelper.PlexProxy(key)); }