Documentation ¶
Index ¶
- func Bint(b bool) int
- func NullableBInt(b *bool) *int
- func NullableString(s *string) string
- type Artist
- type Artists
- type Group
- type Torrent
- func NewArtist(tracker Tracker, a whatapi.Artist) (torrents []Torrent, err error)
- func NewGetTorrentStruct(tracker Tracker, tr whatapi.GetTorrentStruct) (Torrent, error)
- func NewSearchTorrentStruct(g Group, rt whatapi.SearchTorrentStruct) (Torrent, error)
- func NewTopTenTorrents(tracker Tracker, tt whatapi.TopTenTorrents) ([]Torrent, error)
- func NewTorrentGroup(tracker Tracker, tg whatapi.TorrentGroup) ([]Torrent, error)
- func NewTorrentSearch(tracker Tracker, ts whatapi.TorrentSearch) ([]Torrent, error)
- func NewTorrentStruct(g Group, t whatapi.TorrentStruct) (Torrent, error)
- func (t *Torrent) Fill(tx *sqlx.Tx) error
- func (t *Torrent) GetArtists(db *sqlx.DB) error
- func (t *Torrent) GetFiles(db *sqlx.DB) error
- func (t Torrent) ShortName() string
- func (t *Torrent) String() string
- func (t Torrent) Update(tx *sqlx.Tx) error
- func (t Torrent) UpdateCross(tx *sqlx.Tx, dst Torrent) error
- func (t Torrent) UpdateFiles(tx *sqlx.Tx) error
- type Tracker
- func (t Tracker) GetArtist(id int) ([]Torrent, error)
- func (t Tracker) GetArtistByName(n string) ([]Torrent, error)
- func (t Tracker) GetGroup(id int) ([]Torrent, error)
- func (t Tracker) GetGroupByHash(h string) ([]Torrent, error)
- func (t Tracker) GetTorrent(id int) (Torrent, error)
- func (t Tracker) GetTorrentByHash(h string) (Torrent, error)
- func (t Tracker) Search(params url.Values) ([]Torrent, error)
- func (t Tracker) Top10(params url.Values) ([]Torrent, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NullableBInt ¶
func NullableString ¶
Types ¶
type Artists ¶
Artists is a tracker and a set of artists and their roles usually associated with a group
func NewExtendedArtistMap ¶
func NewExtendedArtistMap(tracker Tracker, am whatapi.ExtendedArtistMap) Artists
NewExtendedArtistMap creates Artists from a tracker and a whatapi.ExtendedArtistMap
func NewMusicInfo ¶
NewMusicInfo creates Artists from a tracker and whatapi.MusicInfo struct
func (Artists) DisplayName ¶
Display name for artists is the human readable string formatting of the artists, intended to replicate the internal gazelle logic for formatting artist names
type Group ¶
type Group struct { Artists ID int `db:"groupid"` Name string `db:"groupname"` Year int `db:"year"` RecordLabel *string `db:"recordlabel"` CatalogueNumber *string `db:"cataloguenumber"` ReleaseTypeF int `db:"releasetype"` CategoryID *int `db:"categoryid"` CategoryName *string `db:"categoryname"` Time *time.Time `db:"time"` VanityHouse bool `db:"vanityhouse"` WikiImage *string `db:"wikiimage"` WikiBody *string `db:"wikibody"` IsBookmarked *bool `db:"isbookmarked"` Tags string `db:"tags"` }
func NewGroupSearchResult ¶
func NewGroupSearchResult(tracker Tracker, srs whatapi.TorrentSearchResultStruct) (Group, error)
func NewGroupStruct ¶
func NewGroupStruct(tracker Tracker, gs whatapi.GroupStruct) (g Group, err error)
func (Group) ReleaseType ¶
type Torrent ¶
type Torrent struct { Group ID int `db:"id"` Hash *string `db:"hash"` Media string `db:"media"` Format string `db:"format"` Encoding string `db:"encoding"` Remastered bool `db:"remastered"` RemasterYear int `db:"remasteryear"` RemasterTitle string `db:"remastertitle"` RemasterRecordLabel string `db:"remasterlabel"` RemasterCatalogueNumber *string `db:"cataloguenumber"` Scene bool `db:"scene"` HasLog bool `db:"haslog"` HasCue bool `db:"hascue"` LogScore int `db:"logscore"` LogChecksum *bool `db:"logchecksum"` FileCount int `db:"filecount"` Size int64 `db:"size"` Seeders int `db:"seeders"` Leechers int `db:"leechers"` Snatched int `db:"snatched"` FreeTorrent bool `db:"freetorrent"` Reported *bool `db:"reported"` Time time.Time `db:"time"` Description *string `db:"description"` FilePath *string `db:"filepath"` UserID *int `db:"userid"` Username *string `db:"username"` Files []whatapi.FileStruct CanUseToken *bool `db:"canusetoken"` }
func NewGetTorrentStruct ¶
func NewGetTorrentStruct(tracker Tracker, tr whatapi.GetTorrentStruct) (Torrent, error)
func NewSearchTorrentStruct ¶
func NewSearchTorrentStruct(g Group, rt whatapi.SearchTorrentStruct) (Torrent, error)
func NewTopTenTorrents ¶
func NewTopTenTorrents(tracker Tracker, tt whatapi.TopTenTorrents) ([]Torrent, error)
func NewTorrentGroup ¶
func NewTorrentGroup(tracker Tracker, tg whatapi.TorrentGroup) ([]Torrent, error)
func NewTorrentSearch ¶
func NewTorrentSearch( tracker Tracker, ts whatapi.TorrentSearch) ([]Torrent, error)
func NewTorrentStruct ¶
func NewTorrentStruct(g Group, t whatapi.TorrentStruct) (Torrent, error)
func (*Torrent) GetArtists ¶
GetArtists gets all of the artists for a torrent. Usually used when initially populating a torrent (and should probably just be part of get torrent)
type Tracker ¶
type Tracker struct { whatapi.WhatAPI Name string `db:"tracker"` Other string Path string Host string Conf string ReleaseTypes map[int]string Categories map[int]string TokenSize int64 // torrents bigger than this, try to use a token // contains filtered or unexported fields }
Tracker represents a gazelle tracker and implements the WhatAPI interface
Click to show internal directories.
Click to hide internal directories.