Compare commits
6 Commits
v1.1.0
...
v1.1.1-alp
| Author | SHA1 | Date | |
|---|---|---|---|
| aa64e000ee | |||
| 5121438ffc | |||
| 46dbf2d64f | |||
| 6b13e54fb5 | |||
| 9a2497c244 | |||
| bb8193b504 |
@@ -12,6 +12,7 @@ before:
|
|||||||
hooks:
|
hooks:
|
||||||
# You may remove this if you don't use go modules.
|
# You may remove this if you don't use go modules.
|
||||||
- go mod tidy
|
- go mod tidy
|
||||||
|
- go test ./...
|
||||||
|
|
||||||
builds:
|
builds:
|
||||||
- env:
|
- env:
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [v1.1.1] - 2023-11-26
|
||||||
|
|
||||||
|
- Fix bug where a brand-new config was created with an out-of-date version
|
||||||
|
- Fix for portable mode and using executable in the current working directory
|
||||||
|
|
||||||
## [v1.1.0] - 2023-11-25
|
## [v1.1.0] - 2023-11-25
|
||||||
|
|
||||||
- Add feature to bulk add URL's for downloading
|
- Add feature to bulk add URL's for downloading
|
||||||
|
|||||||
@@ -164,6 +164,14 @@ Note that this also means that `yt-dlp` can resume partially downloaded files, a
|
|||||||
also automatically 'backfill', downloading only files that have not been
|
also automatically 'backfill', downloading only files that have not been
|
||||||
downloaded yet from that playlist.
|
downloaded yet from that playlist.
|
||||||
|
|
||||||
|
## Downloading a list of URL's in bulk
|
||||||
|
|
||||||
|
From main index page you can click the "Bulk" link in the menu to bring up the
|
||||||
|
bulk queue page.
|
||||||
|
|
||||||
|
In all respects this acts the same as the usual bookmarklet, but it has a
|
||||||
|
textbox for pasting many URLs at once. All downloads will be queued immediately.
|
||||||
|
|
||||||
## Portable mode
|
## Portable mode
|
||||||
|
|
||||||
If you'd like to use gropple from a USB stick or similar, copy the config file
|
If you'd like to use gropple from a USB stick or similar, copy the config file
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
|
|
||||||
open my $fh, "<", "main.go" || die $!;
|
|
||||||
|
|
||||||
my $version;
|
|
||||||
while (<$fh>) {
|
|
||||||
# CurrentVersion: "v0.04"
|
|
||||||
$version = $1 if /CurrentVersion:\s*"(v.*?)"/;
|
|
||||||
}
|
|
||||||
close $fh;
|
|
||||||
|
|
||||||
die "no version?" unless defined $version;
|
|
||||||
|
|
||||||
# quit if tests fail
|
|
||||||
system("go test ./...") && die "not building release with failing tests";
|
|
||||||
|
|
||||||
# so lazy
|
|
||||||
system "rm", "-rf", "release", "dist";
|
|
||||||
system "mkdir", "release";
|
|
||||||
system "mkdir", "dist";
|
|
||||||
|
|
||||||
my %build = (
|
|
||||||
win => { env => { GOOS => 'windows', GOARCH => 'amd64' }, filename => 'gropple.exe' },
|
|
||||||
linux => { env => { GOOS => 'linux', GOARCH => 'amd64' }, filename => 'gropple' },
|
|
||||||
mac => { env => { GOOS => 'darwin', GOARCH => 'amd64' }, filename => 'gropple' },
|
|
||||||
);
|
|
||||||
|
|
||||||
foreach my $type (keys %build) {
|
|
||||||
mkdir "release/$type";
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach my $type (keys %build) {
|
|
||||||
local $ENV{GOOS} = $build{$type}->{env}->{GOOS};
|
|
||||||
local $ENV{GOARCH} = $build{$type}->{env}->{GOARCH};
|
|
||||||
system "go", "build", "-o", "release/$type/" . $build{$type}->{filename};
|
|
||||||
system "zip", "-j", "dist/gropple-$type-$version.zip", ( glob "release/$type/*" );
|
|
||||||
}
|
|
||||||
|
|
||||||
# now docker
|
|
||||||
exit 0;
|
|
||||||
$ENV{VERSION}="$version";
|
|
||||||
system "docker-compose", "-f", "docker-compose.build.yml", "build";
|
|
||||||
system "docker", "tag", "tardisx/gropple:$version", "tardisx/gropple:latest";
|
|
||||||
system "docker", "push", "tardisx/gropple:$version";
|
|
||||||
system "docker", "push", "tardisx/gropple:latest";
|
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ type ConfigService struct {
|
|||||||
func (cs *ConfigService) LoadTestConfig() {
|
func (cs *ConfigService) LoadTestConfig() {
|
||||||
cs.LoadDefaultConfig()
|
cs.LoadDefaultConfig()
|
||||||
cs.Config.Server.DownloadPath = "/tmp"
|
cs.Config.Server.DownloadPath = "/tmp"
|
||||||
cs.Config.DownloadProfiles = []DownloadProfile{{Name: "test profile", Command: "sleep", Args: []string{"5"}}}
|
cs.Config.DownloadProfiles = []DownloadProfile{{Name: "test profile", Command: "/bin/sleep", Args: []string{"5"}}}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cs *ConfigService) LoadDefaultConfig() {
|
func (cs *ConfigService) LoadDefaultConfig() {
|
||||||
@@ -98,7 +98,7 @@ func (cs *ConfigService) LoadDefaultConfig() {
|
|||||||
defaultConfig.Destinations = nil
|
defaultConfig.Destinations = nil
|
||||||
defaultConfig.DownloadOptions = make([]DownloadOption, 0)
|
defaultConfig.DownloadOptions = make([]DownloadOption, 0)
|
||||||
|
|
||||||
defaultConfig.ConfigVersion = 3
|
defaultConfig.ConfigVersion = 4
|
||||||
|
|
||||||
cs.Config = &defaultConfig
|
cs.Config = &defaultConfig
|
||||||
|
|
||||||
|
|||||||
@@ -282,8 +282,15 @@ func (dl *Download) Begin() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dl.Log = append(dl.Log, fmt.Sprintf("executing: %s with args: %s", dl.DownloadProfile.Command, strings.Join(cmdSlice, " ")))
|
dl.Log = append(dl.Log, fmt.Sprintf("executing: %s with args: %s", dl.DownloadProfile.Command, strings.Join(cmdSlice, " ")))
|
||||||
cmd := exec.Command(dl.DownloadProfile.Command, cmdSlice...)
|
|
||||||
|
execAbsolutePath, err := filepath.Abs(dl.DownloadProfile.Command)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd := exec.Command(execAbsolutePath, cmdSlice...)
|
||||||
cmd.Dir = dl.Config.Server.DownloadPath
|
cmd.Dir = dl.Config.Server.DownloadPath
|
||||||
|
log.Printf("Executing command: %v (executable: %s) in %s", cmd, execAbsolutePath, dl.Config.Server.DownloadPath)
|
||||||
|
|
||||||
stdout, err := cmd.StdoutPipe()
|
stdout, err := cmd.StdoutPipe()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -307,9 +314,10 @@ func (dl *Download) Begin() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("Executing command: %v", cmd)
|
|
||||||
err = cmd.Start()
|
err = cmd.Start()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Printf("Executing command failed: %s", err.Error())
|
||||||
|
|
||||||
dl.State = STATE_FAILED
|
dl.State = STATE_FAILED
|
||||||
dl.Finished = true
|
dl.Finished = true
|
||||||
dl.FinishedTS = time.Now()
|
dl.FinishedTS = time.Now()
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -15,7 +15,7 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
versionInfo := &version.Manager{
|
versionInfo := &version.Manager{
|
||||||
VersionInfo: version.Info{CurrentVersion: "v1.1.0"},
|
VersionInfo: version.Info{CurrentVersion: "v1.1.1-alpha.1"},
|
||||||
}
|
}
|
||||||
log.Printf("Starting gropple %s - https://github.com/tardisx/gropple", versionInfo.GetInfo().CurrentVersion)
|
log.Printf("Starting gropple %s - https://github.com/tardisx/gropple", versionInfo.GetInfo().CurrentVersion)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user