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

Trim the beginning of output line for newer versions of ytarchive #38

Merged
merged 3 commits into from
Apr 19, 2024

Conversation

1toldyou
Copy link
Contributor

Since the newer versions of ytarchive prepend a timestamp to the output, but current mechanism to detect such timestamp are depending on ytarchive's version and being hard-coded to version 0.3.2

let line = if self.version == Some("0.3.2".into())

When I trying to run hoshinova with the latest version of ytartchive (0.4.0-77c2f5c) there are bunch of warning
Screenshot 2024-04-16 115844
Screenshot 2024-04-16 093235
and not recording properly (i.e. restart recording immediately after the previous run was ended)
image

This is after my fix:
image
and the problem seems to be improved (detecting new streams properly)
image

@hizkifw
Copy link
Member

hizkifw commented Apr 17, 2024

Thanks for the PR! One comment, can you wrap the Regex initialization inside a lazy_static!, just like in the strip_ansi function above? That way it won't recompile the regex every time a log line tries to be parsed.

@1toldyou
Copy link
Contributor Author

Done

@hizkifw
Copy link
Member

hizkifw commented Apr 19, 2024

Looks good, thank you very much!

@hizkifw hizkifw merged commit 589ef77 into HoloArchivists:main Apr 19, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants