Browse Source

Remove unnecessary table

Zed 6 năm trước cách đây
mục cha
commit
87d1e49f1a
1 tập tin đã thay đổi với 5 bổ sung5 xóa
  1. 5 5
      src/parserutils.nim

+ 5 - 5
src/parserutils.nim

@@ -1,4 +1,4 @@
-import json, strutils, times, tables, macros, htmlgen, uri, unicode, options
+import json, strutils, times, macros, htmlgen, uri, unicode, options
 import regex
 import types, utils, formatters
 
@@ -82,11 +82,11 @@ proc getBanner*(js: JsonNode): string =
   # use primary color from profile picture color histrogram
   with p, js{"profile_image_extensions", "mediaColor", "r", "ok", "palette"}:
     if p.len > 0:
-      let pal = p[0]{"rgb"}.getFields
+      let pal = p[0]{"rgb"}
       result = "#"
-      result.add toHex(pal["red"].getInt, 2)
-      result.add toHex(pal["green"].getInt, 2)
-      result.add toHex(pal["blue"].getInt, 2)
+      result.add toHex(pal{"red"}.getInt, 2)
+      result.add toHex(pal{"green"}.getInt, 2)
+      result.add toHex(pal{"blue"}.getInt, 2)
       return
 
   return "#161616"