diff --git a/README.md b/README.md index 46fa626..14fce7f 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ A Python implementation of ETSI TS 102 818 v3.1 Hybrid Radio SPI, including an X This can be used by broadcasters for producing or parsing Hybrid Radio SPI documents over IP and/or DAB, or for general service and programme information interfacing. +Please make sure you select the Python2 branch if you want to use on Python 2. + # TODO * GI Files diff --git a/src/spi/binary/__init__.py b/src/spi/binary/__init__.py index 577e932..48acd79 100644 --- a/src/spi/binary/__init__.py +++ b/src/spi/binary/__init__.py @@ -92,7 +92,7 @@ def tobytes(self): # encode CData if self.cdata is not None: - print 'rendering cdata: %s' % self.cdata + # print 'rendering cdata: %s' % self.cdata logger.debug('rendering cdata: %s', self.cdata) data += self.cdata.tobytes() @@ -361,7 +361,8 @@ def __repr__(self): genre_map = dict( IntentionCS=1, FormatCS=2, - ContentCS=3, # what happened to 4?! + ContentCS=3, + IntendedAudienceCS=4, OriginationCS=5, ContentAlertCS=6, MediaTypeCS=7, @@ -377,6 +378,7 @@ def encode_genre(genre): bits.setall(False) # b0-3: RFU(0) + bits += encode_number(0,4) # b4-7: CS cs = segments[4] if cs in genre_map.keys(): cs_val = genre_map[cs]