sureshfizzy / CineSync

CineSync is a Python & Bash based library management tool designed to organize debrid & local libraries without the support of Sonarr & Radarr
33 stars 5 forks source link

Systemd service not working #5

Open eoghan2t9 opened 1 month ago

eoghan2t9 commented 1 month ago

As stated in a comment on one of the other issues the realtime monitor doesn't want to work correctly and exits far too quickly. I have added loads of test content and let the monitor do its thing but hours later not symlinks have been made for the newly added content. I have even manually run the library.sh file and get the same result.

This is the script output

Running on Linux
OS Version: #1 ZEN SMP PREEMPT liquorix 6.8-16ubuntu1~jammy (2024-05-22)
Watching directory: /location 
Destination directory: /location
Scanning directory for changes...
Scan complete.

It's as if it doesn't want to scan anything.

sureshfizzy commented 1 month ago

Is the watch directory correct ? Also are you on the latest code ? I did few changes on it.

eoghan2t9 commented 1 month ago

Yeah the watch dir correct and yeah made sure I was on the latest code. I'll have a look as well and if I find a fix I'll do a pull request 😀

sureshfizzy commented 1 month ago

Instead of running as a service try to run the python file directly. Grab 1 or 2 shows to see if anything is being reflected coz I'm not able to reproduce it on my end :(

eoghan2t9 commented 1 month ago

Also tried the python script manually and got the same result just keeps saying complete but nothing seems to get added

sureshfizzy commented 1 month ago

I'll add few logging and check on my end

eoghan2t9 commented 1 month ago

Just added a pull request for a version that works for me know

sureshfizzy commented 1 month ago

@eoghan2t9 can you replace line number 30 in RealTime-Monitor.py with this code and see if that works ?

previous code: subprocess.run([bash_script, path])

new code: subprocess.run(['/bin/bash', bash_script, path])

eoghan2t9 commented 1 month ago

@sureshfizzy just changed that line and also reverted back to your code to see and still the same the script doesn't run and exits far too quickly with scan complete. I'll also be making another bug report for a separate issue later it's a bit of an odd issue 🤣

sureshfizzy commented 1 month ago

Ohh you got hit by scan complete, that means there is no files to be symlinked ☹️. The script will retrigger every 60 seconds to see if there are any new files (you can lower the time if needed to 10). That's how it works.

eoghan2t9 commented 1 month ago

Ohh you got hit by scan complete, that means there is no files to be symlinked ☹️. The script will retrigger every 60 seconds to see if there are any new files (you can lower the time if needed to 10). That's how it works.

Oh I know how it works lol the thing is even when I've added new files so that the scan should take a few minutes to complete detecting them it doesn't no matter how long I leave it 🙈

sureshfizzy commented 1 month ago

Ohh you got hit by scan complete, that means there is no files to be symlinked ☹️. The script will retrigger every 60 seconds to see if there are any new files (you can lower the time if needed to 10). That's how it works.

Oh I know how it works lol the thing is even when I've added new files so that the scan should take a few minutes to complete detecting them it doesn't no matter how long I leave it 🙈

Can you send me the file details and I'll check the working on my end as well. Coz the scan is working fine on my end running on ubuntu.

eoghan2t9 commented 1 month ago

Yeah I'll grab the magnet link shortly just in work at the moment