diff --git a/voctopublish/api_client/voctoweb_client.py b/voctopublish/api_client/voctoweb_client.py index e09fa88..9fe0227 100644 --- a/voctopublish/api_client/voctoweb_client.py +++ b/voctopublish/api_client/voctoweb_client.py @@ -432,6 +432,10 @@ def create_or_update_event(self): [description, '' + link + ""] ) + if self.t.license: + # FIXME + description += f"\n\n{self.t.license}" + # API code https://github.com/voc/voctoweb/blob/master/app/controllers/api/events_controller.rb headers = { "Authorization": f"Token {self.api_key}", diff --git a/voctopublish/api_client/youtube_client.py b/voctopublish/api_client/youtube_client.py index 0c6e906..fd9c8c0 100644 --- a/voctopublish/api_client/youtube_client.py +++ b/voctopublish/api_client/youtube_client.py @@ -240,11 +240,11 @@ def upload(self, file, lang): + description ) - license = self.t._get_str("Meta.License", optional=True) - if license and "https://creativecommons.org/licenses/by" in license: - license = "creativeCommon" - else: - license = "youtube" + license = "youtube" + if self.t.license: + if "https://creativecommons.org/licenses/by" in self.t.license: + license = "creativeCommon" + description += f"\n\n{self.t.license}" metadata = { "snippet": { diff --git a/voctopublish/model/ticket_module.py b/voctopublish/model/ticket_module.py index b20de82..def3cdf 100644 --- a/voctopublish/model/ticket_module.py +++ b/voctopublish/model/ticket_module.py @@ -236,6 +236,7 @@ def __init__(self, ticket, ticket_id, config): self.date.split("-")[0], *self._get_list("Publishing.Tags", optional=True), ] + self.license = self._get_str("Meta.License", optional=True, try_default=True) # youtube properties if self._get_bool(