windows bugfixes, more docs
This commit is contained in:
parent
49446c4120
commit
94fc08b2b1
17
README.md
17
README.md
|
@ -2,10 +2,21 @@
|
||||||
|
|
||||||
Tool to download FLACs from WiMP/Tidal.
|
Tool to download FLACs from WiMP/Tidal.
|
||||||
|
|
||||||
## Build prerequisites
|
## Binaries
|
||||||
* go >= 1.8
|
|
||||||
|
|
||||||
... more info soon™ ...
|
Windows binaries are available in the [releases](https://git.fuwafuwa.moe/albino/wimp-get/releases) tab.
|
||||||
|
|
||||||
|
## Compiling
|
||||||
|
|
||||||
|
You need Go >= 1.8, and suitable ffmpeg, sox and mktorrent binaries. Once you've got that, just run `go build -ldflags "-s -w"`, and a `wimp-get` binary should be generated.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
If your copies of ffmpeg, sox or mktorrent are outwith your path, put their paths in magic.json. Extract the `sessionId` of your WiMP session using your browser's developer tools, and insert that into magic.json too.
|
||||||
|
|
||||||
|
## Help!
|
||||||
|
|
||||||
|
If it's not working, come and ask for help on IRC. Connect to `irc.rizon.net`, type `/join #wimp-get` and get my attention by saying my name (albino).
|
||||||
|
|
||||||
## License info
|
## License info
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
// +build windows
|
// +build windows
|
||||||
// currently untested as I don't have a windows machine to test on
|
|
||||||
|
|
||||||
package platform
|
package platform
|
||||||
|
|
||||||
|
@ -8,7 +7,7 @@ import(
|
||||||
)
|
)
|
||||||
|
|
||||||
func SanitiseFilename(filename string) (newName string, e error) {
|
func SanitiseFilename(filename string) (newName string, e error) {
|
||||||
r, e := regexp.Compile("[\\?<>:\"/\\\\|\\*]")
|
r, e := regexp.Compile("[\\?<>:/\"\\\\|\\*]")
|
||||||
if e != nil {
|
if e != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
14
wimp-get.go
14
wimp-get.go
|
@ -85,18 +85,18 @@ func main() {
|
||||||
|
|
||||||
fmt.Printf("[%d/%s] %s...", track.Volume, num, track.Title)
|
fmt.Printf("[%d/%s] %s...", track.Volume, num, track.Title)
|
||||||
|
|
||||||
var filename string
|
var filename = fmt.Sprintf("%s - %s.flac", num, track.Title)
|
||||||
if (multidisc) {
|
|
||||||
filename = fmt.Sprintf("%s/Disc %d/%s - %s.flac", dirName, track.Volume, num, track.Title)
|
|
||||||
} else {
|
|
||||||
filename = fmt.Sprintf("%s/%s - %s.flac", dirName, num, track.Title)
|
|
||||||
}
|
|
||||||
|
|
||||||
filename, e = platform.SanitiseFilename(filename)
|
filename, e = platform.SanitiseFilename(filename)
|
||||||
if e != nil {
|
if e != nil {
|
||||||
panic(e)
|
panic(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (multidisc) {
|
||||||
|
filename = fmt.Sprintf("%s/Disc %d/%s", dirName, track.Volume, filename)
|
||||||
|
} else {
|
||||||
|
filename = fmt.Sprintf("%s/%s", dirName, filename)
|
||||||
|
}
|
||||||
|
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
firstFile = filename
|
firstFile = filename
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue