Sfoglia il codice sorgente

menu: do only show http uploader's port if it isn't 80

Felix Paul Kühne 12 anni fa
parent
commit
92e6ef0843
1 ha cambiato i file con 6 aggiunte e 3 eliminazioni
  1. 6 3
      AspenProject/VLCMenuTableViewController.m

+ 6 - 3
AspenProject/VLCMenuTableViewController.m

@@ -225,9 +225,12 @@
 - (void)updateHTTPServerAddress
 {
     HTTPServer *server = self.uploadController.httpServer;
-    if (server.isRunning)
-        _uploadLocationLabel.text = [NSString stringWithFormat:@"http://%@:%i", [self.uploadController currentIPAddress], server.listeningPort];
-    else
+    if (server.isRunning) {
+        if (server.listeningPort != 80)
+            _uploadLocationLabel.text = [NSString stringWithFormat:@"http://%@:%i", [self.uploadController currentIPAddress], server.listeningPort];
+        else
+            _uploadLocationLabel.text = [NSString stringWithFormat:@"http://%@", [self.uploadController currentIPAddress]];
+    } else
         _uploadLocationLabel.text = NSLocalizedString(@"HTTP_UPLOAD_SERVER_OFF", @"");
 }