public static string GetPlaylistImageUrl(String image, String playlistUuid, RectImageSize size) { int w = 750; int h = 500; if (!RestUtility.ParseImageSize(size.ToString(), out w, out h)) { throw new ArgumentException("Invalid image size", "size"); } if (!String.IsNullOrEmpty(image)) { return(GetImageUrl(image, w, h)); } else { return(String.Format("http://images.tidalhifi.com/im/im?w={1}&h={2}&uuid={0}&rows=2&cols=3&noph", playlistUuid, w, h)); } }
public static string GetVideoImageUrl(String imageId, String imagePath, RectImageSize size) { int w = 750; int h = 500; if (!RestUtility.ParseImageSize(size.ToString(), out w, out h)) { throw new ArgumentException("Invalid image size", "size"); } String url = null; if (!String.IsNullOrEmpty(imageId)) { url = GetImageUrl(imageId, w, h); } else { url = String.Format("http://images.tidalhifi.com/im/im?w={1}&h={2}&img={0}&noph", imagePath, w, h); } return(url); }