Closed ramair02 closed 1 year ago
You don't need to make the change that you did, unless you're just trying to remind yourself which directory to set. Your changes only effect an echo line.
It looks like you're calling the script with an empty command line argument. I'd need to know more about how you're trying to call it but, from what I've gathered here, I imagine you're trying to do something like this:
./transfer-album.sh --takeout-dir "/mnt/user/filebrowser/PPIMPORT/Takeout/Google Photos"
Simple instructions to use the script are here: https://github.com/inthreedee/photoprism-transfer-album#to-use-this-script
Thanks for the reply. I suppose I'm not understanding how to run this script on my PhotoPrism container in Unraid. I thought I could run it from User Scripts and would need to specifiy the Takeout directory (which is inside my PhotoPrism Import folder) where I did above (Set the Google Takeout directory if needed). I'm not using a Config file (although I will if that's a better approach).
I tried to follow the instructions, but I've obviously failed to do it correctly.
I'm not familiar with Unraid, so I'm not sure if I can help with that part in particular, but it shouldn't be any different than running any other script. The error you're seeing is what shows up when there's a command line argument passed to the script that it can't recognize (I'll update the script to clarify that message. I admit it's way too vague right now)
If you show me exactly how you're configuring the script to be run in unraid or user scripts, I may be able to help further.
I'll try to clarify some things:
--help
command line argument. It doesn't actually change the script's behavior.transfer-album.sh --takeout-dir "/mnt/user/filebrowser/PPIMPORT/Takeout/Google Photos"
Also, if you need the script to not run interactively, yes, that's where the config file comes into play as shown here: https://github.com/inthreedee/photoprism-transfer-album#optional-config-file
Create the config file shown as in that example, then tell user scripts or whatever to run the script with these command line arguments:
transfer-album.sh --config "/path/to/config.conf" --takeout-dir "/mnt/user/filebrowser/PPIMPORT/Takeout/Google Photos"
Ok, maybe the User Scripts plugin on Unraid isn't the best way to run this script. Can I just drop it in my PhotoPrism appdata folder and run it from console like docker exec -it PhotoPrism transfer-album.sh --takeout-dir "/mnt/user/filebrowser/PPIMPORT/Takeout/Google Photos"
?
That should work, yes
I'm jumping in here, as I can get the script to start, but still fail with an error message. Then @ramair02 and I can compare our results.
First note, I have to run the script in the standard Unraid terminal (the icon located at the top right). If I use the terminal of the container, I cannot get it to start at all.
Second note, my folder structure is like this:
/mnt/user/Bilder/Import/
I have unzipped all my Takeout files to this import directory. So the folder structure is now:
/mnt/user/Bilder/Import/Takeout/Google Fotos/
Then I placed the script in the import directory, together with a .ini file which I created myself. This is optional, I am just tired of entering the URL and login data every time.
I have to start the script (as mentioned, in the Unraid terminal, not the container terminal) by navigating to the import folder and type:
sudo sh transfer-album.sh -c /mnt/user/Bilder/Import/config.ini
This is the result I get:
Import directory not set, using /mnt/user/Bilder/Import
Creating PhotoPrism session...
Failed to get session id, bailing!
@ramair02, can you please check if you can start the script as mentioned above and post your result? If it works, but you get the same "Failed to get session id" error message, let's continue in this thread.
@ramair02 are you still having this issue, or did running the script without unraid solve it?
Closing this as it appears to have been a configuration issue with unraid. If you believe there is still a problem with this script, feel free to re-open with further information. Thanks!
Trying to get this working on Unraid w/ User Scripts. Receiving the following error when trying to run the script. I'm including my script below, but the only thing I've changed is the path to Takeout directory.