summaryrefslogtreecommitdiff
path: root/jfr_playoff/generator.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-09-28 15:54:30 +0200
committeremkael <emkael@tlen.pl>2018-09-28 15:54:30 +0200
commitc2150a64886a2bf6550f873a1c6d57c949d224be (patch)
tree8904d198337afe4cdc23b18997bbdf4c8d2e066a /jfr_playoff/generator.py
parentdd15c7119f5085e03c438ea7ee5bf70695de1af5 (diff)
parentf01a522694aad85c857470b9a8630c6194a38d36 (diff)
Merge branch 'devel' into position-boxes
Diffstat (limited to 'jfr_playoff/generator.py')
-rw-r--r--jfr_playoff/generator.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/jfr_playoff/generator.py b/jfr_playoff/generator.py
index 1daae1c..679fb13 100644
--- a/jfr_playoff/generator.py
+++ b/jfr_playoff/generator.py
@@ -57,7 +57,10 @@ class PlayoffGenerator(object):
team_label = ' / '.join([
self.data.get_shortname(name) for name in
team.name.split('<br />')])
- team_label = team_label[:30] + (team_label[30:] and '(...)')
+ label_max_length = self.page['label_length_limit'] \
+ if 'label_length_limit' in self.page else 0
+ if label_max_length:
+ team_label = team_label[:label_max_length] + (team_label[label_max_length:] and '(...)')
team_html = self.p_temp.get(
'MATCH_TEAM_LINK',
match.link, team.name, team_label) \