Streaming URL für die Channels App generieren
(channelID string)
| 1852 | |
| 1853 | // Streaming URL für die Channels App generieren |
| 1854 | func 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 | } |
nothing calls this directly
no test coverage detected