Skip to content

Commit

Permalink
v1.0.5: update api
Browse files Browse the repository at this point in the history
  • Loading branch information
Lost committed Mar 30, 2024
1 parent d1bff94 commit 66169be
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@

# Go workspace file
go.work

# Win-get manifests
manifests/
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ go 1.21.6
require (
github.com/akamensky/argparse v1.4.0
github.com/emvi/iso-639-1 v1.1.0
github.com/lostdusty/gobalt v1.0.5
github.com/mergestat/timediff v0.0.3
github.com/princessmortix/gobalt v1.0.4
)
8 changes: 2 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ github.com/akamensky/argparse v1.4.0 h1:YGzvsTqCvbEZhL8zZu2AiA5nq805NZh75JNj4ajn
github.com/akamensky/argparse v1.4.0/go.mod h1:S5kwC7IuDcEr5VeXtGPRVZ5o/FdhcMlQz4IZQuw64xA=
github.com/emvi/iso-639-1 v1.1.0 h1:EhZiYVA+ysa/b7+0T2DD9hcX7E/5sh4o1KyDAIPu7VE=
github.com/emvi/iso-639-1 v1.1.0/go.mod h1:CSA53/Tx0xF9bk2DEA0Mr0wTdIxq7pqoVZgBOfoL5GI=
github.com/lostdusty/gobalt v1.0.5 h1:SdCW+tHDCBaRE/TYs8FPSUwgDLzinRUY5hlw5KC3flA=
github.com/lostdusty/gobalt v1.0.5/go.mod h1:gv+Hmbv0SC3lWpJvUvxJYRmmcuBjlmhKCIRskk0lSjY=
github.com/mergestat/timediff v0.0.3 h1:ucCNh4/ZrTPjFZ081PccNbhx9spymCJkFxSzgVuPU+Y=
github.com/mergestat/timediff v0.0.3/go.mod h1:yvMUaRu2oetc+9IbPLYBJviz6sA7xz8OXMDfhBl7YSI=
github.com/princessmortix/gobalt v1.0.1 h1:I5RfOb0cqzwscvFYnNUW1PbdKyjsDhSSLb/Lw/CR4Nc=
github.com/princessmortix/gobalt v1.0.1/go.mod h1:YMW28QoWjxXTY7N67+3H5hIqUDpzsLx4DIJG+I3H9OA=
github.com/princessmortix/gobalt v1.0.2 h1:dYxDG2KEUbljYT6lCMJ5ZsARoq79vscpMWXU/9t1Qdk=
github.com/princessmortix/gobalt v1.0.2/go.mod h1:YMW28QoWjxXTY7N67+3H5hIqUDpzsLx4DIJG+I3H9OA=
github.com/princessmortix/gobalt v1.0.4 h1:U6AXr1987W6iOfkKAF4kX4G/XcgoNDJlDiWdI9y+YGs=
github.com/princessmortix/gobalt v1.0.4/go.mod h1:YMW28QoWjxXTY7N67+3H5hIqUDpzsLx4DIJG+I3H9OA=
16 changes: 8 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (

"github.com/akamensky/argparse"
iso6391 "github.com/emvi/iso-639-1"
"github.com/lostdusty/gobalt"
"github.com/mergestat/timediff"
"github.com/princessmortix/gobalt"
)

func main() {
Expand Down Expand Up @@ -52,9 +52,9 @@ func main() {
Help: "Extract audio only",
Default: false,
})
optionTikTokWatermark := flagParser.Flag("w", "no-watermark", &argparse.Options{
optionVimeoDash := flagParser.Flag("h", "vimeo-dash", &argparse.Options{
Required: false,
Help: "Remove TikTok watermark from TikTok videos",
Help: "Downloads Vimeo videos using dash instead of progressive",
Default: false,
})
optionFullTikTokAudio := flagParser.Flag("t", "full-tiktok-audio", &argparse.Options{
Expand Down Expand Up @@ -176,7 +176,7 @@ func main() {
newSettings.DisableVideoMetadata = *optionDisableMetadata
newSettings.DubbedYoutubeAudio = *optionDubAudio
newSettings.FullTikTokAudio = *optionFullTikTokAudio
newSettings.RemoveTikTokWatermark = *optionTikTokWatermark
newSettings.UseVimeoDash = *optionVimeoDash
newSettings.Url = *URL
newSettings.VideoOnly = *optionVideoOnly
quality, err := strconv.Atoi(*optionVideoQuality)
Expand All @@ -200,13 +200,13 @@ func main() {

if *outputJson {
if cobaltRequest.Status == "picker" {
unmarshalOutput := map[string]interface{}{"error": "false", "message": cobaltRequest.Text, "urls": cobaltRequest.URLs}
unmarshalOutput := map[string]interface{}{"error": false, "message": cobaltRequest.Text, "urls": cobaltRequest.URLs}
output, _ := json.Marshal(unmarshalOutput)
fmt.Println(string(output))
os.Exit(0)
}

unmarshalOutput := map[string]interface{}{"error": "false", "message": cobaltRequest.Text, "urls": cobaltRequest.URL}
unmarshalOutput := map[string]interface{}{"error": false, "message": cobaltRequest.Text, "urls": cobaltRequest.URL}
output, _ := json.Marshal(unmarshalOutput)
fmt.Println(string(output))
os.Exit(0)
Expand Down Expand Up @@ -241,7 +241,7 @@ func checkStatus(api string, returnJson bool) {
}

if returnJson {
respJson := map[string]string{"error": "false",
respJson := map[string]interface{}{"error": false,
"message": "contact was successful",
"branch": check.Branch,
"commit": check.Commit,
Expand All @@ -263,7 +263,7 @@ func checkStatus(api string, returnJson bool) {
}

func errorJson(err error) string {
marshalThis := map[string]string{"error": "true",
marshalThis := map[string]interface{}{"error": true,
"message": fmt.Sprintf("%s", err),
"url": "",
}
Expand Down
10 changes: 5 additions & 5 deletions winres/winres.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"0409": {
"identity": {
"name": "cobalt",
"version": "1.0.0"
"version": "1.0.5"
},
"description": "cobalt cli version for https://cobalt.tools",
"minimum-os": "vista",
Expand All @@ -35,16 +35,16 @@
"#1": {
"0000": {
"fixed": {
"file_version": "1.0.0.0",
"product_version": "1.0.0.0",
"file_version": "1.0.0.5",
"product_version": "1.0.0.5",
"flags": "Release"
},
"info": {
"0409": {
"Comments": "cobalt cli downloader",
"CompanyName": "Princess Mortix",
"CompanyName": "Lost Dusty",
"FileDescription": "",
"FileVersion": "1.0.0",
"FileVersion": "1.0.5",
"InternalName": "",
"LegalCopyright": "",
"LegalTrademarks": "",
Expand Down

0 comments on commit 66169be

Please sign in to comment.