public static Uri ThumbnailUriOrNull(this RPMusicSong sg, string size) { if (string.IsNullOrEmpty(size)) { size = "medium"; } return(new Uri("musicsongthumbnail64?id=" + Uri.EscapeUriString(Functions.EncodeToBase64(sg.ID)) + "&size=" + size, UriKind.Absolute)); }
public static Uri ThumbnailUriOrNull(this RPMusicAlbum al, string size) { // Normal albums - remote thumbnail if (string.IsNullOrEmpty(size)) { size = "medium"; } return(new Uri("musicalbumthumbnail64?id=" + Uri.EscapeUriString(Functions.EncodeToBase64(al.ID)) + "&size=" + size, UriKind.Absolute)); }
static string HTMLTableForPicturesLibrary(FileBrowseResult fbrs, int numberOfColumns, int pageNumber, int itemsPerPage, bool showThumbnails) { List <string> content = new List <string>(); foreach (BrowseItem strFolder in fbrs.Directories) { string cellContent = ""; // Link string folderPath = Path.Combine(fbrs.BaseDirectory, strFolder.Name); folderPath = Functions.EncodeToBase64(folderPath); string folderImageSource = "/static/images/imgFolder150x75.png"; HTMLImage image = new HTMLImage(folderImageSource, "folderpic"); cellContent += image.ToString(); cellContent += "<br />"; cellContent += Path.GetFileName(strFolder.Name); HTMLLink lnk = new HTMLLink("browsepics?PATH=" + folderPath, cellContent); content.Add(lnk.ToString()); } foreach (BrowseItem strFile in fbrs.Files) { // Assemble path to file string filePath = Path.Combine(fbrs.BaseDirectory, strFile.Name); filePath = Functions.EncodeToBase64(filePath); string imgSrc = "getfilethumbnail64?filename=" + filePath + "&size=medium"; HTMLImage image = new HTMLImage(imgSrc, "thumbnail"); // Link HTMLLink lnk = new HTMLLink("viewpic?FN=" + filePath + "&size=extralarge", image.ToString()); content.Add(lnk.ToString()); } return(HTMLTable.HTMLTableWithCellContents("picturelibrarytable", numberOfColumns, content)); }
public static Uri StreamSourceUri(this RPMusicSong sg) { return(new Uri("streamsong64?id=" + Uri.EscapeUriString(Functions.EncodeToBase64(sg.ID)), UriKind.Absolute)); }