25 lines
455 B
Go
25 lines
455 B
Go
|
package ytdl
|
||
|
|
||
|
import "database/sql"
|
||
|
|
||
|
var DB *sql.DB
|
||
|
var Cache_Path string = "./cache/"
|
||
|
var Filepath string
|
||
|
|
||
|
type Media struct {
|
||
|
ID string `json: "id"`
|
||
|
YTID string `json: "yt-id"`
|
||
|
Size int `json: "size"`
|
||
|
Sha256sum string `json: "sha256sum"`
|
||
|
Duration int `json: "duration"`
|
||
|
Title string `json: "title"`
|
||
|
Author string `json: "author"`
|
||
|
}
|
||
|
|
||
|
// check error
|
||
|
func check(err error) {
|
||
|
if err != nil {
|
||
|
panic(err.Error())
|
||
|
}
|
||
|
}
|