Skip to content

Reminder to check python2 branch #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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