Commit Graph

33 Commits (73eaac16f3b2440f42de81467604bf64f3fd92ba)

Author SHA1 Message Date
Mike Lang 4d9d444cc3 cuter: local upload backends: Use _ instead of - as replacement char
This is apparently nicer to deal with in URLs.
1 year ago
Mike Lang 80c9be0baf cutter: Get archive cut working 1 year ago
Mike Lang cedebff1ce Add LocalArchive upload backend 1 year ago
Mike Lang a201a2d4c9 cutter: Add support for smart cuts 1 year ago
Mike Lang 2fee3a6e9d cutter: Don't set error on concurrent video update
If two cutters modify a video at the same time, youtube may respond with a 409 to one of them.
We want to treat that as a retryable error, and ideally let another cutter finish it instead.
2 years ago
Mike Lang bd519369bd thumbnail fixes 2 years ago
Mike Lang d3e21ae9b0 Implement thumbnails in cutter 2 years ago
Mike Lang 46468409cb Add "public" column to control if videos are unlisted
This column is modifyable.
This replaces the old "hidden" argument to youtube upload backends.
2 years ago
Mike Lang c4a1d72240 Add new state to postgres and implement cutter logic 2 years ago
Mike Lang 21856c68aa Fix all instances of file.write() for py3
In python 3, file.write() may do a partial write and returns the number of characters written.
In order to not lose data, we need to wrap every instance of file.write() with our new
common.writeall() wrapper that loops until the data is actually written.
3 years ago
Mike Lang 50231a5154 py3 fixes for cutter 3 years ago
HubbeKing 6d790a1b36 Do a first naive pass for py3 compatibility
Check that open() calls for reading and writing use binary modes
Use alpine version with py3-pip package
Use python3 in Dockerfile CMD
Remove sys.setdefaultencoding() "hack"
Simplify ensure_directory() in common.common package
3 years ago
Mike Lang 4a2fe7a6ed cutter: Explicitly set mime type of uploads correctly 5 years ago
Mike Lang a002619c4c youtube upload: Explicitly set mime type 5 years ago
Mike Lang a438d86f80 cutter: Fix multiple problems with logging errors 5 years ago
Mike Lang 4bbcc8bc06 Revert "Merge pull request #155 from ekimekim/mike/manual-uploads"
This reverts commit 99de586353, reversing
changes made to 4b04f70b6f.

We don't need this feature and it complicates things and adds bugs.
5 years ago
Mike Lang c580671da2 Create upload pending state 5 years ago
Mike Lang 4c0e20983c Local upload backend: Always use .ts extension
Now that we're doing that for both fast and full cuts.
5 years ago
Mike Lang a7ac264201 cutter: Fix local upload backend, which was returning video id as a uuid
instead of a string
5 years ago
Mike Lang da58021c6f cutter: Fix typo where encoding settings had wrong name 5 years ago
Mike Lang 4d52b18b04 cutter,restreamer: Set stream=True for full cuts when appropriate
And also default to a new ffmpeg encoding setting for high-quality mpegts
(ie. still streamable) that is encoded very quickly.
5 years ago
Mike Lang 52e6c4ad41 sheetsync, cutter: Collect metrics on http calls
In particular, to google apis.
5 years ago
Mike Lang 596cd92644 cutter: Add more specific error handling to upload backends
For youtube, know that 4xx's are safe even if finalizing was set.

For local, make all disk errors retryable since it doesn't matter.
5 years ago
Mike Lang 736040435c Refactor error handling in uploads
Instead of handling each error condition seperately,
we raise an UploadError which includes whether it's retryable.

The advantage of this is that upload backends can also raise an UploadError
to indicate two conditions it currently cannot:
	That an error is unretryable
	That an error is retryable, even if the row was already in finalizing

Under this scheme, errors while cutting become unretryable UploadErrors,
and unhandled exceptions in uploading become retryable UploadErrors if
the row is not yet finalizing only.
5 years ago
Mike Lang 40458d9d7f local backend: Use original version of title in write_info
instead of safe version
5 years ago
Mike Lang 3fbbe59b00 cutter Local backend: Fix typo and file extension when full cutting 5 years ago
Mike Lang 1218b694dd cutter: Allow fast or full cuts per location
On full cut, use encoding settings determined by the backend.
5 years ago
Mike Lang 40c4baef0f youtube upload: Set category and language settings
configured on a per-location basis.
5 years ago
Mike Lang 1a177931a6 cutter: Simplify upload backend interface
Only support iterable of string, not file-like or string.

This is a minor usability loss but we only call this from one place anyway
and it's always an iterable of string.
5 years ago
Mike Lang f8039028c4 local upload backend: Add a testing option to show info upload_video() was called with
This is useful because it lets us test uploads and tag logic without involving youtube.
5 years ago
Mike Lang 75acd978de cutter: Implement a Local upload location
This cuts to local disk, useful for self-hosting and testing.
5 years ago
Mike Lang ecf58dfbfc cutter: Add ability to configure multiple upload locations
Cutter now takes a 'config' arg which is a json blob with detail
on each upload location. This is a bit nasty if you're trying to run it manually
but was the easiest way to transfer the config data from docker-compose.jsonnet
to the actual application.
5 years ago
Mike Lang 39f006fdab cutter: Replace youtube client with generic upload backend and specific youtube implementaton
Still to go: Actually constructing the correct backend based on given config,
switching behaviour based on needs_transcode.
5 years ago