MCPcopy Index your code
hub / github.com/Threadfin/Threadfin / parsePlaylist

Function parsePlaylist

src/m3u.go:19–37  ·  view source on GitHub ↗

Playlisten parsen

(filename, fileType string)

Source from the content-addressed store, hash-verified

17
18// Playlisten parsen
19func parsePlaylist(filename, fileType string) (channels []interface{}, err error) {
20
21 content, err := readByteFromFile(filename)
22 var id = strings.TrimSuffix(getFilenameFromPath(filename), path.Ext(getFilenameFromPath(filename)))
23 var playlistName = getProviderParameter(id, fileType, "name")
24
25 if err == nil {
26
27 switch fileType {
28 case "m3u":
29 channels, err = m3u.MakeInterfaceFromM3U(content)
30 case "hdhr":
31 channels, err = makeInteraceFromHDHR(content, playlistName, id)
32 }
33
34 }
35
36 return
37}
38
39// Streams filtern
40func filterThisStream(s interface{}) (status bool, liveEvent bool) {

Callers 1

buildDatabaseDVRFunction · 0.85

Calls 4

readByteFromFileFunction · 0.85
getProviderParameterFunction · 0.85
makeInteraceFromHDHRFunction · 0.85
getFilenameFromPathFunction · 0.70

Tested by

no test coverage detected