diff --git a/application/application.go b/application/application.go index d48f92f..30a25c6 100644 --- a/application/application.go +++ b/application/application.go @@ -25,7 +25,6 @@ import ( pb "github.com/vishen/go-chromecast/cast/proto" "github.com/vishen/go-chromecast/playlists" "github.com/vishen/go-chromecast/storage" - "gopkg.in/ini.v1" "path/filepath" ) @@ -1427,12 +1426,3 @@ func (a *Application) Transcode(contentType string, command string, args ...stri a.MediaWait() return nil } - -// plsIterator is an iterator for playlist-files. -// According to https://en.wikipedia.org/wiki/PLS_(file_format), -// The format is case-sensitive and essentially that of an INI file. -// It has entries on the form File1, Title1 etc. -type plsIterator struct { - count int - playlist *ini.Section -} diff --git a/application/application_test.go b/application/application_test.go index 8632cf2..6d5b8f8 100644 --- a/application/application_test.go +++ b/application/application_test.go @@ -4,14 +4,12 @@ import ( "encoding/json" "testing" - "fmt" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/vishen/go-chromecast/application" "github.com/vishen/go-chromecast/cast" mockCast "github.com/vishen/go-chromecast/cast/mocks" pb "github.com/vishen/go-chromecast/cast/proto" - "path/filepath" ) var mockAddr = "foo.bar" @@ -44,32 +42,3 @@ func TestApplicationStart(t *testing.T) { app := application.NewApplication(application.WithConnection(conn)) assertions.NoError(app.Start(mockAddr, mockPort)) } - -func TestParsePlaylist(t *testing.T) { - var path string - if abs, err := filepath.Abs(filepath.Join("..", "testdata", "indiepop64.pls")); err != nil { - t.Fatal(err) - } else { - path = fmt.Sprintf("file://%v", abs) - } - it, err := application.NewPlaylistIterator(path) - if err != nil { - t.Fatal(err) - } - var wantUrls = []string{ - "https://ice4.somafm.com/indiepop-64-aac", - "https://ice2.somafm.com/indiepop-64-aac", - "https://ice1.somafm.com/indiepop-64-aac", - "https://ice6.somafm.com/indiepop-64-aac", - "https://ice5.somafm.com/indiepop-64-aac", - } - for i, want := range wantUrls { - if !it.HasNext() { - t.Fatal("iterator exhausted") - } - have, _ := it.Next() - if have != want { - t.Fatalf("url %d, have %v want %v", i, have, want) - } - } -} diff --git a/testdata/helptext.txt b/testdata/helptext.txt index 4852710..1df0720 100644 --- a/testdata/helptext.txt +++ b/testdata/helptext.txt @@ -26,12 +26,14 @@ Available Commands: previous Play the previous available media restart Restart the currently playing media rewind Rewind by seconds the currently playing media + scan Scan for chromecast devices seek Seek by seconds into the currently playing media seek-to Seek to the in the currently playing media skipad Skip the currently playing ad on the chromecast slideshow Play a slideshow of photos status Current chromecast status stop Stop casting + togglepause Toggle paused/unpaused state. Aliases: tpause, playpause transcode Transcode and play media on the chromecast tts text-to-speech ui Run the UI