Closed theprinceofspace closed 2 years ago
The error message suggests that the config file hasn’t been mounted correctly. If the file isn’t created before running the container, docker will create a folder and not a file. Try these steps:
touch /volume1/docker/isponsorblocktv/config.json
Let me know if you have other issues
So, I do have a blank "touch config.json" file in the isponsorblocktv folder. Am I running the correct commands here? still getting an error on step 1.
docker run --rm -it \ --network=host \ -v /volume1/docker/isponsorblocktv/touch config.json:/app/config.json \ ghcr.io/dmunozv04/isponsorblocktv \ --setup
Produces this error:
docker: invalid reference format.
This is a dead end I cannot get past.
Touch is a command that creates a file.
You should first run touch config.json
which will make a file called config.json
and then run the original docker command.
The other option you have is to download the template config file and place it in the folder, making sure to rename it to config.json. Hopefully this should work
Thanks for getting back to me. I saved and renamed the config file template in that folder I created. but when I enter this
docker run --rm -it \
--network=host \
-v /volume1/docker/isponsorblocktv/config.json:/app/config.json \
ghcr.io/dmunozv04/isponsorblocktv \
--setup
I am still getting errors.
You are running in docker, you have to mount the config file.
Please check the README.md for more information.
Traceback (most recent call last):
File "/app/main.py", line 3, in <module>
helpers.app_start()
File "/app/iSponsorBlockTV/helpers.py", line 29, in app_start
config = load_config(args.file)
File "/app/iSponsorBlockTV/helpers.py", line 18, in load_config
return config
UnboundLocalError: local variable 'config' referenced before assignment
I have a very low level of understanding here (isn't the -v command mounting the file?) and google is failing to help me troubleshoot this.
I just ran into this myself, the fix here was making sure that the config.json permissions allow the docker container to access the entire folder structure in the host volume.
Great! How do I change that? Alter that initial code somehow?
docker run --rm -it \
--network=host \
-v /volume1/docker/isponsorblocktv/config.json:/app/config.json \
ghcr.io/dmunozv04/isponsorblocktv \
--setup
Try this:
docker run --rm -it \
--network=host \
-v /volume1/docker/isponsorblocktv/config.json:/app/config.json \
-e PUID=0 \
-e PGID=0 \
-e iSPBTV_docker= \
ghcr.io/dmunozv04/isponsorblocktv \
--setup
same error message.
You are running in docker, you have to mount the config file.
Please check the README.md for more information.
Traceback (most recent call last):
File "/app/main.py", line 3, in <module>
helpers.app_start()
File "/app/iSponsorBlockTV/helpers.py", line 29, in app_start
config = load_config(args.file)
File "/app/iSponsorBlockTV/helpers.py", line 18, in load_config
return config
UnboundLocalError: local variable 'config' referenced before assignment
Can you attach the config.json file you are using?
Sure, added .gif to the end so github would let me upload it. I just copied over the file you linked above.
well that didn't work. trying again. zipped version attached. config.json.zip
Also, can you test this other command?:
docker run --rm -it \
--network=host \
-v /volume1/docker/isponsorblocktv/config.json:/app/config.json \
-e PUID=0 \
-e PGID=0 \
-e
ghcr.io/dmunozv04/isponsorblocktv \
--setup
flag needs an argument: 'e' in -e
Sorry, try this instead: (it didn’t copy correctly)
docker run --rm -it \
--network=host \
-v /volume1/docker/isponsorblocktv/config.json:/app/config.json \
-e PUID=0 \
-e PGID=0 \
-e iSPBTV_docker= \
ghcr.io/dmunozv04/isponsorblocktv \
--setup
If that works I’ll fix it properly when I’ve got time
oh, here's a new one. weird
-sh: ghcr.io/dmunozv04/isponsorblocktv: No such file or directory
Try using your original command and erasing the config.json. Replace it with the contents of this: https://github.com/dmunozv04/iSponsorBlockTV/raw/main/config.json.template
I had to reconnect to the network and the previous code you gave me works now!! going through setup now. 😀
Nice!
Please let me know if everything worked to be able to close the issue
ok. I actually made an error in the config file location that was causing the endless reboot cycle. now it's working flawlessly!! thanks so much for holding my hand through this. and building something incredible.
(also sorry for replying in the wrong thread)
Recap of what worked for me on my synology NAS. Use as a beginners guide if you like.
Make sure that the option to connect to apple TV's in the home app is set to allow anyone from this network.
Download the template config file and place it in a folder, making sure to rename it to config.json.
for me that location was /volume1/docker/isponsorblocktv/config.json referenced below.
In terminal, SSH into your synology NAS ssh (user)@(local IP) -p (port)
docker run --rm -it \
--network=host \
-v /volume1/docker/isponsorblocktv/config.json:/app/config.json \
-e PUID=0 \
-e PGID=0 \
-e iSPBTV_docker= \
ghcr.io/dmunozv04/isponsorblocktv \
--setup
Go through the setup steps. You will need to create a youtube API, not a big deal.
Once that is complete, your config file will be modified with your preferences. Run the container:
docker pull ghcr.io/dmunozv04/isponsorblocktv
docker run -d \
--name iSponsorBlockTV \
--restart=unless-stopped \
--network=host \
-v /volume1/docker/isponsorblocktv/config.json:/app/config.json \
ghcr.io/dmunozv04/isponsorblocktv
That's it.
Thanks for the kind words and the tutorial. I’ll make sure to put it in the wiki. Also, some nice improvements are coming soon
Cool, looking forward to it. I had a whole yt-dlp setup on my NAS to get ads out of the few channels I watch regularly and into plex, recognized as tv shows. This is a much better solution!
Next time you are looking for a new project, podcast ads have gotten quite obnoxious and there are currently no sponsorblock like solutions. Maybe something that lives in docker, collects your subs, strips ads out and creates a new RSS feed you can use in your podcast app of choice? With options like 'skip rebroadcasts' too? this could be tougher with dynamically inserted ads but there are probably ways to correct for that. Maybe an ad database like how the plex skip intro function works - detects identical audio across episodes.
Hi, I am new to this world and just got a synology NAS with basically everything setup in docker. This sounds like a dream come true but I can't get past the installation steps.
I create the empty config.json file on my NAS. SSH in and run this:
Which gives me this error:
Any help/suggestions would be appreciated here. thanks.