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);
        }
        /// <summary>
        /// Helper method to retrieve a stream with a video conver image
        /// </summary>
        public Task <WebStreamModel> GetVideoImageAsync(String imageId, String imagePath, RectImageSize size)
        {
            string url = GetVideoImageUrl(imageId, imagePath, size);

            return(RestClient.GetWebStreamModelAsync(url));
        }
 /// <summary>
 /// Helper method to retrieve a stream with a video conver image
 /// </summary>
 public Task <WebStreamModel> GetVideoImageAsync(VideoModel model, RectImageSize size)
 {
     return(GetVideoImageAsync(model.ImageId, model.ImagePath, size));
 }
        /// <summary>
        /// Helper method to retrieve a stream with a playlist image
        /// </summary>
        public Task <WebStreamModel> GetPlaylistImageAsync(String image, String playlistUuid, RectImageSize size)
        {
            string url = GetPlaylistImageUrl(image, playlistUuid, size);

            return(RestClient.GetWebStreamModelAsync(url));
        }
 /// <summary>
 /// Helper method to retrieve a stream with a playlist image
 /// </summary>
 public Task <WebStreamModel> GetPlaylistImageAsync(PlaylistModel model, RectImageSize size)
 {
     return(GetPlaylistImageAsync(model.Image, model.Uuid, size));
 }