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

No subtitles error is back after fix #233

Open
ToborWinner opened this issue Oct 5, 2024 · 13 comments
Open

No subtitles error is back after fix #233

ToborWinner opened this issue Oct 5, 2024 · 13 comments

Comments

@ToborWinner
Copy link

ToborWinner commented Oct 5, 2024

Describe the bug
Whenever I try to play something using the most recent version of lobster, it shows "No subtitles found" and exits after selecting the movie/episode. Last time it was because the API server was down. During the time when the API was still down I self-hosted lobster-netlify-api and it worked just fine. Now, even if I switch to the self-hosted version, it fails. The self-hosted api shows an error saying that in rabbit.ts at line 720 it's trying to access element 0 of null.

Steps to reproduce the behavior:
Run the lobster command, select any movie and try to play it.

Expected behavior
The API should work and the movie should play.

Desktop

  • OS: NixOS
@DiegoOlaya
Copy link

I am experiencing the same issue on MacOS Sonoma 14.7. The program will exit with "No subtitles found" upon selecting any piece of media.

Steps to reproduce:
Run lobster with any episode.

Expected:
The media player should open and the episode should play.

@EasperOne
Copy link

Same here on Ubuntu 24.04.1. The error persisted no matter I self-hosted or not.

@Mra1k3r0
Copy link

Mra1k3r0 commented Oct 9, 2024

up

@pitsi
Copy link

pitsi commented Oct 13, 2024

Same issue here.

If someone knows how to use this to decrypt what is needed, please post. Also post what the url for json_data must change to. My braincells have only succeded to "npm install" in it and nothing more to make it run.
https://github.com/justchokingaround/rabbit_wasm_api

@pitsi
Copy link

pitsi commented Oct 17, 2024

I made some progress! You clone the forementioned repo, cd into it, run npm install to let it install anything it wants and then run npm run start. Proof

# npm run start

> [email protected] start
> ts-node index.ts

Server is running on port 3000

Now someone must find the proper url to use under the json_data variable in the script, because this does not work
http://server-ip-or-name:3000/.netlify/functions/decrypt?id=${source_id}

@pitsi
Copy link

pitsi commented Oct 18, 2024

@FurqanHun
Sorry for adding you in the conversation, but I think you may have an idea on how to run it.

@FurqanHun
Copy link

@FurqanHun Sorry for adding you in the conversation, but I think you may have an idea on how to run it.

Yeah, I know about it and actually fixed it in my own fork.

In decrypt.ts at line 31, it says:

async function decrypt(source: string) {
  // Await the async function call
  return await main(source);
}

You’ll need to add an argument and change it to:

async function decrypt(source: string, provider: string) {
  // Await the async function call
  return await main(provider, source);
}

Locally, you’ll just get a warning, but it still works since the provider is hard-coded in rabbit.ts. Netlify, though, won’t let you get away with that. You can clone my fork and deploy it directly; that should work.

MUST READ THIS PART!!!

But even after deploying and updating the config file, it might not work because the script’s broken again. The author mentioned (on discord/matrix) that rabbit stream changed their encryption thingy, which messed things up. So, you might need to wait for a fix or help out with it. Also, refrain from creating issues about it as it's already a known issue.

@pitsi
Copy link

pitsi commented Oct 19, 2024

I just tried your fork and it does not work. Proof from lobster -x

+ curl -s http://alpine.local:3000/.netlify/functions/decrypt?id=RSUL5z8uzcgO
+ json_data=

I saw npm mention 3999 as the port while it was launching netlify, so I tried it too, but nothing changed. Thanks a lot though for patching it!

@FurqanHun
Copy link

I just tried your fork and it does not work.

Yep, i did mentioned it still won't work as lobster's broken rn, and there's no ETA for when it will be fixed. If you know how to reverse engineerband re code the rabbit stream thing you can try contributing tho.

@pitsi
Copy link

pitsi commented Oct 26, 2024

@FurqanHun
On a system that I do not WANT to install ts-node system-wide, how can I make npm run a .ts script?
Asking for a friend and thank you in advance :D

@FurqanHun
Copy link

@FurqanHun On a system that I do not WANT to install ts-node system-wide, how can I make npm run a .ts script? Asking for a friend and thank you in advance :D

To install locally you just omit the -g or --global flag with the install command:

npm install ts-node typescript

However, it’s recommended to use the --save-dev flag to add the packages as development dependencies:

npm install --save-dev ts-node typescript

After that, you'd need to add your .ts script in package.json:

{
  "scripts": {
    "start": "ts-node your_script.ts"
  }
}

and then you can just run it with:

npm run start

@pitsi
Copy link

pitsi commented Oct 29, 2024

I thought I had commented on that, but github does not show my comment, so I will write it again.

Thank you for the explanation and specifically for the detalils about the package.json part. The file I have had a typo in there pointing to a wrong path, but although I fixed it, it still fails to run.

@FurqanHun
Copy link

FurqanHun commented Oct 31, 2024

@pitsi

If you haven't set up the tsconfig.json, that might be why it's not working. ts-node auto compiles your ts code before running it, and having the right config is key since there are different ways to compile... especially with various syntax.

I did test it myself btw:

script.ts

console.log("Testing typescript with node-ts...");

Added the following in package.json

"scripts": {
    "start": "ts-node script.ts",
  },

Created tsconfig.json:

{
  "compilerOptions": {
    "target": "ES6",
    "module": "commonjs",
    "strict": true
  },
  "include": ["*.ts"],
  "exclude": ["node_modules"]
}

and here's the output:
image

npm list --depth=0 shows the installed packages of the project and -g does the same but for global

Feel free to reach out to me at [check edit history] as going back and forward here just notifies everyone and this isn't related to the project either...

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

No branches or pull requests

6 participants