Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions src/spi/binary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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,
Expand All @@ -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]
Expand Down