mirror of
https://git.maid.zone/stuff/soundcloak.git
synced 2026-01-04 01:49:37 +05:00
Highlight @username, links and emails in descriptions; and some fixes
This commit is contained in:
@@ -26,6 +26,10 @@ func Defaults(dst *cfg.Preferences) {
|
||||
if dst.ProxyImages == nil {
|
||||
dst.ProxyImages = cfg.DefaultPreferences.ProxyImages
|
||||
}
|
||||
|
||||
if dst.ParseDescriptions == nil {
|
||||
dst.ParseDescriptions = cfg.DefaultPreferences.ParseDescriptions
|
||||
}
|
||||
}
|
||||
|
||||
func Get(c *fiber.Ctx) (cfg.Preferences, error) {
|
||||
@@ -43,6 +47,7 @@ func Get(c *fiber.Ctx) (cfg.Preferences, error) {
|
||||
|
||||
type PrefsForm struct {
|
||||
ProxyImages string
|
||||
ParseDescriptions string
|
||||
Player string
|
||||
ProxyStreams string
|
||||
FullyPreloadTrack string
|
||||
@@ -96,6 +101,12 @@ func Load(r fiber.Router) {
|
||||
old.ProxyImages = &f
|
||||
}
|
||||
}
|
||||
|
||||
if p.ParseDescriptions == "on" {
|
||||
old.ParseDescriptions = &t
|
||||
} else {
|
||||
old.ParseDescriptions = &f
|
||||
}
|
||||
old.Player = &p.Player
|
||||
|
||||
data, err := json.Marshal(old)
|
||||
|
||||
Reference in New Issue
Block a user