-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.go
62 lines (53 loc) · 1.63 KB
/
release.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
package types
import "time"
type Releases struct {
TotalCount int `json:"total_count"`
Pagination Pagination `json:"pagination"`
List []Release `json:"list"`
}
type Release struct {
ID string `json:"id"`
Dirname string `json:"dirname"`
LinkURL string `json:"link_href"`
TimeUnix int64 `json:"time"`
GroupName string `json:"group_name"`
NukeReason string `json:"nuke_reason"`
Size Size `json:"size"`
VideoType string `json:"video_type"`
AudioType string `json:"audio_type"`
NumRatings int `json:"num_ratings"`
VideoRating float32 `json:"video_rating"`
AudioRating float32 `json:"audio_rating"`
ExtInfo ShortExtInfo `json:"ext_info"`
TVSeason int `json:"tv_season"`
TVEpisode int `json:"tv_episode"`
Comments int `json:"comments"`
Flags Flags `json:"flags"`
ProofURL string `json:"proof_url"`
}
func (release *Release) GetTime() time.Time {
return time.Unix(release.TimeUnix, 0)
}
type Size struct {
Number int `json:"number"`
Unit string `json:"unit"`
}
// http://www.xrel.to/comments/wiki/1680.html#cpost311058
type Flags struct {
HasReadNFO bool `json:"read_nfo"`
IsFixRLS bool `json:"fix_rls"`
IsTopRLS bool `json:"top_rls"`
IsEnglish bool `json:"english"`
}
type Category struct {
Name string `json:"name"`
ParentCat string `json:"parent_cat"`
}
type Filter struct {
ID int `json:"id"`
Name string `json:"name"`
}
type AddProofResult struct {
ProofURL string `json:"proof_url"`
ReleaseIDs []string `json:"releases"`
}