Skip to content
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

Draft: add additional flag for do_not_stream / recording optout enum #130

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 4 additions & 2 deletions validator/json/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,12 @@
"type": "string"
},
"do_not_record": {
"type": ["boolean", "null"]
"type": ["boolean", "string", "null"],
"description": "If this value is set to `true`, the speaker does not want a recording of any kind. We will remove all video staff and maybe even switch off all cameras"
},
"do_not_stream": {
"type": ["string", "null"]
"type": ["string", "boolean", "null"],
"description": "If this value is set to boolean `false`, the speaker is okay with a live stream of the event; and is aware that somebody in the internet might create third party recording"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should with a live stream be with a recording but not with a live stream?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the schedule.json, I would propose following assignment for a talk without recording + live-stream:

"do_not_record": true,
"do_not_stream": true,

The following assignment is a talk without a recording, but with a livestream:

"do_not_record": false,
"do_not_stream": true,

},
"persons": {
"type": "array",
Expand Down
15 changes: 14 additions & 1 deletion validator/xsd/schedule.xml.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
<xs:complexType name="recording">
<xs:all>
<xs:element type="xs:string" name="license"/>
<xs:element type="xs:boolean" name="optout"/>
<xs:element type="optoutEnum" name="optout"/>
<xs:element type="httpURI" name="url" minOccurs="0"/>
<xs:element type="httpURI" name="link" minOccurs="0"/>
</xs:all>
Expand Down Expand Up @@ -242,4 +242,17 @@
</xs:simpleContent>
</xs:complexType>

<xs:simpleType name="optoutEnum">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding of recording and streaming is that both are independent from each other. As a user I would expect to see these flags in the schedule being presented as separate icon or similar. Is that possible with the enum or should it be split up?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the XML schedule variant: I think we should try to combine both...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reasoning for combining both?

<xs:restriction base="xs:string">
<!-- Recording optout status 'false' is the normal case: We enable the live stream and create a recording, which we publish without and feedback from the speaker -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Readability/understanding: which we publish without and feedback from the speaker could be which we publish without or with feedback from the speaker

<xs:enumeration value="false"/>
<!-- Recording optout status 'true' means: The speaker does not want a recording of any kind. We will remove all personnel, and maybe even switch off all cameras -->
<xs:enumeration value="true"/>
<!-- Recording optout status 'maybe': We are allowed to create a recording / enable the live stream; but the speaker can decide afterwards if we can publish it -->
<xs:enumeration value="maybe"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about undecided instead of maybe?

Copy link
Member Author

@saerdnaer saerdnaer Dec 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<xs:enumeration value="maybe"/>
<xs:enumeration value="undecided"/>

<!-- Recording optout status 'unknown': We don't now if an recording will exist and recommend all on-premise participants to attent the event in persion -->
saerdnaer marked this conversation as resolved.
Show resolved Hide resolved
<xs:enumeration value="unknown"/>
</xs:restriction>
</xs:simpleType>

</xs:schema>
5 changes: 4 additions & 1 deletion voc/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,9 @@ def add_events_from(self, other_schedule, id_offset=None, options={}, context: E
if options.get("do_not_record"):
event["do_not_record"] = options['do_not_record'](event) if callable(options["do_not_record"]) else options["do_not_record"]

if options.get("do_not_stream"):
event["do_not_stream"] = options['do_not_stream'](event) if callable(options["do_not_stream"]) else options["do_not_stream"]

if options.get("remove_title_additions"):
# event["title"], subtitle, event_type = re.match(r"^(.{15,}?)(?:(?::| [–-]+) (.+?))?(?: \((.+?)\))?$", event["title"]).groups()

Expand Down Expand Up @@ -698,7 +701,7 @@ def _to_etree(d, node, parent=""):
# not in schedule.json: license information for an event
v = {
"license": recording_license,
"optout": "true" if v is True else "false",
"optout": "true" if v is True else v,
}
# new style schedule.json (version 2022-12)
elif k == "optout":
Expand Down
Loading