From f1a41d6d3b66744b0f9df52dd9da712232f18cd4 Mon Sep 17 00:00:00 2001
From: bytedream
Date: Thu, 7 Jul 2022 21:21:44 +0200
Subject: [PATCH] Change name due to organization move
---
Makefile | 8 +++---
README.md | 42 +++++++++++++++---------------
cmd/crunchyroll-go/cmd/archive.go | 6 ++---
cmd/crunchyroll-go/cmd/download.go | 6 ++---
cmd/crunchyroll-go/cmd/login.go | 2 +-
cmd/crunchyroll-go/cmd/root.go | 4 +--
cmd/crunchyroll-go/cmd/utils.go | 4 +--
cmd/crunchyroll-go/main.go | 2 +-
crunchyroll-go.1 | 6 ++---
crunchyroll.go | 2 +-
go.mod | 2 +-
utils/locale.go | 4 +--
utils/sort.go | 2 +-
13 files changed, 44 insertions(+), 46 deletions(-)
diff --git a/Makefile b/Makefile
index 3dd5c3e..44662f1 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ DESTDIR=
PREFIX=/usr
build:
- go build -ldflags "-X 'github.com/ByteDream/crunchyroll-go/v2/cmd/crunchyroll-go/cmd.Version=$(VERSION)'" -o $(BINARY_NAME) cmd/crunchyroll-go/main.go
+ go build -ldflags "-X 'github.com/crunchy-labs/crunchyroll-go/v2/cmd/crunchyroll-go/cmd.Version=$(VERSION)'" -o $(BINARY_NAME) cmd/crunchyroll-go/main.go
clean:
rm -f $(BINARY_NAME) $(VERSION_BINARY_NAME)_*
@@ -24,8 +24,8 @@ uninstall:
rm -f $(DESTDIR)$(PREFIX)/share/licenses/crunchyroll-go/LICENSE
release:
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X 'github.com/ByteDream/crunchyroll-go/v2/cmd/crunchyroll-go/cmd.Version=$(VERSION)'" -o $(VERSION_BINARY_NAME)_linux cmd/crunchyroll-go/main.go
- CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-X 'github.com/ByteDream/crunchyroll-go/v2/cmd/crunchyroll-go/cmd.Version=$(VERSION)'" -o $(VERSION_BINARY_NAME)_windows.exe cmd/crunchyroll-go/main.go
- CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-X 'github.com/ByteDream/crunchyroll-go/v2/cmd/crunchyroll-go/cmd.Version=$(VERSION)'" -o $(VERSION_BINARY_NAME)_darwin cmd/crunchyroll-go/main.go
+ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X 'github.com/crunchy-labs/crunchyroll-go/v2/cmd/crunchyroll-go/cmd.Version=$(VERSION)'" -o $(VERSION_BINARY_NAME)_linux cmd/crunchyroll-go/main.go
+ CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-X 'github.com/crunchy-labs/crunchyroll-go/v2/cmd/crunchyroll-go/cmd.Version=$(VERSION)'" -o $(VERSION_BINARY_NAME)_windows.exe cmd/crunchyroll-go/main.go
+ CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-X 'github.com/crunchy-labs/crunchyroll-go/v2/cmd/crunchyroll-go/cmd.Version=$(VERSION)'" -o $(VERSION_BINARY_NAME)_darwin cmd/crunchyroll-go/main.go
strip $(VERSION_BINARY_NAME)_linux
diff --git a/README.md b/README.md
index b6d960f..df75ec8 100644
--- a/README.md
+++ b/README.md
@@ -3,26 +3,26 @@
A [go](https://golang.org) written cli client for [crunchyroll](https://www.crunchyroll.com). To use it, you need a crunchyroll premium account to for full (api) access.
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
@@ -35,7 +35,7 @@ A [go](https://golang.org) written cli client for [crunchyroll](https://www.crun
_This repo was former known as **crunchyroll-go** (which still exists but now contains only the library part) but got split up into two separate repositories to provide more flexibility.
-See [#39](https://github.com/ByteDream/crunchy-cli/issues/39) for more information._
+See [#39](https://github.com/crunchy-labs/crunchy-cli/issues/39) for more information._
# 🖥️ CLI
@@ -47,10 +47,10 @@ See [#39](https://github.com/ByteDream/crunchy-cli/issues/39) for more informati
## 💾 Get the executable
-- 📥 Download the latest binaries [here](https://github.com/ByteDream/crunchy-cli/releases/latest) or get it from below:
- - [Linux (x64)](https://smartrelease.bytedream.org/github/ByteDream/crunchy-cli/crunchy-{tag}_linux)
- - [Windows (x64)](https://smartrelease.bytedream.org/github/ByteDream/crunchy-cli/crunchy-{tag}_windows.exe)
- - [MacOS (x64)](https://smartrelease.bytedream.org/github/ByteDream/crunchy-cli/crunchy-{tag}_darwin)
+- 📥 Download the latest binaries [here](https://github.com/crunchy-labs/crunchy-cli/releases/latest) or get it from below:
+ - [Linux (x64)](https://smartrelease.crunchy-labs.org/github/crunchy-labs/crunchy-cli/crunchy-{tag}_linux)
+ - [Windows (x64)](https://smartrelease.crunchy-labs.org/github/crunchy-labs/crunchy-cli/crunchy-{tag}_windows.exe)
+ - [MacOS (x64)](https://smartrelease.crunchy-labs.org/github/crunchy-labs/crunchy-cli/crunchy-{tag}_darwin)
- If you use Arch btw. or any other Linux distro which is based on Arch Linux, you can download the package via the [AUR](https://aur.archlinux.org/packages/crunchyroll-go/):
```shell
$ yay -S crunchyroll-go
@@ -65,24 +65,24 @@ See [#39](https://github.com/ByteDream/crunchy-cli/issues/39) for more informati
Currently not working because the repo got renamed!
-- 🛠 Build it yourself. Must be done if your target platform is not covered by the [provided binaries](https://github.com/ByteDream/crunchy-cli/releases/latest) (like Raspberry Pi or M1 Mac):
+- 🛠 Build it yourself. Must be done if your target platform is not covered by the [provided binaries](https://github.com/crunchy-labs/crunchy-cli/releases/latest) (like Raspberry Pi or M1 Mac):
- use `make` (requires `go` to be installed):
```shell
- $ git clone https://github.com/ByteDream/crunchy-cli
+ $ git clone https://github.com/crunchy-labs/crunchy-cli
$ cd crunchy-cli
$ make
$ sudo make install # <- only if you want to install it on your system
```
- use `go`:
```shell
- $ git clone https://github.com/ByteDream/crunchy-cli
+ $ git clone https://github.com/crunchy-labs/crunchy-cli
$ cd crunchy-cli
$ go build -o crunchy .
```
## 📝 Examples
-_Before reading_: Because of the huge functionality not all cases can be covered in the README. Make sure to check the [wiki](https://github.com/ByteDream/crunchy-cli/wiki/Cli), further usages and options are described there.
+_Before reading_: Because of the huge functionality not all cases can be covered in the README. Make sure to check the [wiki](https://github.com/crunchy-labs/crunchy-cli/wiki/Cli), further usages and options are described there.
### Login
@@ -169,7 +169,7 @@ The following flags can be (optional) passed to modify the [archive](#archive) p
| `-l` | `--language` | Audio locale which should be downloaded. Can be used multiple times. |
| `-d` | `--directory` | Directory to download the video(s) to. |
| `-o` | `--output` | Name of the output file. |
-| `-m` | `--merge` | Sets the behavior of the stream merging. Valid behaviors are 'auto', 'audio', 'video'. See the [wiki](https://github.com/ByteDream/crunchy-cli/wiki/Cli#archive) for more information. |
+| `-m` | `--merge` | Sets the behavior of the stream merging. Valid behaviors are 'auto', 'audio', 'video'. See the [wiki](https://github.com/crunchy-labs/crunchy-cli/wiki/Cli#archive) for more information. |
| `-c` | `--compress` | If is set, all output will be compresses into an archive. This flag sets the name of the compressed output file and the file ending specifies the compression algorithm (gzip, tar, zip are supported). |
| `-r` | `--resolution` | The resolution of the video(s). `best` for best resolution, `worst` for worst. |
| `-g` | `--goroutines` | Sets how many parallel segment downloads should be used. |
diff --git a/cmd/crunchyroll-go/cmd/archive.go b/cmd/crunchyroll-go/cmd/archive.go
index 6dcf61b..baa90e5 100644
--- a/cmd/crunchyroll-go/cmd/archive.go
+++ b/cmd/crunchyroll-go/cmd/archive.go
@@ -8,8 +8,8 @@ import (
"compress/gzip"
"context"
"fmt"
- "github.com/ByteDream/crunchyroll-go/v2"
- "github.com/ByteDream/crunchyroll-go/v2/utils"
+ "github.com/crunchy-labs/crunchyroll-go/v2"
+ "github.com/crunchy-labs/crunchyroll-go/v2/utils"
"github.com/grafov/m3u8"
"github.com/spf13/cobra"
"io"
@@ -187,7 +187,7 @@ func archive(urls []string) error {
if err != nil {
out.StopProgress("Failed to parse url %d", i+1)
out.Debug("If the error says no episodes could be found but the passed url is correct and a crunchyroll classic url, " +
- "try the corresponding crunchyroll beta url instead and try again. See https://github.com/ByteDream/crunchyroll-go/issues/22 for more information")
+ "try the corresponding crunchyroll beta url instead and try again. See https://github.com/crunchy-labs/crunchyroll-go/issues/22 for more information")
return err
}
out.StopProgress("Parsed url %d", i+1)
diff --git a/cmd/crunchyroll-go/cmd/download.go b/cmd/crunchyroll-go/cmd/download.go
index 92b6027..063a2f7 100644
--- a/cmd/crunchyroll-go/cmd/download.go
+++ b/cmd/crunchyroll-go/cmd/download.go
@@ -3,8 +3,8 @@ package cmd
import (
"context"
"fmt"
- "github.com/ByteDream/crunchyroll-go/v2"
- "github.com/ByteDream/crunchyroll-go/v2/utils"
+ "github.com/crunchy-labs/crunchyroll-go/v2"
+ "github.com/crunchy-labs/crunchyroll-go/v2/utils"
"github.com/grafov/m3u8"
"github.com/spf13/cobra"
"math"
@@ -133,7 +133,7 @@ func download(urls []string) error {
if err != nil {
out.StopProgress("Failed to parse url %d", i+1)
out.Debug("If the error says no episodes could be found but the passed url is correct and a crunchyroll classic url, " +
- "try the corresponding crunchyroll beta url instead and try again. See https://github.com/ByteDream/crunchyroll-go/issues/22 for more information")
+ "try the corresponding crunchyroll beta url instead and try again. See https://github.com/crunchy-labs/crunchyroll-go/issues/22 for more information")
return err
}
out.StopProgress("Parsed url %d", i+1)
diff --git a/cmd/crunchyroll-go/cmd/login.go b/cmd/crunchyroll-go/cmd/login.go
index c9fc923..d5cc993 100644
--- a/cmd/crunchyroll-go/cmd/login.go
+++ b/cmd/crunchyroll-go/cmd/login.go
@@ -2,7 +2,7 @@ package cmd
import (
"fmt"
- "github.com/ByteDream/crunchyroll-go/v2"
+ "github.com/crunchy-labs/crunchyroll-go/v2"
"github.com/spf13/cobra"
"os"
"path/filepath"
diff --git a/cmd/crunchyroll-go/cmd/root.go b/cmd/crunchyroll-go/cmd/root.go
index 82ee133..8acdefe 100644
--- a/cmd/crunchyroll-go/cmd/root.go
+++ b/cmd/crunchyroll-go/cmd/root.go
@@ -3,7 +3,7 @@ package cmd
import (
"context"
"fmt"
- "github.com/ByteDream/crunchyroll-go/v2"
+ "github.com/crunchy-labs/crunchyroll-go/v2"
"github.com/spf13/cobra"
"net/http"
"os"
@@ -29,7 +29,7 @@ var (
var rootCmd = &cobra.Command{
Use: "crunchyroll-go",
Version: Version,
- Short: "Download crunchyroll videos with ease. See the wiki for details about the cli and library: https://github.com/ByteDream/crunchyroll-go/wiki",
+ Short: "Download crunchyroll videos with ease. See the wiki for details about the cli and library: https://github.com/crunchy-labs/crunchyroll-go/wiki",
SilenceErrors: true,
SilenceUsage: true,
diff --git a/cmd/crunchyroll-go/cmd/utils.go b/cmd/crunchyroll-go/cmd/utils.go
index 2a632ff..8df50f1 100644
--- a/cmd/crunchyroll-go/cmd/utils.go
+++ b/cmd/crunchyroll-go/cmd/utils.go
@@ -2,8 +2,8 @@ package cmd
import (
"fmt"
- "github.com/ByteDream/crunchyroll-go/v2"
- "github.com/ByteDream/crunchyroll-go/v2/utils"
+ "github.com/crunchy-labs/crunchyroll-go/v2"
+ "github.com/crunchy-labs/crunchyroll-go/v2/utils"
"net/http"
"net/url"
"os"
diff --git a/cmd/crunchyroll-go/main.go b/cmd/crunchyroll-go/main.go
index a502afb..48a4088 100644
--- a/cmd/crunchyroll-go/main.go
+++ b/cmd/crunchyroll-go/main.go
@@ -1,7 +1,7 @@
package main
import (
- "github.com/ByteDream/crunchyroll-go/v2/cmd/crunchyroll-go/cmd"
+ "github.com/crunchy-labs/crunchyroll-go/v2/cmd/crunchyroll-go/cmd"
)
func main() {
diff --git a/crunchyroll-go.1 b/crunchyroll-go.1
index 558aa23..e6141f4 100644
--- a/crunchyroll-go.1
+++ b/crunchyroll-go.1
@@ -184,12 +184,12 @@ $ crunchyroll-go archive -c "ditf.tar.gz" https://beta.crunchyroll.com/series/GY
If you notice any bug or want an enhancement, feel free to create a new issue or pull request in the GitHub repository.
.SH AUTHOR
-ByteDream
+Crunchy Labs
.br
-Source: https://github.com/ByteDream/crunchyroll-go
+Source: https://github.com/crunchy-labs/crunchyroll-go
.SH COPYRIGHT
-Copyright (C) 2022 ByteDream
+Copyright (C) 2022 Crunchy Labs
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/crunchyroll.go b/crunchyroll.go
index dcfc375..6f221f6 100644
--- a/crunchyroll.go
+++ b/crunchyroll.go
@@ -337,7 +337,7 @@ func (c *Crunchyroll) Search(query string, limit uint) (s []*Series, m []*Movie,
//
// Deprecated: Use Search instead. The first result sometimes isn't the correct one
// so this function is inaccurate in some cases.
-// See https://github.com/ByteDream/crunchyroll-go/issues/22 for more information.
+// See https://github.com/crunchy-labs/crunchyroll-go/issues/22 for more information.
func (c *Crunchyroll) FindVideoByName(seriesName string) (Video, error) {
s, m, err := c.Search(seriesName, 1)
if err != nil {
diff --git a/go.mod b/go.mod
index 99877f2..15cf1e1 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/ByteDream/crunchyroll-go/v2
+module github.com/crunchy-labs/crunchyroll-go/v2
go 1.18
diff --git a/utils/locale.go b/utils/locale.go
index 537b165..fbedd6a 100644
--- a/utils/locale.go
+++ b/utils/locale.go
@@ -1,8 +1,6 @@
package utils
-import (
- "github.com/ByteDream/crunchyroll-go/v2"
-)
+import "github.com/crunchy-labs/crunchyroll-go/v2"
// AllLocales is an array of all available locales.
var AllLocales = []crunchyroll.LOCALE{
diff --git a/utils/sort.go b/utils/sort.go
index a44717d..a98f858 100644
--- a/utils/sort.go
+++ b/utils/sort.go
@@ -1,7 +1,7 @@
package utils
import (
- "github.com/ByteDream/crunchyroll-go/v2"
+ "github.com/crunchy-labs/crunchyroll-go/v2"
"sort"
"strconv"
"strings"