From 2de55fd201643c1445a87ac636fd3b27c1563c25 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sun, 29 Dec 2024 10:35:50 +0100 Subject: [PATCH] re-set publishing tags, because we need them for announcements --- voctopublish/model/ticket_module.py | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/voctopublish/model/ticket_module.py b/voctopublish/model/ticket_module.py index 12a4c97..a8a5ce5 100644 --- a/voctopublish/model/ticket_module.py +++ b/voctopublish/model/ticket_module.py @@ -232,7 +232,17 @@ def __init__(self, ticket, ticket_id, config): "Publishing.Thumbnail.PathOverride", optional=True ) - self.publishing_tags = self._get_list("Publishing.Tags", optional=True) + # CAUTION: voctoweb only shows tags 5 and 4 (in that order). + # $ ruby -e 'print([0, 1,2,3,4,5,6,7,8][3,2].reverse)' + # [4, 3] + # tag 0 is filled with the fahrplan id, tag 1 year. + # This list starts at tag 2. + self.publishing_tags = [ + self.acronym, + self.track, # 3 + self.room, # 4 - TODO: do we really want the room in this position? + *self._get_list("Publishing.Tags", optional=True), + ] self.license = self._get_str("Meta.License", optional=True, try_default=True) # youtube properties @@ -287,16 +297,12 @@ def __init__(self, ticket, ticket_id, config): ) self.youtube_tags = [ - self.acronym, + *self.publishing_tags, self.date.split("-")[0], - self.track, - self.room, - self.day, *self._get_list("Publishing.YouTube.Tags", optional=True), - *self.publishing_tags, ] if self.day: - self.youtube_tags.append(f"Day {self.day}") + self.youtube_tags.append(f"{self.acronym} Day {self.day}") youtube_publish_at = self._get_str( "Publishing.YouTube.PublishAt", optional=True, try_default=True @@ -355,16 +361,16 @@ def __init__(self, ticket, ticket_id, config): ) self.voctoweb_event_id = self._get_str("Voctoweb.EventId", optional=True) - # ATTENTION: the tag order here is really important. Do not change, without talking to voctoweb DEVs! + # CAUTION: Order is important. See note for Publishing.Tags + # self.voctoweb_tags = [ - self.acronym, self.fahrplan_id, self.date.split("-")[0], - self.track, - self.room, # TODO: do we really want the room in this position? *self.publishing_tags, *self._get_list("Publishing.Voctoweb.Tags", optional=True), ] + if self.day: + self.voctoweb_tags.append(f"Day {self.day}") # rclone properties self.rclone_enable = self._get_bool(