PDA

View Full Version : [ABM-MISC] Technical details on how bouquets are built using ABM, XML's etc?



Snookiwooki
09-09-14, 15:06
Afternoon All,


Wondering if there is any technical documentation on how the ABM python scripts work, as in how they integrate with the providers xml's and where the data is obtained from, satellites.xml etc

Essentially trying to understand what variables/parameters there are, as been looking at the excellent ZZL providers XML "list" mods but no idea what the service\service types are available or how to find out where there are generated from ie "17" and "free_ca".

Taken for ZZL's xml
service["service_type"] >= 17 and service["service_type"] <= 25 and service["free_ca"]

Wanting to mess with my own filtering, such as removing all encrypted channels - like a challenge :eek:

Many thanks for any tips, directions etc

Steve

zoomzoomluke
09-09-14, 21:03
The xml service hacks are literally just that. While it is possible to manipulate a lot of the ABM code by shoehorning code into dvbscanner, there are still some limitation to be careful of.

Essentially the biggest concern for modifying the python code in the XML is in the case of error handling. Essentially there is no built-in error handling so any incorrect syntax would cause a black screen error.

Even so, what you are possibly looking to do (if I understand correctly) is very simple modifying the ZZL xml file. Find the following in the XML...


# zoomzoomluke 08/08/2014 ################
# channels that are not whitelisted will get deleted if their CA is not free and they are HD. this is for the sky uk anti-cs measures
if service["number"] in whitelist and service["service_type"] != 2:
if log_servicehacks == 1 : print>>log,"[SERVICEHACKS] (" + str(service["number"]) + ") [" + service["service_name"] + "] WHITELISTED"
elif service["service_name"] in whitelist and service["service_type"] != 2:
if log_servicehacks == 1 : print>>log,"[SERVICEHACKS] (" + str(service["number"]) + ") [" + service["service_name"] + "] WHITELISTED"
elif service["number"] in blacklist and service["service_type"] != 2:
if log_servicehacks == 1 : print>>log,"[SERVICEHACKS] (" + str(service["number"]) + ") [" + service["service_name"] + "] BLACKLISTED"
skip = True
elif service["service_name"] in blacklist and service["service_type"] != 2:
if log_servicehacks == 1 : print>>log,"[SERVICEHACKS] (" + str(service["number"]) + ") [" + service["service_name"] + "] BLACKLISTED"
skip = True
elif service["service_type"] >= 17 and service["service_type"] <= 25 and service["free_ca"] != 0:
if log_servicehacks == 1 : print>>log,"[SERVICEHACKS] (" + str(service["number"]) + ") [" + service["service_name"] + "] Type " + str (service["service_type"]) + "AUTODELETED"
skip = True
##########################################

and replace it with the following...


# zoomzoomluke 09/09/2014 ################
# channels that are not whitelisted will get deleted if their CA is not free.
if service["number"] in whitelist and service["service_type"] != 2:
if log_servicehacks == 1 : print>>log,"[SERVICEHACKS] (" + str(service["number"]) + ") [" + service["service_name"] + "] WHITELISTED"
elif service["service_name"] in whitelist and service["service_type"] != 2:
if log_servicehacks == 1 : print>>log,"[SERVICEHACKS] (" + str(service["number"]) + ") [" + service["service_name"] + "] WHITELISTED"
elif service["number"] in blacklist and service["service_type"] != 2:
if log_servicehacks == 1 : print>>log,"[SERVICEHACKS] (" + str(service["number"]) + ") [" + service["service_name"] + "] BLACKLISTED"
skip = True
elif service["service_name"] in blacklist and service["service_type"] != 2:
if log_servicehacks == 1 : print>>log,"[SERVICEHACKS] (" + str(service["number"]) + ") [" + service["service_name"] + "] BLACKLISTED"
skip = True
elif service["free_ca"] != 0:
if log_servicehacks == 1 : print>>log,"[SERVICEHACKS] (" + str(service["number"]) + ") [" + service["service_name"] + "] Type " + str (service["service_type"]) + "AUTODELETED NON-FREE CA"
skip = True
##########################################
All I have done is remove the condition of the HD service type so that all remains is the check on the free_ca flag.

Remember to add ITV 1 HD (and possibly others) to the whitelist as their free_ca flag is != 0

This is untested but should serve as a quick starting point. If you know a little python, you should be ok to play further but put some exception handling in there first otherwise you will spend more time debugging than actually scripting.

---- Playing around with the ABM python scripts on the other hand is another matter. If you have any experience with python most of how it works should be pretty self explanatory, especially when it comes to handling that downloaded data, although the getting of data from the transport stream requires a little bit more understanding.

Hope this helps

Snookiwooki
10-09-14, 13:50
Very many thanks, did exactly what I wanted :D

Just wondering if your knowledge on this came from fiddling with the providers xml, or anything being documented somewhere?

thanks again
-Steve

zoomzoomluke
13-09-14, 15:29
Just wondering if your knowledge on this came from fiddling with the providers xml, or anything being documented somewhere?


I just looked at the source at https://github.com/oe-alliance/oe-alliance-plugins/tree/master/AutoBouquetsMaker and made the changes I needed for my own use and then it ended up being shared with everyone else. I was going to change ABM directly but the servicehacks fuction serves my purposes pretty well.