@@ -57,12 +57,6 @@ def show_dialog(headline, choices, stop=False):
57
57
58
58
pull_server_data ()
59
59
60
- features = {
61
- 1 : "Secure-Core" ,
62
- 2 : "Tor" ,
63
- 4 : "P2P" ,
64
- 8 : "Streaming" ,
65
- }
66
60
server_tiers = {0 : "F" , 1 : "B" , 2 : "P" }
67
61
68
62
servers = get_servers ()
@@ -106,21 +100,17 @@ def show_dialog(headline, choices, stop=False):
106
100
get_server_value (servername , "Load" , servers )
107
101
).rjust (3 , " " )
108
102
109
- servers_features = []
110
- feat = int (get_server_value (servername , 'Features' , servers ))
111
- for bit_flag in features :
112
- if (feat & bit_flag ) != 0 :
113
- servers_features .append (features [bit_flag ])
103
+ server_features = get_server_features (servername , servers )
114
104
115
- if len (servers_features ) == 0 :
116
- servers_features .append ("Normal" )
105
+ if len (server_features ) == 0 :
106
+ server_features .append ("Normal" )
117
107
118
108
tier = server_tiers [
119
109
get_server_value (servername , "Tier" , servers )
120
110
]
121
111
122
112
choices .append ((servername , "Load: {0}% | {1} | {2}" .format (
123
- load , tier , ", " .join (servers_features )
113
+ load , tier , ", " .join (server_features )
124
114
)))
125
115
126
116
server_result = show_dialog ("Choose the server to connect:" , choices )
0 commit comments