func (sess *Session) GetMasterPlaylistOptions(width int, selectedIndex int, showLoading bool) string {
	sess.Master = NewMaster(sess.URL)
	if showLoading {
		tools.PrintLoading(width)
	}
	if err := sess.Master.Get(); err != nil {
		fmt.Println("error getting master playlist.")
		return ""
	}
	output := new(bytes.Buffer)
	fmt.Fprint(output, tools.GetHeader(width, " Select a variant"), "\r\n")
	fmt.Fprint(output, sess.Master.GetVariantList(selectedIndex))
	fmt.Fprint(output, "\r\n", tools.GetFooter(width, ""))
	fmt.Fprint(output, "\r\nactions: (enter)select variant (q)uit (r)efresh\r\n")
	return output.String()
}
GetMasterPlaylistOptions return the possible playlist options.
package hls
import (
	"bytes"
	"fmt"
	"time"
	"github.com/moore0n/hlstail/pkg/tools"
)
type Session struct {
	URL     string
	Master  *Master
	Variant *Variant
}
func NewSession(URL string) (*Session, error) {
	sess := &Session{
		URL: URL,
	}
	sess.Master = NewMaster(sess.URL)
	if err := sess.Master.Get(); err != nil {
		return nil, err
	}
	return sess, nil
}