Closed covertbert closed 7 years ago
You are right, my bad: I wrote in the README that pirate-get will create the config file but it never did. I should just remove it: it's not really useful to make an empty config and someone who only uses the command line probably doesn't want it either.
Anyway, it should work after you created one manually. What options did you try?
No worries and yeah that makes sense!
I just tried changing the "mirror" value to a URL that works with my ISP. It seemed to just ignore it, though, and used the standard URL.
Can you paste the file here?
I literally just copied and pasted your example into a file, changing only the mirror
value. One thing I may have been doing wrong is the name of the file perhaps? My path is $HOME/.config/pirate-get/pirate-get.sh
.
Here's the contents of the file anyway:
[Save]
; directory where to save files
directory = $PWD
; save each selected magnet link in a .magnet file
magnets = false
; save each selected torrent in a .torrent file
torrents = false
[LocalDB]
; use a local copy of the pirate bay database
enabled = false
; path of the database
path = ~/downloads/pirate-get/db
[Misc]
; specify a custom command for opening the magnet
; ex. myprogram --open %s
; %s represent the magnet uri
openCommand =
; open magnets with transmission-remote client
transmission = false
; use colored output
colors = true
; the pirate bay mirror(s) to use:
; one or more space separated URLs
mirror = https://pirateproxy.vip
The only thing I can think of is you have $XDG_CONFIG_HOME
set to something other than $HOME/.config
I've spent a fair but of time googling $XDG_CONFIG_HOME
to try and figure out if that's the case, but I can't really get my head round exactly how you check or set it.
I don't suppose you'd be able to point me in the right direction? I've tried on both my Mac (OS Sierra) and my raspberry pi (OSMC which I believe is based on Debian).
If you don't know about it then it's probably unset, anyway do echo $XDG_CONFIG_HOME
to check the content. Ultimately, to see what's really going on, you should run strace on pirate-get:
$ strace -e open pirate-get
If it's reading the config correctly you should see near the bottom of the text:
open("/<path-to-your-home>/.config/pirate-get", O_RDONLY|O_CLOEXEC) = 4
echo $XDG_CONFIG_HOME
returns a blank string, so presumably this means it isn't set?
When running strace -e open pirate-get
, it doesn't appear to return any lines that contain pirate-get
.
Just to clarify, is this the correct path: $HOME/.config/pirate-get/pirate-get.sh
or should it just be $HOME/.config/pirate-get
with pirate-get
being a file rather than a directory?
echo $XDG_CONFIG_HOME returns a blank string, so presumably this means it isn't set?
Exactly
Just to clarify, is this the correct path: $HOME/.config/pirate-get/pirate-get.sh or should it just be $HOME/.config/pirate-get with pirate-get being a file rather than a directory?
Ah, there it is: the configuration file is $HOME/.config/pirate-get
not $HOME/.config/pirate-get/pirate-get.sh
. $HOME/.config/pirate-get
is not a directory but the file itself.
I didn't understand what you meant with path earlier, sorry.
Ahaa, that makes sense! Seems I was being a little dense as, if I'd actually followed your instructions to the T
, I would have been fine.
Cheers for your help. Much appreciated!
No, problem.
Tried creating one manually in
$HOME/.config/pirate-get
and the settings seem to just be ignored.Presumably I'm doing something wrong, but I'm not sure what...