extends Node var dl_dirs:Dictionary = {# NOTE TO SELF DELETE THIS VAR ONCE YOU THINK YOU DONT NEED IT "Pictures":OS.get_system_dir(OS.SYSTEM_DIR_PICTURES), "Documents":OS.get_system_dir(OS.SYSTEM_DIR_DOCUMENTS), "Downloads":OS.get_system_dir(OS.SYSTEM_DIR_DOWNLOADS), } var cookies:String = "" var busy:int = 0 #amount of busy URL images #var watchs:String = "" var subdata:Dictionary = {} var lastid:int = 0 var view_gallery:bool = true var stuff_requested:int = 0 # the amount of pages/images pages requested by user. var stuff_loaded:int = 0 # the amount of pages/images loaded . var username:String = "main" # the name of the profile for the multi-profile system var headers:PoolStringArray var profile:String = "user" var right_click_ID:int var sub_size:int = 256 var sub_entry:PackedScene = preload("res://SubEntry.tscn") var viewer:PackedScene = preload("res://SubViewer.tscn") var dl_dir:PackedScene = preload("res://dl_dir_setting.tscn") var current_viewer:SubViewer #var blacklist:PoolStringArray = [] var cache_dir = OS.get_cache_dir()+"/fagrabber/" var open_where:int = 0 #var refresh_interval:float func _ready(): get_tree().set_screen_stretch( SceneTree.STRETCH_MODE_DISABLED, SceneTree.STRETCH_ASPECT_IGNORE, Vector2(120,120),lerp(1,OS.get_screen_dpi()/72,0.5) ) var folder = Directory.new() folder.make_dir(cache_dir) func clear_cache(): var cache = Directory.new() cache.open(cache_dir) cache.list_dir_begin() var file_name = cache.get_next() while file_name != "": cache.remove(cache_dir+file_name) file_name = cache.get_next()