Fix show more formats collapse

This commit is contained in:
Evan Fiordeliso 2024-11-06 23:07:55 -05:00
parent 681225c2ae
commit 247cc211fa
2 changed files with 9 additions and 5 deletions

View File

@ -25,12 +25,18 @@
</div> </div>
{{if gt (len $video.OtherFormats) 0}} {{if gt (len $video.OtherFormats) 0}}
<div class="d-grid my-3"> <div class="d-grid my-3">
<button class="btn btn-secondary" data-bs-toggle="collapse" <button
data-bs-target="#{{$root.Meta.ID}}-{{$vidIndex}}-collapse"> type="button"
class="btn btn-secondary"
data-bs-toggle="collapse"
data-bs-target="#collapse-{{$root.Meta.ID}}-{{$vidIndex}}"
aria-expanded="false"
aria-controls="collapse-{{$root.Meta.ID}}-{{$vidIndex}}"
>
See More Formats See More Formats
</button> </button>
</div> </div>
<div id="{{$root.Meta.ID}}-{{$vidIndex}}-collapse" class="collapse"> <div id="collapse-{{$root.Meta.ID}}-{{$vidIndex}}" class="collapse">
<div class="downloads d-flex d-md-grid flex-column"> <div class="downloads d-flex d-md-grid flex-column">
{{range $index, $format := $video.OtherFormats}} {{range $index, $format := $video.OtherFormats}}
{{$label := sprintf "ext: %s, resolution: %s, filesize: %s, note: %s" $format.Ext $format.Resolution {{$label := sprintf "ext: %s, resolution: %s, filesize: %s, note: %s" $format.Ext $format.Resolution

View File

@ -117,8 +117,6 @@ func LoadConfig(paths ...string) (*Config, error) {
} }
} }
viper.Debug()
config := DefaultConfig() config := DefaultConfig()
if err := viper.Unmarshal(config); err != nil { if err := viper.Unmarshal(config); err != nil {
return nil, err return nil, err