🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Also import `.m3u8` playlists
Deluan93626129b6de
diff --git a/utils/files.go b/utils/files.goindex d3fa9f7f5..a3a071484 100644--- a/utils/files.go+++ b/utils/files.go@@ -23,6 +23,6 @@ func IsImageFile(filePath string) bool {}func IsPlaylist(filePath string) bool {- extension := filepath.Ext(filePath)- return strings.ToLower(extension) == ".m3u"+ extension := strings.ToLower(filepath.Ext(filePath))+ return extension == ".m3u" || extension == ".m3u8"}diff --git a/utils/files_test.go b/utils/files_test.goindex 8f5cf5bbf..97f54b7a8 100644--- a/utils/files_test.go+++ b/utils/files_test.go@@ -49,6 +49,10 @@ var _ = Describe("Files", func() {Expect(IsPlaylist(filepath.Join("path", "to", "test.m3u"))).To(BeTrue())})+ It("returns true for a M3U8 file", func() {+ Expect(IsPlaylist(filepath.Join("path", "to", "test.m3u8"))).To(BeTrue())+ })+It("returns false for a non-playlist file", func() {Expect(IsPlaylist("testm3u")).To(BeFalse())})