Enhance Streamtape driver with upload features and comprehensive tests#9460
Merged
okatu-loli merged 9 commits intoAlistGo:mainfrom Mar 30, 2026
Merged
Enhance Streamtape driver with upload features and comprehensive tests#9460okatu-loli merged 9 commits intoAlistGo:mainfrom
okatu-loli merged 9 commits intoAlistGo:mainfrom
Conversation
… info, and conversion status
… remotedl_remove, file_info, thumbnail, conversion_status
- Initialize RestyClient with custom settings for testing - Add TestDriverList to verify listing folders and files - Add TestDriverPutURL to test remote upload functionality and status checks - Add TestDriverFileInfo to validate file_info method via Other call - Add TestDriverThumbnail to test thumbnail retrieval via Other call - Add TestDriverConversionStatus to test conversion status queries (running and failed)
skysliences
approved these changes
Mar 29, 2026
okatu-loli
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR significantly enhances the Streamtape driver in alist with remote upload support, five new
OtherAPI methods, SHA256 upload verification, and comprehensive unit tests. A total of +429 lines across 5 files.Changes
1.
drivers/streamtape/types.go— New Response TypesAdded structured types for the new API responses:
remoteDlAddResult— result of initiating a remote uploadremoteDlStatusResult/remoteDlStatusItem— remote download status tracking (bytes loaded/total, status, timestamps)fileInfoResult/fileInfoItem— file metadata (name, size, type, conversion status)conversionResult/conversionItem— video conversion progress (name, folder, status, progress, retries, link)2.
drivers/streamtape/util.go— Remote Upload ID HelpersAdded encoding/decoding for remote upload object IDs:
remoteUploadPrefix = "ru:"— prefixed ID scheme to distinguish remote uploads from regular filesencodeRemoteUploadID(id)/remoteUploadIDFromObjID(id)/isRemoteUploadID(id)3.
drivers/streamtape/driver.go— Core Implementation (+143 lines)PutURL— Initiates a remote file download from an external URL via/remotedl/add, returns a trackedru:<id>objectOthermethod dispatches to 5 new sub-methods:remotedl_status— query progress of a remote upload via/remotedl/statusremotedl_remove— cancel/remove a remote upload via/remotedl/removefile_info— retrieve file metadata via/file/infothumbnail— get video thumbnail/splash URL via/file/getsplashconversion_status— query running or failed video conversions via/file/runningconvertsor/file/failedconvertsSHA256 upload support —
Sha256parameter passed to/file/ulendpoint for integrity verificationHelper
extractRemoteUploadID— shared logic for extracting upload ID from object ID or request data mapImproved
Move— now returns a clear error when attempting to move files to root (since Streamtape API doesn't support it), instead of silently failing4.
drivers/streamtape/meta.go— Configuration UpdatesSha256field (optional) toAdditionconfig for upload hash verificationAlert: "warning|Moving files to root folder is not supported by Streamtape API"to warn users attempting root moves5.
drivers/streamtape/api_test.go— Comprehensive Unit Tests (+224 lines)TestDriverList— lists root folder contents, verifies objects returnedTestDriverPutURL— full flow: initiate remote upload → extract upload ID → check status → remove uploadTestDriverFileInfo— drills into subfolders to find a file, callsfile_infoviaOtherTestDriverThumbnail— retrieves thumbnail URL for a file viaOtherTestDriverConversionStatus— queries both running and failed conversion queuesTest Plan
go test ./drivers/streamtape/...— all new tests pass