Browse Source

Fixes off by one error for getting album and artist names

master
Sloom Sloum Sluom IV 10 months ago
parent
commit
1e83cd2ab1
2 changed files with 6 additions and 6 deletions
  1. BIN
      borrow
  2. +6
    -6
      main.go

BIN
borrow View File


+ 6
- 6
main.go View File

@ -67,7 +67,7 @@ func getArtistAndAlbum(titlestring string) {
if len(titlestring) < 18 || artist != "" || album != "" {
return
}
titlestring = titlestring[8:len(titlestring)-9]
titlestring = titlestring[7:len(titlestring)-8]
titlesplit := strings.Split(titlestring, "|")
album = strings.TrimSpace(titlesplit[0])
if len(titlesplit) > 1 {
@ -76,14 +76,14 @@ func getArtistAndAlbum(titlestring string) {
}
func printHelp() {
art := `borrow
art := `borrow
Syntax: borrow [options] _url_
Options:
`
_, _ = fmt.Fprint(os.Stdout, art)
flag.PrintDefaults()
_, _ = fmt.Fprint(os.Stdout, art)
flag.PrintDefaults()
}
func main() {


Loading…
Cancel
Save