From 255023702e0bf0004698b07336ab62c201b69e23 Mon Sep 17 00:00:00 2001 From: Will Date: Thu, 27 Aug 2026 23:02:51 +0800 Subject: [PATCH] update --- pkg/service/bmx/tunein.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkg/service/bmx/tunein.go b/pkg/service/bmx/tunein.go index 5e41f3c7..234f1748 100644 --- a/pkg/service/bmx/tunein.go +++ b/pkg/service/bmx/tunein.go @@ -210,9 +210,10 @@ func tuneInSectionsAshx(tuneInURI string, subsection *int) ([]models.BmxNavSecti continue } + itemType, _ := m["type"].(string) + if children, ok := m["children"].([]interface{}); ok && len(children) > 0 { name, _ := m["text"].(string) - section := models.BmxNavSection{ Name: name, Items: make([]models.BmxNavItem, 0, len(children)), @@ -222,7 +223,6 @@ func tuneInSectionsAshx(tuneInURI string, subsection *int) ([]models.BmxNavSecti if !ok { continue } - childType, _ := cm["type"].(string) if childType == "audio" { section.Items = append(section.Items, tuneInNavigatePlayItem(cm)) @@ -230,10 +230,17 @@ func tuneInSectionsAshx(tuneInURI string, subsection *int) ([]models.BmxNavSecti section.Items = append(section.Items, tuneInNavigateLink(cm)) } } - sections = append(sections, section) - } else { + continue + } + + switch itemType { + case "link": topItems = append(topItems, tuneInNavigateLink(m)) + case "audio": + topItems = append(topItems, tuneInNavigatePlayItem(m)) + case "text": + // ignore } }