shithub: hell

Download patch

ref: bf8f7853b47eb7ed0119491d516b661bb0263c53
parent: dd1f814b2de4cab4dde76cd9e78c9c6da2f4455d
author: penny <penny@limitedideas.org>
date: Tue Nov 4 09:17:46 EST 2025

and port /play

--- a/commands.go
+++ b/commands.go
@@ -913,6 +913,7 @@
 		hc.publiccmd(),
 		hc.statusurlcmd("open", &hc.preferences.Browser),
 		hc.urlcmd("url", &hc.preferences.Browser),
+		hc.urlcmd("play", &hc.preferences.MediaPlayer),
 	}
 	return cmdarray
 }
--- a/main.go
+++ b/main.go
@@ -3,8 +3,6 @@
 import (
 	"context"
 	"fmt"
-	
-	"strconv"
 	"strings"
 
 	mastodon "codeberg.org/penny64/hellclient-go-mastodon"
@@ -124,28 +122,6 @@
 
 			//Commands require status indexes
 			switch command {
-			case "url":
-				_, indexstr, _ := strings.Cut(arguments, " ")
-				urlindex, _ := strconv.Atoi(indexstr)
-
-				if urlindex > len(hc.homeref.urlmap[index]) {
-					fmt.Printf("Bad url index\n")
-					return
-				}
-				openItemInOS(hc.preferences.Browser, hc.homeref.urlmap[index][urlindex-1])
-				return
-			case "play":
-				_, indexstr, _ := strings.Cut(arguments, " ")
-				urlindex, err := strconv.Atoi(indexstr)
-				if err != nil {
-					urlindex = 1
-				}
-				if urlindex > len(hc.homeref.urlmap[index]) {
-					fmt.Printf("Bad url index\n")
-					return
-				}
-				openItemInOS(hc.preferences.MediaPlayer, hc.homeref.urlmap[index][urlindex-1])
-				return
 			case "view":
 				err := hc.previewPostImages(postItem, hc.preferences.ImageViewer)
 				if err != nil {
--