From c15001018301f35edc57d4c5adb376b331c7da65 Mon Sep 17 00:00:00 2001 From: Joey Van Lierop Date: Mon, 14 Jul 2025 21:49:55 -0600 Subject: [PATCH 1/2] Add deprecated RequestiPodName command --- lingo-extremote/extremote.go | 20 +++++++++++++++++++- lingo-extremote/handler.go | 2 ++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/lingo-extremote/extremote.go b/lingo-extremote/extremote.go index 1674c75..c212ea5 100644 --- a/lingo-extremote/extremote.go +++ b/lingo-extremote/extremote.go @@ -30,6 +30,8 @@ var Lingos struct { RetArtworkFormats `id:"0x000F"` GetTrackArtworkData `id:"0x0010"` RetTrackArtworkData `id:"0x0011"` + RequestiPodName `id:"0x0014"` + ReturniPodName `id:"0x0015"` ResetDBSelection `id:"0x0016"` SelectDBRecord `id:"0x0017"` GetNumberCategorizedDBRecords `id:"0x0018"` @@ -249,7 +251,23 @@ type RetTrackArtworkData struct { Data []byte } -//ack +type RequestiPodName struct{} + +type ReturniPodName struct { + Name []byte +} + +func (s ReturniPodName) MarshalBinary() ([]byte, error) { + return s.Name, nil +} + +func (s *ReturniPodName) UnmarshalBinary(data []byte) error { + s.Name = make([]byte, len(data)) + copy(s.Name, data) + return nil +} + +// ack type ResetDBSelection struct { } diff --git a/lingo-extremote/handler.go b/lingo-extremote/handler.go index 1296a82..d36b015 100644 --- a/lingo-extremote/handler.go +++ b/lingo-extremote/handler.go @@ -74,6 +74,8 @@ func HandleExtRemote(req *ipod.Command, tr ipod.CommandWriter, dev DeviceExtRemo Status: ACKStatusFailed, CmdID: req.ID.CmdID(), }) + case *RequestiPodName: + ipod.Respond(req, tr, &ReturniPodName{Name: ipod.StringToBytes("iPod Joey")}) case *ResetDBSelection: ipod.Respond(req, tr, ackSuccess(req)) case *SelectDBRecord: From 85c4493b18abe2e2ef13f480b70d60c4ad0504ea Mon Sep 17 00:00:00 2001 From: Joey Van Lierop Date: Tue, 15 Jul 2025 22:01:08 -0600 Subject: [PATCH 2/2] Change default iPod name to "iPod" --- lingo-extremote/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lingo-extremote/handler.go b/lingo-extremote/handler.go index d36b015..1b002a5 100644 --- a/lingo-extremote/handler.go +++ b/lingo-extremote/handler.go @@ -75,7 +75,7 @@ func HandleExtRemote(req *ipod.Command, tr ipod.CommandWriter, dev DeviceExtRemo CmdID: req.ID.CmdID(), }) case *RequestiPodName: - ipod.Respond(req, tr, &ReturniPodName{Name: ipod.StringToBytes("iPod Joey")}) + ipod.Respond(req, tr, &ReturniPodName{Name: ipod.StringToBytes("iPod")}) case *ResetDBSelection: ipod.Respond(req, tr, ackSuccess(req)) case *SelectDBRecord: