@@ -62,6 +62,7 @@ def __init__(self):
62
62
self .values_label : tk .Label | None = None
63
63
self .total_label : tk .Label | None = None
64
64
self .edsm_button : tk .Label | None = None
65
+ self .edsm_failed : tk .Label | None = None
65
66
66
67
# Plugin state data
67
68
self .bodies : dict [str , BodyData ] = {}
@@ -128,6 +129,7 @@ def plugin_app(parent: tk.Frame) -> tk.Frame:
128
129
this .edsm_button = tk .Label (this .frame , text = 'Fetch EDSM Data' , fg = 'white' , cursor = 'hand2' )
129
130
this .edsm_button .grid (row = 3 , columnspan = 2 , sticky = tk .EW )
130
131
this .edsm_button .bind ('<Button-1>' , lambda e : edsm_fetch ())
132
+ this .edsm_failed = tk .Label (this .frame , text = 'No EDSM Data Found' )
131
133
update = version_check ()
132
134
if update != '' :
133
135
text = 'Version {} is now available' .format (update )
@@ -278,6 +280,9 @@ def edsm_data(event: tk.Event) -> None:
278
280
if this .edsm_bodies is None :
279
281
return
280
282
283
+ if len (this .edsm_bodies .get ('bodies' , [])) == 0 :
284
+ this .edsm_failed .grid (row = 3 , columnspan = 2 , sticky = tk .EW )
285
+
281
286
for body in this .edsm_bodies .get ('bodies' , []):
282
287
body_short_name = get_body_name (body ['name' ])
283
288
if body ['type' ] == 'Star' :
@@ -831,6 +836,7 @@ def update_display() -> None:
831
836
this .edsm_button .grid_remove ()
832
837
else :
833
838
this .edsm_button .grid ()
839
+ this .edsm_failed .grid_remove ()
834
840
835
841
bio_bodies = dict (sorted (dict (filter (lambda fitem : fitem [1 ].get_bio_signals () > 0 or len (fitem [1 ].get_flora ()) > 0 , this .bodies .items ())).items (),
836
842
key = lambda item : item [1 ].get_id ()))
0 commit comments