tvgrabbers / tvgrabnlpy

Deze versie is deprecated zie: tvgrabpyAPI
https://github.com/tvgrabbers/tvgrabpyAPI
GNU General Public License v2.0
27 stars 8 forks source link

Needed more to really disable teveblad.be #42

Closed janlam7 closed 9 years ago

janlam7 commented 9 years ago

I needed one more line commented out to really disable teveblad.be, otherwise the grabber would hang indefinetely.

hikavdh commented 9 years ago

Thanks, when I tested it went OK. This is what is done in 2.2, but I was afraid that simply making the source unavailable might create miscalls. A maybe saver way is to prevent the source from starting in line 9222

        # Start the seperate fetching threads
        for source in xml_output.channelsource.values():
-            x = source.start()
-            if x != None:
-                return(x)
+            if source.proc_id != 3:
+                x = source.start()
+                if x != None:
+                    return(x)

        # Start the Channel threads

I should have done that. The trouble is that the interaction between the sources and the channels is quite complicated. In 2.2 there is a simple flag to disable a source and it will come out in beta later tonight. I'm working on some finishing touches. I however will pull it in and tag it.

hikavdh commented 9 years ago

A little thinking gave me an even better way at line 7056:

    def load_pages(self):
+        for chanid in self.channels.keys():
+            self.channel_loaded[chanid] = True
+            config.channels[chanid].source_data[self.proc_id].set()
+
+        return
+
        if config.opt_dict['offset'] > 8:

This way the source is still there, all channels are properly set loaded and the run is terminated. It's what gets done when a source crashes. (See line 3336 to 3347)