-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
259 lines (243 loc) · 9.11 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
/*
* Copyright (C) 2023 l4rzy
* MIT License
*/
package csn
type MusicBase struct {
MusicTitleURL string `json:"music_title_url"`
MusicID string `json:"music_id"`
CatID string `json:"cat_id"`
MusicTitle string `json:"music_title"`
MusicArtist string `json:"music_artist"`
}
type MusicHot struct {
MusicBase
CatLevel string `json:"cat_level"`
CoverID string `json:"cover_id"`
MusicDownloads string `json:"music_downloads"`
MusicBitrate string `json:"music_bitrate"`
MusicLength string `json:"music_length"`
MusicThumbsTime string `json:"music_thumbs_time"`
CoverImg string `json:"cover_img"`
}
// new search api that bases on the
// new site's xhr
type MusicSearchNew struct {
MusicDownloads int `json:"music_downloads"`
MusicID int `json:"music_id"`
MusicTitle string `json:"music_title"`
MusicArtist string `json:"music_artist"`
MusicBitrate int `json:"music_bitrate"`
MusicBitrateHTML string `json:"music_bitrate_html"`
MusicLink string `json:"music_link"`
CatID int `json:"cat_id"`
MusicListen int `json:"music_listen"`
MusicFilename string `json:"music_filename"`
MusicCover string `json:"music_cover"`
MusicTitleURL string `json:"music_title_url"`
}
type MusicSearch struct {
MusicBase
ID int `json:"id"`
Thumbnail string `json:"thumbnail"`
Preview string `json:"preview"`
CatLevel string `json:"cat_level"`
MusicComposer string `json:"music_composer"`
MusicAlbum string `json:"music_album"`
MusicYear string `json:"music_year"`
MusicDownloads string `json:"music_downloads"`
MusicBitrate string `json:"music_bitrate"`
MusicLength string `json:"music_length"`
MusicWidth string `json:"music_width"`
MusicHeight string `json:"music_height"`
CoverImg string `json:"cover_img"`
}
type MusicAlbum struct {
MusicBase
CatLevel string `json:"cat_level"`
CatCustom string `json:"cat_custom"`
MusicTrackID string `json:"music_track_id"`
MusicShortlyric string `json:"music_shortlyric"`
MusicLength string `json:"music_length"`
}
type MusicInfo struct {
MusicBase
CatLevel string `json:"cat_level"`
CatSublevel string `json:"cat_sublevel"`
CoverID string `json:"cover_id"`
MusicComposer string `json:"music_composer"`
MusicAlbum string `json:"music_album"`
MusicProduction string `json:"music_production"`
MusicAlbumID string `json:"music_album_id"`
MusicYear string `json:"music_year"`
MusicListen string `json:"music_listen"`
MusicDownloads string `json:"music_downloads"`
MusicTime string `json:"music_time"`
MusicBitrate string `json:"music_bitrate"`
MusicLength string `json:"music_length"`
Music32Filesize string `json:"music_32_filesize"`
MusicFilesize string `json:"music_filesize"`
Music320Filesize string `json:"music_320_filesize"`
MusicM4AFilesize string `json:"music_m4a_filesize"`
MusicLosslessFilesize string `json:"music_lossless_filesize"`
MusicWidth string `json:"music_width"`
MusicHeight string `json:"music_height"`
MusicUsername string `json:"music_username"`
MusicLyric string `json:"music_lyric"`
MusicImgHeight string `json:"music_img_height"`
MusicImgWidth string `json:"music_img_width"`
MusicImg string `json:"music_img"`
VideoThumbnail string `json:"video_thumbnail"`
VideoPreview string `json:"video_preview"`
FileURL string `json:"file_url"`
File32URL string `json:"file_32_url"`
File320URL string `json:"file_320_url"`
FileM4AURL string `json:"file_m4a_url"`
FileLosslessURL string `json:"file_lossless_url"`
FullURL string `json:"full_url"`
MusicGenre string `json:"music_genre"`
}
type VideoSearch struct {
VideoID int `json:"video_id"`
VideoTitle string `json:"video_title"`
VideoArtist string `json:"video_artist"`
VideoBitrate int `json:"video_bitrate"`
VideoLink string `json:"video_link"`
VideoCover string `json:"video_cover"`
VideoListen interface{} `json:"video_listen"`
VideoLength int `json:"video_length"`
VideoLengthHTML string `json:"video_length_html"`
VideoDownloads int `json:"video_downloads"`
VideoTitleURL string `json:"video_title_url"`
}
type ArtistSearch struct {
ArtistID int `json:"artist_id"`
ArtistNickname string `json:"artist_nickname"`
ArtistLink string `json:"artist_link"`
ArtistCover string `json:"artist_cover"`
ArtistAvatar string `json:"artist_avatar"`
}
type AlbumSearch struct {
CoverID int `json:"cover_id"`
MusicAlbum string `json:"music_album"`
AlbumLink string `json:"album_link"`
AlbumID string `json:"album_id"`
AlbumBitrate interface{} `json:"album_bitrate"`
AlbumArtist string `json:"album_artist"`
AlbumArtistHTML string `json:"album_artist_html"`
AlbumCover string `json:"album_cover"`
}
type CSNSearchResp struct {
MusicList []MusicSearch `json:"music_list"`
}
type CSNSearchNewResp []struct {
Q string `json:"q"`
Music struct {
Data []MusicSearchNew `json:"data"`
Rows int `json:"rows"`
Page int `json:"page"`
RowTotal int `json:"row_total"`
} `json:"music"`
MusicPlayback struct {
Data []interface{} `json:"data"`
Rows int `json:"rows"`
Page int `json:"page"`
RowTotal int `json:"row_total"`
} `json:"music_playback"`
Video struct {
Data []VideoSearch `json:"data"`
Rows int `json:"rows"`
Page int `json:"page"`
RowTotal int `json:"row_total"`
} `json:"video"`
Artist struct {
Data []ArtistSearch `json:"data"`
Rows int `json:"rows"`
Page int `json:"page"`
RowTotal int `json:"row_total"`
} `json:"artist"`
Album struct {
Data []AlbumSearch `json:"data"`
Rows int `json:"rows"`
Page int `json:"page"`
RowTotal int `json:"row_total"`
} `json:"album"`
}
type MusicInfoResp struct {
MusicInfo MusicInfo `json:"music_info"`
TrackList []MusicAlbum `json:"track_list"`
Related struct {
MusicTotal int `json:"music_total"`
MusicList []struct {
MusicID string `json:"music_id"`
CatID string `json:"cat_id"`
CatLevel string `json:"cat_level"`
MusicTitleURL string `json:"music_title_url"`
MusicTitle string `json:"music_title"`
MusicArtist string `json:"music_artist"`
MusicBitrate string `json:"music_bitrate"`
MusicLength string `json:"music_length"`
MusicWidth string `json:"music_width"`
MusicHeight string `json:"music_height"`
MusicThumbsTime string `json:"music_thumbs_time"`
MusicDownloads string `json:"music_downloads"`
ThumbnailURL string `json:"thumbnail_url"`
} `json:"music_list"`
} `json:"related"`
Recent struct {
MusicTotal int `json:"music_total"`
MusicList []struct {
MusicID string `json:"music_id"`
CatID string `json:"cat_id"`
CatLevel string `json:"cat_level"`
CoverID string `json:"cover_id"`
MusicTitleURL string `json:"music_title_url"`
MusicTitle string `json:"music_title"`
MusicArtist string `json:"music_artist"`
MusicDownloads string `json:"music_downloads"`
MusicListen string `json:"music_listen"`
MusicBitrate string `json:"music_bitrate"`
MusicWidth string `json:"music_width"`
MusicHeight string `json:"music_height"`
MusicLength string `json:"music_length"`
MusicDownloadsToday string `json:"music_downloads_today"`
MusicThumbsTime string `json:"music_thumbs_time"`
MusicDeleted string `json:"music_deleted"`
ThumbnailURL string `json:"thumbnail_url"`
} `json:"music_list"`
} `json:"recent"`
Artist struct {
MusicTotal int `json:"music_total"`
MusicList []struct {
MusicID string `json:"music_id"`
CatID string `json:"cat_id"`
CatLevel string `json:"cat_level"`
MusicTitleURL string `json:"music_title_url"`
MusicTitle string `json:"music_title"`
MusicArtist string `json:"music_artist"`
MusicBitrate string `json:"music_bitrate"`
MusicLength string `json:"music_length"`
MusicWidth string `json:"music_width"`
MusicHeight string `json:"music_height"`
MusicThumbsTime string `json:"music_thumbs_time"`
MusicDownloads string `json:"music_downloads"`
ThumbnailURL string `json:"thumbnail_url"`
} `json:"music_list"`
} `json:"artist"`
}
type DlAble struct {
Link map[string]string
}
type UrlInfo struct {
Url string
Kind int
Category string
UrlName string
}
// interface
type ObjectSearch interface {
Print()
GetLink() string
GetID() interface{}
GetInfo() (MusicInfo, error)
}