-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd.go
More file actions
40 lines (36 loc) · 690 Bytes
/
add.go
File metadata and controls
40 lines (36 loc) · 690 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package main
// This file implements the "add" command
import (
//"fmt"
)
//func (player *Player) Add(args []string) (resp, err string) {
// if len(args) == 0 {
// err = ("nothing specified, nothing added")
// return
// }
//
// found := 0
// notfound := 0
// errstr := "not found:"
// for _, arg := range args {
// items := player.Find(arg)
//
// // TODO: item may be directory, add recursively
// if len(items) == 0 {
// errstr += " " + arg
// notfound++
// }
//
// player.playlist.Append(items...)
// found += len(items)
//
// }
//
// if notfound > 0 {
// err = errstr
// }
// if found > 0 {
// resp = fmt.Sprint("added ", found, " files to playlist")
// }
// return
//}