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

Function getStreamByChannelID

src/xepg.go:1854–1884  ·  view source on GitHub ↗

Streaming URL für die Channels App generieren

(channelID string)

Source from the content-addressed store, hash-verified

1852
1853// Streaming URL für die Channels App generieren
1854func getStreamByChannelID(channelID string) (playlistID, streamURL string, err error) {
1855
1856 err = errors.New("Channel not found")
1857
1858 for _, dxc := range Data.XEPG.Channels {
1859
1860 var xepgChannel XEPGChannelStruct
1861 err := json.Unmarshal([]byte(mapToJSON(dxc)), &xepgChannel)
1862
1863 fmt.Println(xepgChannel.XChannelID)
1864
1865 if err == nil {
1866
1867 if xepgChannel.TvgName == "" {
1868 xepgChannel.TvgName = xepgChannel.Name
1869 }
1870
1871 if channelID == xepgChannel.XChannelID {
1872
1873 playlistID = xepgChannel.FileM3UID
1874 streamURL = xepgChannel.URL
1875
1876 return playlistID, streamURL, nil
1877 }
1878
1879 }
1880
1881 }
1882
1883 return
1884}

Callers

nothing calls this directly

Calls 1

mapToJSONFunction · 0.70

Tested by

no test coverage detected