summary refs log tree commit diff stats
path: root/cmd/cetus-nasa/cetus-nasa.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/cetus-nasa/cetus-nasa.go')
-rw-r--r--cmd/cetus-nasa/cetus-nasa.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/cetus-nasa/cetus-nasa.go b/cmd/cetus-nasa/cetus-nasa.go
index d90a08b..5f018cb 100644
--- a/cmd/cetus-nasa/cetus-nasa.go
+++ b/cmd/cetus-nasa/cetus-nasa.go
@@ -119,6 +119,10 @@ func printDetails(apodRes nasa.APOD) {
 	fmt.Printf("Copyright: %s\n", apodRes.Copyright)
 	fmt.Printf("Date: %s\n\n", apodRes.Date)
 	fmt.Printf("Media Type: %s\n", apodRes.MediaType)
-	fmt.Printf("URL: %s\n\n", apodRes.HDURL)
+	if apodRes.MediaType == "image" {
+		fmt.Printf("URL: %s\n\n", apodRes.HDURL)
+	} else {
+		fmt.Printf("URL: %s\n\n", apodRes.HDURL)
+	}
 	fmt.Printf("Explanation: %s\n", apodRes.Explanation)
 }