/// <summary> /// Photoes the specified username. /// </summary> /// <param name="set">The set.</param> /// <returns></returns> public ActionResult Show(string set) { string mediaKeys = (string.IsNullOrEmpty(set) ? string.Empty : persistentCollectionService.Get(set)); string url = persistentCollectionService.GetBackUrl(SiteCookie); string backlink = (url != null ? UrlService.CreateRootUrl(url) : string.Empty); PhotoView photoView = ModelFactory <PhotoView>(new { backlink, mediaKeys, setId = set }); return(View(photoView)); }
/// <summary> /// Gets the random album image. /// </summary> /// <param name="media">The media.</param> /// <returns></returns> private string GetRandomAlbumImage(Media media) { string randomImageLink = UrlService.CreateRootUrl("content/images/nophotosfound.png"); if (media != null) { string filePath = media.GetImageByPhotoType(PhotoType.Thumbnail).FilePath; if (!string.IsNullOrEmpty(filePath)) { randomImageLink = UrlService.CreateImageUrl(filePath); } } return(randomImageLink); }