mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Fix archive sorting (#63)
This commit is contained in:
parent
95b66c3ff5
commit
10617df834
1 changed files with 13 additions and 8 deletions
|
|
@ -824,17 +824,22 @@ func archiveExtractEpisodes(url string) ([][]utils.FormatInformation, error) {
|
|||
}
|
||||
|
||||
var infoFormat [][]utils.FormatInformation
|
||||
for _, e := range eps {
|
||||
var keys []int
|
||||
for e := range eps {
|
||||
keys = append(keys, e)
|
||||
}
|
||||
sort.Ints(keys)
|
||||
|
||||
for _, k := range keys {
|
||||
var tmpFormatInfo []utils.FormatInformation
|
||||
|
||||
var keys []int
|
||||
for episodeNumber := range e {
|
||||
keys = append(keys, episodeNumber)
|
||||
var kkey []int
|
||||
for ee := range eps[k] {
|
||||
kkey = append(kkey, ee)
|
||||
}
|
||||
sort.Ints(keys)
|
||||
sort.Ints(kkey)
|
||||
|
||||
for _, key := range keys {
|
||||
tmpFormatInfo = append(tmpFormatInfo, *e[key])
|
||||
for _, kk := range kkey {
|
||||
tmpFormatInfo = append(tmpFormatInfo, *eps[k][kk])
|
||||
}
|
||||
|
||||
infoFormat = append(infoFormat, tmpFormatInfo)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue