Change name due to organization move

This commit is contained in:
bytedream 2022-07-07 21:21:44 +02:00
parent d65226252d
commit f1a41d6d3b
13 changed files with 44 additions and 46 deletions

View file

@ -6,7 +6,7 @@ DESTDIR=
PREFIX=/usr PREFIX=/usr
build: 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: clean:
rm -f $(BINARY_NAME) $(VERSION_BINARY_NAME)_* rm -f $(BINARY_NAME) $(VERSION_BINARY_NAME)_*
@ -24,8 +24,8 @@ uninstall:
rm -f $(DESTDIR)$(PREFIX)/share/licenses/crunchyroll-go/LICENSE rm -f $(DESTDIR)$(PREFIX)/share/licenses/crunchyroll-go/LICENSE
release: 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=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/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=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/ByteDream/crunchyroll-go/v2/cmd/crunchyroll-go/cmd.Version=$(VERSION)'" -o $(VERSION_BINARY_NAME)_darwin 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 strip $(VERSION_BINARY_NAME)_linux

View file

@ -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. 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.
<p align="center"> <p align="center">
<a href="https://github.com/ByteDream/crunchy-cli"> <a href="https://github.com/crunchy-labs/crunchy-cli">
<img src="https://img.shields.io/github/languages/code-size/ByteDream/crunchy-cli?style=flat-square" alt="Code size"> <img src="https://img.shields.io/github/languages/code-size/crunchy-labs/crunchy-cli?style=flat-square" alt="Code size">
</a> </a>
<a href="https://github.com/ByteDream/crunchy-cli/releases/latest"> <a href="https://github.com/crunchy-labs/crunchy-cli/releases/latest">
<img src="https://img.shields.io/github/downloads/ByteDream/crunchy-cli/total?style=flat-square" alt="Download Badge"> <img src="https://img.shields.io/github/downloads/crunchy-labs/crunchy-cli/total?style=flat-square" alt="Download Badge">
</a> </a>
<a href="https://github.com/ByteDream/crunchy-cli/blob/master/LICENSE"> <a href="https://github.com/crunchy-labs/crunchy-cli/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/ByteDream/crunchy-cli?style=flat-square" alt="License"> <img src="https://img.shields.io/github/license/crunchy-labs/crunchy-cli?style=flat-square" alt="License">
</a> </a>
<a href="https://golang.org"> <a href="https://golang.org">
<img src="https://img.shields.io/github/go-mod/go-version/ByteDream/crunchy-cli?style=flat-square" alt="Go version"> <img src="https://img.shields.io/github/go-mod/go-version/crunchy-labs/crunchy-cli?style=flat-square" alt="Go version">
</a> </a>
<a href="https://github.com/ByteDream/crunchy-cli/releases/latest"> <a href="https://github.com/crunchy-labs/crunchy-cli/releases/latest">
<img src="https://img.shields.io/github/v/release/ByteDream/crunchy-cli?style=flat-square" alt="Release"> <img src="https://img.shields.io/github/v/release/crunchy-labs/crunchy-cli?style=flat-square" alt="Release">
</a> </a>
<a href="https://discord.gg/gUWwekeNNg"> <a href="https://discord.gg/gUWwekeNNg">
<img src="https://img.shields.io/discord/915659846836162561?label=discord&style=flat-square" alt="Discord"> <img src="https://img.shields.io/discord/915659846836162561?label=discord&style=flat-square" alt="Discord">
</a> </a>
<a href="https://github.com/ByteDream/crunchy-cli/actions/workflows/ci.yml"> <a href="https://github.com/crunchy-labs/crunchy-cli/actions/workflows/ci.yml">
<img src="https://github.com/ByteDream/crunchy-cli/workflows/CI/badge.svg?style=flat" alt="CI"> <img src="https://github.com/crunchy-labs/crunchy-cli/workflows/CI/badge.svg?style=flat" alt="CI">
</a> </a>
</p> </p>
@ -35,7 +35,7 @@ A [go](https://golang.org) written cli client for [crunchyroll](https://www.crun
</p> </p>
_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. _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 # 🖥️ CLI
@ -47,10 +47,10 @@ See [#39](https://github.com/ByteDream/crunchy-cli/issues/39) for more informati
## 💾 Get the executable ## 💾 Get the executable
- 📥 Download the latest binaries [here](https://github.com/ByteDream/crunchy-cli/releases/latest) or get it from below: - 📥 Download the latest binaries [here](https://github.com/crunchy-labs/crunchy-cli/releases/latest) or get it from below:
- [Linux (x64)](https://smartrelease.bytedream.org/github/ByteDream/crunchy-cli/crunchy-{tag}_linux) - [Linux (x64)](https://smartrelease.crunchy-labs.org/github/crunchy-labs/crunchy-cli/crunchy-{tag}_linux)
- [Windows (x64)](https://smartrelease.bytedream.org/github/ByteDream/crunchy-cli/crunchy-{tag}_windows.exe) - [Windows (x64)](https://smartrelease.crunchy-labs.org/github/crunchy-labs/crunchy-cli/crunchy-{tag}_windows.exe)
- [MacOS (x64)](https://smartrelease.bytedream.org/github/ByteDream/crunchy-cli/crunchy-{tag}_darwin) - [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/): - 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 ```shell
$ yay -S crunchyroll-go $ yay -S crunchyroll-go
@ -65,24 +65,24 @@ See [#39](https://github.com/ByteDream/crunchy-cli/issues/39) for more informati
</del> </del>
<i>Currently not working because the repo got renamed!</i> <i>Currently not working because the repo got renamed!</i>
- 🛠 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): - use `make` (requires `go` to be installed):
```shell ```shell
$ git clone https://github.com/ByteDream/crunchy-cli $ git clone https://github.com/crunchy-labs/crunchy-cli
$ cd crunchy-cli $ cd crunchy-cli
$ make $ make
$ sudo make install # <- only if you want to install it on your system $ sudo make install # <- only if you want to install it on your system
``` ```
- use `go`: - use `go`:
```shell ```shell
$ git clone https://github.com/ByteDream/crunchy-cli $ git clone https://github.com/crunchy-labs/crunchy-cli
$ cd crunchy-cli $ cd crunchy-cli
$ go build -o crunchy . $ go build -o crunchy .
``` ```
## 📝 Examples ## 📝 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 ### 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. | | `-l` | `--language` | Audio locale which should be downloaded. Can be used multiple times. |
| `-d` | `--directory` | Directory to download the video(s) to. | | `-d` | `--directory` | Directory to download the video(s) to. |
| `-o` | `--output` | Name of the output file. | | `-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). | | `-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. | | `-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. | | `-g` | `--goroutines` | Sets how many parallel segment downloads should be used. |

View file

@ -8,8 +8,8 @@ import (
"compress/gzip" "compress/gzip"
"context" "context"
"fmt" "fmt"
"github.com/ByteDream/crunchyroll-go/v2" "github.com/crunchy-labs/crunchyroll-go/v2"
"github.com/ByteDream/crunchyroll-go/v2/utils" "github.com/crunchy-labs/crunchyroll-go/v2/utils"
"github.com/grafov/m3u8" "github.com/grafov/m3u8"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"io" "io"
@ -187,7 +187,7 @@ func archive(urls []string) error {
if err != nil { if err != nil {
out.StopProgress("Failed to parse url %d", i+1) 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, " + 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 return err
} }
out.StopProgress("Parsed url %d", i+1) out.StopProgress("Parsed url %d", i+1)

View file

@ -3,8 +3,8 @@ package cmd
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/ByteDream/crunchyroll-go/v2" "github.com/crunchy-labs/crunchyroll-go/v2"
"github.com/ByteDream/crunchyroll-go/v2/utils" "github.com/crunchy-labs/crunchyroll-go/v2/utils"
"github.com/grafov/m3u8" "github.com/grafov/m3u8"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"math" "math"
@ -133,7 +133,7 @@ func download(urls []string) error {
if err != nil { if err != nil {
out.StopProgress("Failed to parse url %d", i+1) 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, " + 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 return err
} }
out.StopProgress("Parsed url %d", i+1) out.StopProgress("Parsed url %d", i+1)

View file

@ -2,7 +2,7 @@ package cmd
import ( import (
"fmt" "fmt"
"github.com/ByteDream/crunchyroll-go/v2" "github.com/crunchy-labs/crunchyroll-go/v2"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"os" "os"
"path/filepath" "path/filepath"

View file

@ -3,7 +3,7 @@ package cmd
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/ByteDream/crunchyroll-go/v2" "github.com/crunchy-labs/crunchyroll-go/v2"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"net/http" "net/http"
"os" "os"
@ -29,7 +29,7 @@ var (
var rootCmd = &cobra.Command{ var rootCmd = &cobra.Command{
Use: "crunchyroll-go", Use: "crunchyroll-go",
Version: Version, 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, SilenceErrors: true,
SilenceUsage: true, SilenceUsage: true,

View file

@ -2,8 +2,8 @@ package cmd
import ( import (
"fmt" "fmt"
"github.com/ByteDream/crunchyroll-go/v2" "github.com/crunchy-labs/crunchyroll-go/v2"
"github.com/ByteDream/crunchyroll-go/v2/utils" "github.com/crunchy-labs/crunchyroll-go/v2/utils"
"net/http" "net/http"
"net/url" "net/url"
"os" "os"

View file

@ -1,7 +1,7 @@
package main package main
import ( import (
"github.com/ByteDream/crunchyroll-go/v2/cmd/crunchyroll-go/cmd" "github.com/crunchy-labs/crunchyroll-go/v2/cmd/crunchyroll-go/cmd"
) )
func main() { func main() {

View file

@ -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. 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 .SH AUTHOR
ByteDream Crunchy Labs
.br .br
Source: https://github.com/ByteDream/crunchyroll-go Source: https://github.com/crunchy-labs/crunchyroll-go
.SH COPYRIGHT .SH COPYRIGHT
Copyright (C) 2022 ByteDream Copyright (C) 2022 Crunchy Labs
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public

View file

@ -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 // Deprecated: Use Search instead. The first result sometimes isn't the correct one
// so this function is inaccurate in some cases. // 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) { func (c *Crunchyroll) FindVideoByName(seriesName string) (Video, error) {
s, m, err := c.Search(seriesName, 1) s, m, err := c.Search(seriesName, 1)
if err != nil { if err != nil {

2
go.mod
View file

@ -1,4 +1,4 @@
module github.com/ByteDream/crunchyroll-go/v2 module github.com/crunchy-labs/crunchyroll-go/v2
go 1.18 go 1.18

View file

@ -1,8 +1,6 @@
package utils package utils
import ( import "github.com/crunchy-labs/crunchyroll-go/v2"
"github.com/ByteDream/crunchyroll-go/v2"
)
// AllLocales is an array of all available locales. // AllLocales is an array of all available locales.
var AllLocales = []crunchyroll.LOCALE{ var AllLocales = []crunchyroll.LOCALE{

View file

@ -1,7 +1,7 @@
package utils package utils
import ( import (
"github.com/ByteDream/crunchyroll-go/v2" "github.com/crunchy-labs/crunchyroll-go/v2"
"sort" "sort"
"strconv" "strconv"
"strings" "strings"