Skip to main content
POST
/
downloadQueue
/
{queueId}
/
add
PlexGO
package main

import(
	"context"
	"github.com/LukeHagar/plexgo/models/components"
	"github.com/LukeHagar/plexgo"
	"github.com/LukeHagar/plexgo/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := plexgo.New(
        plexgo.WithAccepts(components.AcceptsApplicationXML),
        plexgo.WithClientIdentifier("abc123"),
        plexgo.WithProduct("Plex for Roku"),
        plexgo.WithVersion("2.4.1"),
        plexgo.WithPlatform("Roku"),
        plexgo.WithPlatformVersion("4.3 build 1057"),
        plexgo.WithDevice("Roku 3"),
        plexgo.WithModel("4200X"),
        plexgo.WithDeviceVendor("Roku"),
        plexgo.WithDeviceName("Living Room TV"),
        plexgo.WithMarketplace("googlePlay"),
        plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    res, err := s.DownloadQueue.AddDownloadQueueItems(ctx, operations.AddDownloadQueueItemsRequest{
        QueueID: 984925,
        Keys: []string{
            "/library/metadata/3",
            "/library/metadata/6",
        },
        AdvancedSubtitles: components.AdvancedSubtitlesBurn.ToPointer(),
        AudioBoost: plexgo.Pointer[int64](50),
        AudioChannelCount: plexgo.Pointer[int64](5),
        AutoAdjustQuality: components.BoolIntOne.ToPointer(),
        AutoAdjustSubtitle: components.BoolIntOne.ToPointer(),
        DirectPlay: components.BoolIntOne.ToPointer(),
        DirectStream: components.BoolIntOne.ToPointer(),
        DirectStreamAudio: components.BoolIntOne.ToPointer(),
        DisableResolutionRotation: components.BoolIntOne.ToPointer(),
        HasMDE: components.BoolIntOne.ToPointer(),
        Location: components.LocationWan.ToPointer(),
        MediaBufferSize: plexgo.Pointer[int64](102400),
        MediaIndex: plexgo.Pointer[int64](0),
        MusicBitrate: plexgo.Pointer[int64](5000),
        Offset: plexgo.Pointer[float64](90.5),
        PartIndex: plexgo.Pointer[int64](0),
        Path: plexgo.Pointer("/library/metadata/151671"),
        PeakBitrate: plexgo.Pointer[int64](12000),
        PhotoResolution: plexgo.Pointer("1080x1080"),
        Protocol: components.ProtocolDash.ToPointer(),
        SecondsPerSegment: plexgo.Pointer[int64](5),
        SubtitleSize: plexgo.Pointer[int64](50),
        VideoBitrate: plexgo.Pointer[int64](12000),
        VideoQuality: plexgo.Pointer[int64](50),
        VideoResolution: plexgo.Pointer("1080x1080"),
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
{
  "MediaContainer": {
    "identifier": "<string>",
    "offset": 123,
    "size": 123,
    "totalSize": 123,
    "AddedQueueItems": [
      {
        "id": 123,
        "key": "<string>"
      }
    ]
  }
}

Authorizations

X-Plex-Token
string
header
required

Headers

accepts
enum<string>
default:application/xml
Available options:
application/json,
application/xml
X-Plex-Client-Identifier
string
required
Example:
X-Plex-Product
string
Example:
X-Plex-Version
string
Example:
X-Plex-Platform
string
Example:
X-Plex-Platform-Version
string
Example:
X-Plex-Device
string
Example:
X-Plex-Model
string
Example:
X-Plex-Device-Vendor
string
Example:
X-Plex-Device-Name
string
Example:
X-Plex-Marketplace
string
Example:

Path Parameters

queueId
integer
required

Query Parameters

keys
string[]
required
advancedSubtitles
enum<string>
Available options:
burn,
text,
unknown
audioBoost
integer
Required range: x >= 1
audioChannelCount
integer
Required range: 1 <= x <= 8
autoAdjustQuality
enum<integer>
Available options:
0,
1
autoAdjustSubtitle
enum<integer>
Available options:
0,
1
directPlay
enum<integer>
Available options:
0,
1
directStream
enum<integer>
Available options:
0,
1
directStreamAudio
enum<integer>
Available options:
0,
1
disableResolutionRotation
enum<integer>
Available options:
0,
1
hasMDE
enum<integer>
Available options:
0,
1
location
enum<string>
Available options:
lan,
wan,
cellular
mediaBufferSize
integer
mediaIndex
integer
musicBitrate
integer
Required range: x >= 0
offset
number
partIndex
integer
path
string
peakBitrate
integer
Required range: x >= 0
photoResolution
string
protocol
enum<string>
Available options:
http,
hls,
dash
secondsPerSegment
integer
subtitleSize
integer
Required range: x >= 1
subtitles
enum<string>
Available options:
auto,
burn,
none,
sidecar,
embedded,
segmented,
unknown
videoBitrate
integer
Required range: x >= 0
videoQuality
integer
Required range: 0 <= x <= 99
videoResolution
string

Response

200 - application/json
MediaContainer
object