@@ -61,7 +61,7 @@ local function reading()
61
61
local strend = string.find (entry , " :" , nil , true )
62
62
local id = string.sub (entry , 2 , strend - 1 )
63
63
print (" World id: " .. id )
64
- local handle = io.popen (" curl " .. obs .obs_data_get_string (script_settings , " curl_params" ) .. " -X GET \" https://api.vrchat.cloud/api/1/worlds/wrld_" .. id .. " \" -b \" apiKey=JlE5Jldo5Jibnk5O5hTx6XVqsJu4WJ26\" -A \" Obs-Vrchat-Log-Reader/1.0.1 (Discord: Nosjo, Email: admin@nosjo.xyz)\" " )
64
+ local handle = io.popen (" curl " .. obs .obs_data_get_string (script_settings , " curl_params" ) .. " -X GET \" https://api.vrchat.cloud/api/1/worlds/wrld_" .. id .. " \" -b \" apiKey=JlE5Jldo5Jibnk5O5hTx6XVqsJu4WJ26\" -A \" Obs-Vrchat-Log-Reader/1.0.2 (Discord: Nosjo, Email: admin@nosjo.xyz)\" " )
65
65
local txt = handle :read (" *a" )
66
66
print (" Raw json: " .. txt )
67
67
local arr = json .decode (txt )
@@ -129,25 +129,6 @@ function script_properties()
129
129
return props
130
130
end
131
131
132
- -- init
133
- local function is_frontend_ready ()
134
- local scene = obs .obs_frontend_get_current_scene ()
135
- local ready = scene ~= nil
136
- obs .obs_source_release (scene )
137
- return ready
138
- end
139
-
140
- local function try_first_load ()
141
- if is_frontend_ready () then
142
- obs .timer_remove (try_first_load )
143
- init ()
144
- end
145
- end
146
-
147
- function _G .script_load (settings )
148
- if not is_frontend_ready () then
149
- obs .timer_add (try_first_load , 1000 )
150
- else
151
- init ()
152
- end
132
+ function script_load (settings )
133
+ init ()
153
134
end
0 commit comments