Now, for my question. The REST API wrapper part is pretty straight forward for most of the functionality (search, download).
I am having trouble replicating what OS uploader is doing with js and old os-api library using xml-rpc.I have successfully replicated the TryUpload function that checks if the subtitle already exists in the db, but then I can't see in what exact form he is sending the subtitle and the metadata to OS, so I am getting a reading body EOF error. So the problem is that I don't know how to format the data exactly before sending, and I can't find out what exactly the old api is expecting somewhere.
Here is a summary of my logs by an LLM:
]Target:
Subtitle File: pkg/core/opensubtitles/testdata/the woman who run 2020.srt
IMDB ID: 11697690
Language: ell
The log: https://pastebin.com/jvHJ0g33Pre-Check (TryUploadSubtitles)
Action: Attempting pre-upload check.
Key Params Sent: Subtitle Hash (a2e3...ee55), Filename, IMDB ID, Language.
Result: Success (HTTP 200 OK)
Outcome: Subtitle not already in database (alreadyindb: 0). Proceeding to upload.
Content Preparation
Action: Reading, Gzipping, and Base64 encoding subtitle file content.
Result: Encoded content generated (Length: 648).
Upload Attempt (UploadSubtitles)
Action: Attempting final upload with metadata and encoded content.
Key Params Sent: IMDB ID, Subtitle Hash, Filename, Base64 Content, Language, flags (HI=0, HD=0, etc.).
Result: Failed
Error Message: xmlrpc UploadSubtitles call failed: reading body EOF
Can somebody help me? Here or in pm. Thanks!