Move around how SocialHandles are configured. Closes #30

This commit is contained in:
Gabe Kangas 2020-06-30 17:11:24 -07:00
parent b4c9654dac
commit 85cec76445
2 changed files with 17 additions and 7 deletions

View file

@ -6,7 +6,7 @@ webServerPort: 8080
instanceDetails:
name: Owncast
title: Owncast Demo Server
summary: "This is brief summary of whom you are or what your stream is. demo server for Owncast. You can read more about it at owncast.online. You can edit this description in your web config file.\n\nBlathers is an owl with brown feathers. His face is white and he has a yellow beak. His arms are wing shaped and he has yellow talons. His eyes are very big with small black irises. He also has big pink cheek circles on his cheeks. His belly appears to be checkered in diamonds with light brown and white squares, similar to an argyle vest, which is traditionally associated with academia. His green bowtie further alludes to his academic nature."
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."
extraUserInfoFileName: "/static/content.md"
logo:
@ -20,11 +20,16 @@ instanceDetails:
# See documentation for full list of supported social links. All optional.
socialHandles:
twitter: http://twitter.com/owncast
instagram: http://instagram.biz/owncast
facebook: http://facebook.gov/owncast
tiktok: http://tiktok.cn/owncast
soundcloud: http://soundcloud.com/owncast
- platform: twitter
url: http://twitter.com/owncast
- platform: instagram
url: http://instagram.biz/owncast
- platform: facebook
url: http://facebook.gov/owncast
- platform: tiktok
url: http://tiktok.cn/owncast
- platform: soundcloud
url: http://soundcloud.com/owncast
videoSettings:
chunkLengthInSeconds: 4

View file

@ -33,10 +33,15 @@ type InstanceDetails struct {
Summary string `yaml:"summary" json:"summary"`
Logo map[string]string `yaml:"logo" json:"logo"`
Tags []string `yaml:"tags" json:"tags"`
SocialHandles map[string]string `yaml:"socialHandles" json:"socialHandles"`
SocialHandles []socialHandle `yaml:"socialHandles" json:"socialHandles"`
ExtraInfoFile string `yaml:"extraUserInfoFileName" json:"extraUserInfoFileName"`
}
type socialHandle struct {
Platform string `yaml:"platform" json:"platform"`
URL string `yaml:"url" json:"url"`
}
type videoSettings struct {
ChunkLengthInSeconds int `yaml:"chunkLengthInSeconds"`
StreamingKey string `yaml:"streamingKey"`