erdnaxeli / castblock

Automatically skip sponsor segments and ads in YouTube videos playing on Chromecast.
MIT License
182 stars 20 forks source link

[FEATURE] Termux Support #43

Closed ItsIgnacioPortal closed 2 years ago

ItsIgnacioPortal commented 2 years ago

Is there any way to run castblock? I feel like more often than not, chromecast is used because the user doesn't want to watch on a small screen, therefor, most chromecast users only have phones and not computers.

Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager.

Is there any way to run castblock on termux?

erdnaxeli commented 2 years ago

I don't think there is an easy way to run it on termux so far, as Crystal is not yet supported.

ItsIgnacioPortal commented 2 years ago

Interesting.. How about making releases here on Github with pre-compiled binaries? Crystal has a page about Cross-compilation

erdnaxeli commented 2 years ago

I already do some cross compilation to build the docker images for raspberry pi, I could try to do the same for android plateforms.

ItsIgnacioPortal commented 2 years ago

If you mean to build the Docker images for Android, I have to warn you that running Docker on Android is practically impossible; It requires rooting, and re-compiling the kernel with custom libraries.

It's better if your can just release binaries for aarch64 / armeabiV6

erdnaxeli commented 2 years ago

Yes, that is what I meant :)

ItsIgnacioPortal commented 2 years ago

Update on cross compilation: I tried to cross compile for "aarch64-unknown-linux-android24", but it fails with:

Showing last frame. Use --error-trace for full trace.

In /usr/share/crystal/src/exception/call_stack/libunwind.cr:1:1

 1 | require "c/dlfcn"
     ^
Error: can't find file 'c/dlfcn'

If you're trying to require a shard:
- Did you remember to run `shards install`?
- Did you make sure you're running the compiler in the same directory as your shard.yml?

I ran shards install but the issue didn't go away. I think the only solution is to follow the steps described here https://forum.crystal-lang.org/t/running-crystal-on-termux/3880/6 and compile this from termux directly

ItsIgnacioPortal commented 2 years ago

I've spent an unreasonable amount of time trying to get Crystal to work on termux. Fuck crystal. I'm switching to another project https://github.com/nichobi/sponsorblockcast