Beispiel #1
0
        public static List <WebArtworkDetailed> ArtworkReader(SQLiteDataReader reader, int idx)
        {
            string url = reader.ReadString(idx);

            if (String.IsNullOrEmpty(url) || url == "unknown")
            {
                return(new List <WebArtworkDetailed>());
            }

            Uri uri  = new Uri(url);
            var item = new WebArtworkDetailed()
            {
                Filetype = Path.GetExtension(uri.LocalPath).Substring(1),
                Id       = url.GetHashCode().ToString(),
                Offset   = 0,
                Rating   = 1,
                Type     = WebFileType.Cover,
                Path     = url
            };

            return(new List <WebArtworkDetailed>()
            {
                item
            });
        }
        public static List <WebArtworkDetailed> ArtworkReader(SQLiteDataReader reader, int idx)
        {
            string url  = reader.ReadString(idx);
            var    item = new WebArtworkDetailed()
            {
                Filetype = "jpg",
                Id       = url.GetHashCode().ToString(),
                Offset   = 0,
                Rating   = 1,
                Type     = WebFileType.Cover,
                Path     = url
            };

            return(new List <WebArtworkDetailed>()
            {
                item
            });
        }