Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reversing the order of the playlist #36

Open
kaihendry opened this issue Aug 29, 2017 · 0 comments
Open

Reversing the order of the playlist #36

kaihendry opened this issue Aug 29, 2017 · 0 comments

Comments

@kaihendry
Copy link

kaihendry commented Aug 29, 2017

I noticed your data structure has changed (my code that uses your library won't build) from 74b837a so that we have lists of AdaptionSets in lists of Periods IIUC.

I have legacy code like:

func reversempd(s []*mpd.Representation) []*mpd.Representation {
	for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 {
		s[i], s[j] = s[j], s[i]
	}
	return s
}
	if order == "desc" {
		for i, v := range m.Period.AdaptationSets {
			log.Println(i, v)
			v.Representations = reversempd(v.Representations)
			for j, r := range v.Representations {
				log.Println(j, r, "id", *r.ID)
			}
		}
	}

For reversing the order of the playlist which is needed for some reason or another. Can you suggest a way of realizing my reversal use case in light of the changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant