WIP: feat/webhook-cleanup-39c3 #2

Draft
andi wants to merge 14 commits from feat/webhook-cleanup-39c3 into main
Owner
No description provided.
@ -35,3 +40,1 @@
[voctoweb]
# e.g. https://exmaple.com/api/ - with trailing slash
api_url = "<voctoweb api url>"
enable_default = true
Owner

This is no longer used, use [defaults] below

This is no longer used, use `[defaults]` below
@ -0,0 +17,4 @@
tracker = TrackerClient()
project = '39c3'
Owner

Do we really need to have one-shot scripts like these in this repository?

Do we really need to have one-shot scripts like these in this repository?
Owner

If yes, it should atleast take the relevant information fron the config file and command line options instead of hard-coding them.

If yes, it should atleast take the relevant information fron the config file and command line options instead of hard-coding them.
Author
Owner

Yeah, that was the idea – that was one of the reasons why this was still marked as draft

Yeah, that was the idea – that was one of the reasons why this was still marked as draft
andi marked this conversation as resolved
@ -0,0 +51,4 @@
print(json.dumps(webhook._get_json(ticket), indent=2))
exit()
Owner

What does this do, and why do we have code after this?

What does this do, and why do we have code after this?
andi marked this conversation as resolved
@ -0,0 +72,4 @@
if __name__ == "__main__":
sync_tracker_with_hub()
Owner

In general, this script looks like a WIP commit, we should try to not have that in the main branch.

In general, this script looks like a WIP commit, we should try to not have that in the main branch.
andi marked this conversation as resolved
@ -104,0 +105,4 @@
if not config:
config = ticket.config
if not voctoweb_filename:
voctoweb_filename = ticket.filename
Owner

Are these identical? If yes, we can just remove passing this in. If not, it's not a great fallback value.

Same for language below.

Are these identical? If yes, we can just remove passing this in. If not, it's not a great fallback value. Same for `language` below.
Author
Owner

for the default case they are identical, as far as I understand the code there should be an option to overwrite the default filename for specific cases e.g. single-language MP4s

for the default case they are identical, as far as I understand the code there should be an option to overwrite the default filename for specific cases e.g. single-language MP4s
@ -129,2 +137,2 @@
).split("/", 2)
thumb_url = f"https:/{thumb_path[1]}/media/{thumb_path[2]}"
)
tpc = thumb_path.split("/", 2)
Owner

We should aim for readable variables in newly added code. tpc is not very readable.

We should aim for readable variables in newly added code. `tpc` is not very readable.
@ -105,2 +106,4 @@
return False
def __str__(self):
return super().__str__() + " " +json.dumps(vars(self), indent=2)
Owner

Dumping a big json blob is not exactly whay i would expect in __str__(). Ideally, put the JSON into a new method called to_json() or something like that.

Dumping a big json blob is not exactly whay i would expect in `__str__()`. Ideally, put the JSON into a new method called `to_json()` or something like that.
@ -43,3 +44,3 @@
from tools.thumbnails import ThumbnailGenerator
MY_PATH = os.path.abspath(os.path.dirname(__file__))
MY_PATH = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
Owner

This was intentional. We should encourage users to use environment variables instead.

This was intentional. We should encourage users to use environment variables instead.
@ -92,3 +94,3 @@
self.ticket_type = "recording"
self.to_state = "recording"
else:
elif self.worker_type != "other":
Owner

What is an 'other' worker?

What is an 'other' worker?
Author
Owner

any other worker which does not download, or publish a ticket. E.g. relive, or fixup scripts like the one we are adding in this PR.

any other worker which does not download, or publish a ticket. E.g. relive, or fixup scripts like the one we are adding in this PR.
andi changed title from DRAFT: feat/webhook-cleanup-39c3 to WIP: DRAFT: feat/webhook-cleanup-39c3 2026-01-26 19:52:58 +00:00
andi changed title from WIP: DRAFT: feat/webhook-cleanup-39c3 to WIP: feat/webhook-cleanup-39c3 2026-01-26 19:53:04 +00:00
Some checks failed
Makefile CI / isort (pull_request) Has been cancelled
Makefile CI / ruff (pull_request) Has been cancelled
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/webhook-cleanup-39c3:feat/webhook-cleanup-39c3
git switch feat/webhook-cleanup-39c3

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feat/webhook-cleanup-39c3
git switch feat/webhook-cleanup-39c3
git rebase main
git switch main
git merge --ff-only feat/webhook-cleanup-39c3
git switch feat/webhook-cleanup-39c3
git rebase main
git switch main
git merge --no-ff feat/webhook-cleanup-39c3
git switch main
git merge --squash feat/webhook-cleanup-39c3
git switch main
git merge --ff-only feat/webhook-cleanup-39c3
git switch main
git merge feat/webhook-cleanup-39c3
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
voc/publishing!2
No description provided.