diff --git a/config-example.yaml b/config-example.yaml index b2f66969e..eec9c15c8 100644 --- a/config-example.yaml +++ b/config-example.yaml @@ -5,9 +5,7 @@ instanceDetails: title: Owncast summary: "This is brief summary of whom you are or what your stream is. You can read more about it at owncast.online. You can edit this description in your config file." - logo: - small: /img/logo.svg - large: /img/logo.svg + logo: /img/logo.svg tags: - music diff --git a/config/config.go b/config/config.go index f9d30d119..8d4abbc19 100644 --- a/config/config.go +++ b/config/config.go @@ -32,10 +32,11 @@ type config struct { // InstanceDetails defines the user-visible information about this particular instance. type InstanceDetails struct { - Name string `yaml:"name" json:"name"` - Title string `yaml:"title" json:"title"` - Summary string `yaml:"summary" json:"summary"` - Logo logo `yaml:"logo" json:"logo"` + Name string `yaml:"name" json:"name"` + Title string `yaml:"title" json:"title"` + Summary string `yaml:"summary" json:"summary"` + // Logo logo `yaml:"logo" json:"logo"` + Logo string `yaml:"logo" json:"logo"` Tags []string `yaml:"tags" json:"tags"` SocialHandles []socialHandle `yaml:"socialHandles" json:"socialHandles"` Version string `json:"version"` @@ -43,10 +44,10 @@ type InstanceDetails struct { ExtraPageContent string `json:"extraPageContent"` } -type logo struct { - Large string `yaml:"large" json:"large"` - Small string `yaml:"small" json:"small"` -} +// type logo struct { +// Large string `yaml:"large" json:"large"` +// Small string `yaml:"small" json:"small"` +// } type socialHandle struct { Platform string `yaml:"platform" json:"platform"` diff --git a/controllers/index.go b/controllers/index.go index ff33204d9..e340bc6c1 100644 --- a/controllers/index.go +++ b/controllers/index.go @@ -62,7 +62,7 @@ func handleScraperMetadataPage(w http.ResponseWriter, r *http.Request) { if err != nil { log.Panicln(err) } - imageURL, err := url.Parse(fmt.Sprintf("http://%s%s", r.Host, config.Config.InstanceDetails.Logo.Large)) + imageURL, err := url.Parse(fmt.Sprintf("http://%s%s", r.Host, config.Config.InstanceDetails.Logo)) if err != nil { log.Panicln(err) } diff --git a/core/core.go b/core/core.go index 9be362999..39636902d 100644 --- a/core/core.go +++ b/core/core.go @@ -99,7 +99,7 @@ func transitionToOfflineVideoStreamContent() { _transcoder.Start() // Copy the logo to be the thumbnail - err := utils.Copy(filepath.Join("webroot", config.Config.InstanceDetails.Logo.Large), "webroot/thumbnail.jpg") + err := utils.Copy(filepath.Join("webroot", config.Config.InstanceDetails.Logo), "webroot/thumbnail.jpg") if err != nil { log.Warnln(err) } @@ -153,7 +153,7 @@ func resetDirectories() { } // Remove the previous thumbnail - err = utils.Copy(path.Join(config.WebRoot, config.Config.InstanceDetails.Logo.Large), "webroot/thumbnail.jpg") + err = utils.Copy(path.Join(config.WebRoot, config.Config.InstanceDetails.Logo), "webroot/thumbnail.jpg") if err != nil { log.Warnln(err) } diff --git a/doc/api/index.html b/doc/api/index.html index 3a8a71390..2dab7b6c6 100644 --- a/doc/api/index.html +++ b/doc/api/index.html @@ -558,13 +558,13 @@ data-styled.g140[id="sc-aKZfe"]{content:"jLbdqt,"}/*!sc*/
{- "key": "string"
}
{- "success": true,
- "message": "changed"
}
Change the extra page content in memory, but not on disk.
content | string |
{- "content": "string"
}
{- "success": true,
- "message": "changed"
}
Get the current configuration of the Owncast server.
-{- "instanceDetails": {
- "name": "string",
- "title": "string",
- "summary": "string",
- "logo": {
- "large": "string",
- "small": "string"
}, - "tags": [
- "string"
], - "extraPageContent": "<p>This page is <strong>super</strong> cool!",
- "version": "Owncast v0.0.3-macOS (ef3796a033b32a312ebf5b334851cbf9959e7ecb)"
}, - "ffmpegPath": "string",
- "webServerPort": 0,
- "s3": {
- "enabled": true,
- "endpoint": "string",
- "servingEndpoint": "string",
- "accessKey": "string",
- "secret": "string",
- "bucket": "string",
- "region": "string",
- "acl": "string"
}, - "videoSettings": {
- "videoQualityVariants": [
- {
- "videoPassthrough": true,
- "audioPassthrough": true,
- "videoBitrate": 0,
- "audioBitrate": 0,
- "scaledWidth": 0,
- "scaledHeight": 0,
- "framerate": 0,
- "encoderPreset": "string"
}
], - "segmentLengthSeconds": 0,
- "numberOfPlaylistItems": 0
}, - "yp": {
- "enabled": false,
- "instanceUrl": "string"
}
}
Get the tracked viewer count over the collected period.
+{- "instanceDetails": {
- "name": "string",
- "title": "string",
- "summary": "string",
- "logo": "string",
- "tags": [
- "string"
], - "extraPageContent": "<p>This page is <strong>super</strong> cool!",
- "version": "Owncast v0.0.3-macOS (ef3796a033b32a312ebf5b334851cbf9959e7ecb)"
}, - "ffmpegPath": "string",
- "webServerPort": 0,
- "s3": {
- "enabled": true,
- "endpoint": "string",
- "servingEndpoint": "string",
- "accessKey": "string",
- "secret": "string",
- "bucket": "string",
- "region": "string",
- "acl": "string"
}, - "videoSettings": {
- "videoQualityVariants": [
- {
- "videoPassthrough": true,
- "audioPassthrough": true,
- "videoBitrate": 0,
- "audioBitrate": 0,
- "scaledWidth": 0,
- "scaledHeight": 0,
- "framerate": 0,
- "encoderPreset": "string"
}
], - "segmentLengthSeconds": 0,
- "numberOfPlaylistItems": 0
}, - "yp": {
- "enabled": false,
- "instanceUrl": "string"
}
}
Get the CPU, Memory and Disk utilization levels over the collected period.
{- "cpu": [
- {
- "time": "2020-10-03T21:41:00.381996-05:00",
- "value": 23
}, - {
- "time": "2020-10-03T21:42:00.381996-05:00",
- "value": 27
}, - {
- "time": "2020-10-03T21:43:00.381996-05:00",
- "value": 22
}
], - "memory": [
- {
- "time": "2020-10-03T21:41:00.381996-05:00",
- "value": 65
}, - {
- "time": "2020-10-03T21:42:00.381996-05:00",
- "value": 66
}, - {
- "time": "2020-10-03T21:43:00.381996-05:00",
- "value": 72
}
], - "disk": [
- {
- "time": "2020-10-03T21:41:00.381996-05:00",
- "value": 11
}, - {
- "time": "2020-10-03T21:42:00.381996-05:00",
- "value": 11
}, - {
- "time": "2020-10-03T21:43:00.381996-05:00",
- "value": 11
}
]
}
{- "name": "string",
- "title": "string",
- "summary": "string",
- "logo": {
- "large": "string",
- "small": "string"
}, - "tags": [
- "string"
], - "extraPageContent": "<p>This page is <strong>super</strong> cool!",
- "version": "Owncast v0.0.3-macOS (ef3796a033b32a312ebf5b334851cbf9959e7ecb)"
}
This endpoint is used to discover when a server is broadcasting, the number of active viewers as well as other useful information for updating the user interface.
+{- "name": "string",
- "title": "string",
- "summary": "string",
- "logo": "string",
- "tags": [
- "string"
], - "extraPageContent": "<p>This page is <strong>super</strong> cool!",
- "version": "Owncast v0.0.3-macOS (ef3796a033b32a312ebf5b334851cbf9959e7ecb)"
}
This endpoint is used to discover when a server is broadcasting, the number of active viewers as well as other useful information for updating the user interface.
{- "lastConnectTime": "2020-10-03T21:36:22-05:00",
- "lastDisconnectTime": null,
- "online": true,
- "overallMaxViewerCount": 420,
- "sessionMaxViewerCount": 12,
- "viewerCount": 7
}
Information to be used in the Yellow Pages service, a global directory of Owncast servers.
{- "name": "string",
- "description": "string",
- "logo": "string",
- "nsfw": true,
- "tags": [
- "string"
], - "online": true,
- "viewerCount": 0,
- "overallMaxViewerCount": 0,
- "sessionMaxViewerCount": 0,
- "lastConnectTime": "2019-08-24T14:15:22Z"
}
Change the stream key in memory, but not in the config file. This will require all broadcasters to be reconfigured to connect again.
key | string |
content | string |
{- "content": "string"
}
{- "success": true,
- "message": "changed"
}