Repository: metatube-community/metatube-sdk-go

Issue:
`Tokyo-Hot` provider info suggestions

### Discussed in https://github.com/metatube-community/jellyfin-plugin-metatube/discussions/484

<div type='discussions-op-text'>

<sup>Originally posted by **bobo-link** April  1, 2025</sup>

![image](https://github.com/user-attachments/assets/10d44b1b-ff8e-4266-977c-138ff426aef5)
![image](https://github.com/user-attachments/assets/84009515-a521-4a71-b9cf-91393f7b90b3)
![image](https://github.com/user-attachments/assets/460aaf64-0c68-4ce9-bcb5-2e3000e727ba)
对比，タグ的内容有更丰富的视频特征标签。可以把タグ的内容也添加到Genres。
![image](https://github.com/user-attachments/assets/a58dc634-be22-45dc-9e54-287371705888)
シリーズ 有视频系列标签，但是info.Series 是string 只取了第一个。有其他可以影响Jellyfin中的标签信息
的数组类型的属性用于存放这些系列信息吗
![image](https://github.com/user-attachments/assets/5bffdabb-cc1e-4b2c-8823-e75c8a108a77)

![image](https://github.com/user-attachments/assets/8e6c1a80-6715-4e89-9294-b6a0052f32ae)
https://github.com/metatube-community/metatube-sdk-go/commit/6d14faa0aa119c646a2cf4a5d2c74cf475de2e81
写了一些完善信息的方向，go语言不太熟悉，请作者大大帮忙修正一下😀


</div>

Hints from issue comments:

Solution patch:
diff --git a/provider/tokyo-hot/tokyo-hot.go b/provider/tokyo-hot/tokyo-hot.go
index 05bf918..4e64edf 100644
--- a/provider/tokyo-hot/tokyo-hot.go
+++ b/provider/tokyo-hot/tokyo-hot.go
@@ -13,6 +13,7 @@ import (
 	"github.com/gocolly/colly/v2"
 	"golang.org/x/net/html"
 
+	"github.com/metatube-community/metatube-sdk-go/collections"
 	"github.com/metatube-community/metatube-sdk-go/common/parser"
 	"github.com/metatube-community/metatube-sdk-go/model"
 	"github.com/metatube-community/metatube-sdk-go/provider"
@@ -158,8 +159,14 @@ func (tht *TokyoHot) GetMovieInfoByURL(rawURL string) (info *model.MovieInfo, er
 					}
 				}
 			case "プレイ内容":
-				parser.ParseTexts(htmlquery.FindOne(e.DOM.(*html.Node), dd),
-					(*[]string)(&info.Genres))
+				var genres []string
+				parser.ParseTexts(htmlquery.FindOne(e.DOM.(*html.Node), dd), &genres)
+				info.Genres = append(info.Genres, genres...)
+			case "タグ":
+				// Additional Genres info
+				var genres []string
+				parser.ParseTexts(htmlquery.FindOne(e.DOM.(*html.Node), dd), &genres)
+				info.Genres = append(info.Genres, genres...)
 			case "シリーズ":
 				info.Series = e.ChildText(dda)
 			case "レーベル":
@@ -174,6 +181,15 @@ func (tht *TokyoHot) GetMovieInfoByURL(rawURL string) (info *model.MovieInfo, er
 		}
 	})
 
+	// Deduplicate Genres
+	c.OnScraped(func(_ *colly.Response) {
+		genres := collections.NewOrderedSet(func(v string) string { return v })
+		for _, genre := range info.Genres {
+			genres.Add(genre)
+		}
+		info.Genres = genres.Slice()
+	})
+
 	// Fallbacks
 	c.OnScraped(func(_ *colly.Response) {
 		switch {



Test patch:
diff --git a/provider/tokyo-hot/tokyo-hot_test.go b/provider/tokyo-hot/tokyo-hot_test.go
index a92ce24..4d1f38e 100644
--- a/provider/tokyo-hot/tokyo-hot_test.go
+++ b/provider/tokyo-hot/tokyo-hot_test.go
@@ -11,6 +11,7 @@ func TestTokyoHot_GetMovieInfoByID(t *testing.T) {
 		"s2mbd-002",
 		"n1633",
 		"n1624",
+		"5656",
 		"kb1624",
 	})
 }