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

Function clientConnection

src/buffer.go:669–710  ·  view source on GitHub ↗
(stream ThisStream)

Source from the content-addressed store, hash-verified

667}
668
669func clientConnection(stream ThisStream) (status bool) {
670
671 status = true
672 Lock.Lock()
673 defer Lock.Unlock()
674
675 if _, ok := BufferClients.Load(stream.PlaylistID + stream.MD5); !ok {
676
677 var debug = fmt.Sprintf("Streaming Status:Remove temporary files (%s)", stream.Folder)
678 showDebug(debug, 1)
679
680 status = false
681
682 debug = fmt.Sprintf("Remove tmp folder:%s", stream.Folder)
683 showDebug(debug, 1)
684
685 if err := bufferVFS.RemoveAll(stream.Folder); err != nil {
686 ShowError(err, 4005)
687 }
688
689 if p, ok := BufferInformation.Load(stream.PlaylistID); !ok {
690
691 showInfo(fmt.Sprintf("Streaming Status:Channel: %s - No client is using this channel anymore. Streaming Server connection has ended", stream.ChannelName))
692
693 if p != nil {
694 var playlist = p.(Playlist)
695
696 showInfo(fmt.Sprintf("Streaming Status:Playlist: %s - Tuner: %d / %d", playlist.PlaylistName, len(playlist.Streams), playlist.Tuner))
697
698 if len(playlist.Streams) <= 0 {
699 BufferInformation.Delete(stream.PlaylistID)
700 }
701 }
702
703 }
704
705 status = false
706
707 }
708
709 return
710}
711
712func parseM3U8(stream *ThisStream) (err error) {
713

Callers 1

thirdPartyBufferFunction · 0.85

Calls 3

showDebugFunction · 0.85
ShowErrorFunction · 0.85
showInfoFunction · 0.85

Tested by

no test coverage detected