0.2.67 - Detail pages improvements
This commit is contained in:
@@ -335,6 +335,25 @@ func (c *Client) LocalTrailers(ctx context.Context, cred Credentials, itemID str
|
||||
return &ItemsResult{Items: items, TotalRecordCount: len(items)}, nil
|
||||
}
|
||||
|
||||
// SpecialFeatures returns the featurettes, deleted scenes and interviews Emby holds beside
|
||||
// an item's media file.
|
||||
//
|
||||
// Deliberately separate from [Client.LocalTrailers]: Emby keeps trailers out of this list
|
||||
// entirely, so the Extras tab is the join of the two and neither endpoint can answer for the
|
||||
// other. Like LocalTrailers it answers with a bare array rather than an Items envelope.
|
||||
func (c *Client) SpecialFeatures(ctx context.Context, cred Credentials, itemID string) (*ItemsResult, error) {
|
||||
path := "/Users/" + url.PathEscape(cred.UserID) + "/Items/" + url.PathEscape(itemID) + "/SpecialFeatures"
|
||||
req, err := c.newRequest(ctx, http.MethodGet, path, nil, cred, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var items []json.RawMessage
|
||||
if err := c.do(req, &items); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ItemsResult{Items: items, TotalRecordCount: len(items)}, nil
|
||||
}
|
||||
|
||||
func (c *Client) Item(ctx context.Context, cred Credentials, itemID, fields string) (json.RawMessage, error) {
|
||||
params := url.Values{}
|
||||
if fields != "" {
|
||||
|
||||
Reference in New Issue
Block a user