-
Notifications
You must be signed in to change notification settings - Fork 176
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
TorrentToMedia not being called? (now: DS compatibility WIP) #469
Comments
Stop transmission before you change the config, you dumb ass. :) |
LMAO... I think most of us have been caught by that... Please feel free to edit the wiki to help prevent others from doing the same... The hardest thing for me is documenting things that I don't specifically use, or haven't done for a while, or otherwise just take for granted... |
It is in the wiki 😄
|
Oh... that is priceless 💃 Let me know if you run into any issues with this. |
Hmm damn, I do have an issue still.. |
Are there any transmission logs you can access? As a guess, if it isn't config, it is likely permissions. If you did a git clone of these scripts I am guessing you did this via ssh as root. You can try
|
Ah, maybe yes. Remember my other issue this week? I don't see any transmission logs btw.. I did this now and will test again:
|
Damn... I'm slow.... Sometimes I don't put posts together... Ok... So 755 should be fine for transmission:users since the group users has r-x permissions. Try doing a 777 on autoProcessMedia.cfg and logs/nzbtomedia.log Now, the other likely issue... Transmission is unable to call a python script because the PATH variable used by Transmission spkg on Synology doesn't include the python location??? This can be verified by creating a .sh script that just dumps the environment into a file, and call this from Transmission... But eh... That's when you are desperate. What I would do is first verify where your python and python2 executables are
Let us assume they are at /opt/bin for this next step... You can obviously correct this. What you want to do is edit the script that launches transmission (how do you start/stop via ssh?) this is usually an /etc/init.d/transmission.sh or similar...
Then restart Transmission.... Now when it goes to launch the script, it should run... But if it can't find Python in the path, it will just print an error to terminal (which isn't monitored) so there will be no logging or anyway to know... Permissions and Paths.... Almost impossible to figure out with so many different systems and Apps... |
And if this does indeed work.... This will certainly need to be added to the wiki ;) |
Did 777 for both files, now testing again... I can already say that
|
Wow... So you shouldn't be able to run this script manually???
This will return a full path (e.g /volume1/opt/bin/python2.7) Create a symlink to somewhere that is in your path (and hopefully is not reset on reboot...)
Even if that works now, but is reset after a reboot, at least we know what the issue is and we can find the best way to handle this. |
I'm using the Syno pkg and I don't see any update for PATH in the transmission package for python. Your seach query gives this:
Python is also located in Other packages like CP and SB are setting the PATH variable to include |
Is there also a /usr/local/python/bin/python2 and /usr/local/python/bin/python? I don't understand Syno packages... But if I am reading correctly you want to change
|
Ah... There it is... Look at NZBGet That is why NZBGet works and Transmission doesn't I would suggest reporting this on the Syno repository... Link in the URL to this thread if you want... |
Yes there is python, python2 and python2.7. Yes I was seeing that difference too. But I don't get it, that path variable is per application and not for the system? It would be better if the python package set the PATH variable if that was possible. |
Exactly... The transmission application uses a path that doesn't find python... So transmission can't run a python script. You just verified that the default system (root user) path doesn't find python command. |
Obviously the nzbget app actually specifically sets python into its path (which is what you need Transmission to do). |
That also removes the option of using DS with TorrentToMedia.py I guess, because it is totally the same as transmission under the hood (even setting.json). It was the next thing I was going to try.. |
This will be any easy fix... Just need to find the file...
|
I mean that DS will not be able to run python.. |
Possibly is you can configure its path... |
Nice. That should do it... |
I think we should use a bash script instead of directly calling TorrentToMedia.py for DownloadStation and set the PATH first. What do you think?
|
btw, TorrentToMedia.py works with those changes from the pull request 😉 Just one minor thing:
Why is it being put in another 'tv' folder? 👅 Note for anyone that wants to try and get this working with DownloadStation: |
Ok... I'll need to have a look at that remote-cli and see if I can use that to replace the existing RPC client? Have you verified that the existing script works to connect to transmission (not DS)? |
Yes it works for transmission I saw that a torrent got deleted by your script from transmission yesterday. |
Hey @clinton-hall, I cloned a copy to my MacBook and I'm trying to debug the transmissionrpc from TorrentToMedia with PyCharm IDE. Got a 403 and a clear message that whitelist was turned on and my PC wasn't whitelisted. So anyway it should be able to connect now, I don't see anything about TransmissionRPC in the log anymore. I'll turn on debug log and see what happens. |
Giving up.. Connection is fine but TorrentToMedia is never called with any arguments (I guess the arguments are needed to delete the torrent), therefore I called my script with the arguments available by transmission and in the order that TorrentToMedia is expecting it (no category variable available from transmission..): Unfortunately did didn't even execute the bash script.
|
I wonder is Syno calls these environment variables something different? If you just call the script as you did previously (from DS without the variables being found) but enable the option
This will dump all environment variables into the log so you can see if the same data is used under a different name... I wonder if TR_TORRENT_NAME is actually DS_TORRENT_NAME or similar? |
A bit further down I do see that it stops (not remove?) the torrent: But in fact the torrent is still in DS. |
Ok, so it connects fine, but the stop, start, delete calls don't appear to be working... Have you seen any information to suggest what differences might exist between Transmission and DS? |
To confirm... The script should stop the torrent while it does e processing... So the stop is at the beginning. Then it does the linking, extracting' processing an then at the end it should start/resume the torrent for seeding, or delete the torrent and files (if processed successfully and option deleteOriginal is set) |
I connected with transmission-remote-cli again and I don't see the torrent in there.. |
deleteOriginal was set to '0', but it did remove the files from my download folder.. |
Can you show the full log from the pp event? |
|
ok... I think the issue here is that the outputDirectory is the same as the inputDirectory. ::COPYLINK: SOURCE AND TARGET folders are the same, skipping ... so when SR processes these files, it actually moves the files away so DS can't find the files anymore. I wonder if this would work if you used?
|
@clinton-hall I'm going to leave it as it is for now, it works good. PP works, files are deleted from download folder + removed from transmission. |
no worries... thanks for all your help. If you find anything that needs changing at my end, please shout out. |
Thank you too for the assistance. Cross platform cue splitting for different formats for nzbToHeadphones would be a nice addition 😝 |
ok... break that down for me is easy to understand terms... |
Often an album is released with just one audio file and a CUE sheet. The cue sheet contains all information (artist,track,pause,title,album,..) to split this one audio file into separate files. This can be done without re-encoding.. So before letting HP know that it can pp the album, split the audio file into separate tracks. If there are multiple discs, either they are in two separate subdirectories (like "disc 01" and "disc 02") or the filename of the cue and audio files will indicate which disc it is. mp3splt seems to work on every platform (Windows, Linux, OS X) and supports FLAC, MP3 and OGG Vorbis as formats. |
Transmission no longer calls the TorrentToMedia script for me as well. I just performed a git pull to resolve a headphones post processing issue. The script ran fine until I performed the update. I am on the master branch. I am on running a QNAP 219. When I ssh into the QNAP and perform cd /share/HDA_DATA/.qpkg/nzbToMedia/ then run python TorrentToMedia.py the script runs fine. Was this broke with the update mentioned above? |
The issue is that the scripts now call python2 |
Unfortunately this did not work. Sent from my iPad
|
Ah... I think the issue is with the transmission script in QNAP Can you verify that typing Then you need to edit /etc/init.d/transmission.sh add the following at aboput line 20 (just above the export LD_LIBRARY_PATH line) then restart Transmission. |
That worked. Now will that transmission script change survive a qpkg update? Sent from my iPhone
|
It will survive FW update and restart... But a transmission qpkg update will break this. |
Hello, After hours and hours, I managed to make TorrentToMedia work with Transmission. But I can't make it work it work with Download Station, even though I religiously followed the wiki how-to. I get a "failed to connect to transmission". I tried without password, with password, assigning a port to DS. Nothing seems to work. So I wonder, is the wiki still up-to-date and I'm doing something wrong, or has something change with the recent DS updates ? @piejanssens : is TorrentToMedia still working with DS for you ? |
Just stick to Transmission. I gave up on DS because it shuts down the service when the queue is idle. |
Ok thanks. Good to know. Nevertheless, do you know if TorrentToMedia can still connect to DS like you used to (using the transmission setting with port 9093) ? |
Yes it does, but so far I have not been able to get further scripts invoked. This used to work. I have raised this with Synology. I also have needed to move away from Download Station to Transmission just to get TorrentToMedia.py to run. |
I've set up SR to use torrents for backlog.
Followed the nzbToMedia wiki on how to setup TorrentToMedia.
The torrent is added to transmission, but when the download finishes nothing happens and I don't see any errors or log traces of calling the TorrentToMedia.py script in logs/nzbtomedia.log.
Update: when I stop/start the transmission package (SynoCommunity) the settings.json file is overwritten or at least this part is overwritten:
The text was updated successfully, but these errors were encountered: