futzu / SCTE-35_HLS_x9k3

HLS and SCTE-35 x9k3 is a HLS Segmenter with SCTE 35, and Live Streaming from Non-Live Soures and Looping.
67 stars 17 forks source link

m3u8 live window fix #28

Closed edward-rafalovsky closed 9 months ago

edward-rafalovsky commented 9 months ago

Live window sliding should be independent from the --delete param

futzu commented 9 months ago

Would you make two changes?

  1. Remove this line from popleft_panes
        if len(self.panes) >= self.size:

That doesn't need to be there, the size is checked in slide_panes. Which brings us to the second change.

  1. Fix my other error in slide_panes This is what slide_panes needs to look like.
    def slide_panes(self, a_pane=None):
        if a_pane:
            self.push_pane(a_pane)                                      
        while len(self.panes) > self.size:
                self.popleft_pane()

Right now I have

    def slide_panes(self, a_pane=None):
        if a_pane:
            self.push_pane(a_pane)
        if self.delete:              # This line is wrong. 
            while len(self.panes) > self.size:
                self.popleft_pane()

If you'll do that for me, I accept the patch and new release.

futzu commented 9 months ago

I got it. Dont worry about the changes. You're a php guy? I thought y'all were extinct. :)