Crunchyroll Go Versions Save

📚 A Crunchyroll (beta) API implementation in Go

v2.0.1

2 years ago

?️ CLI

  • Fix slice bounds out of range error when archiving with -l all (#18).
  • Disable subtitle sorting after archiving via -l specified languages (if -l en-US -l de-DE, the first subtitle language will be en-US, the second de-DE) by default. Set the environment variable SORT_SUBTITLES=1 before executing to enable it.
  • Fix terminal size calculation which caused crashes on some systems.
  • Add newline when the download fails while the progress bar is still active (like the error message at the end in #18)

? Library

  • Fix subtitle sorting by locale not sorting correctly (it converts the locale to a language string now and sorts this).

? Others

  • Makefile now contains a clean target.
  • Makefile install target creates a symbolic link to the second binary now instead of copying.

v2.0.0

2 years ago

Version 2.0.0 is here! ?

The primary focus of this new version is the rewrite of the cli (command line interface). It was a huge mess since the first release but it worked so I didn't see any reason why rewrite it / clean it up. In terms of implementing new features and fix bugs faster, I finally decided to rewrite it and this was a very good choice. New features were added and the code is much more readable now.

?️ CLI

  • A new command was added: archive:
    • It downloads the given videos into an .mkv file, with all available (soft) subtitles.
    • Default audio locales are japanese and your system language (if available) but you can set more or less with the --language flag.
    • Built-in compression:
      • Must be activated by set the --compress flag to an file name.
      • Supports .tar.gz (gzip), .tar (tar) and .zip (zip) which can be set with the file ending of the --compress flag.
    • NOTE: Because of local restrictions (or other reasons) some episodes with different languages does not have the same length (because some scenes were cut out, for example). I originally planned to only download the japanese video and extracting the audios of episodes with other languages and adding them to the video stream. But because of this length differences it is possible that the audios does not match to the video. See the next point for more information.
    • The --merge flag sets the behavior for different audios. audio stores one video and only the audio of all other languages, video stores all videos of the given languages and their audio, auto (which is the default) only behaves like video if the length of two videos are different (and only for the two videos), else like audio.
  • Episode filtering is now supported. If you want, for example, download only a specific season of an anime but do not want to pass all urls of the episodes, you now can specify which episodes and / or seasons you want to download. See the wiki for more details.
  • Added --persistent flag to the login command to store credentials persistent on the computer.
  • The download command parses every url individually. This means url 2 is parsed when all episodes from url 1 were downloaded, url 3 is parsed when all episodes from url 2 were downloaded and so on. May reduce the traffic to the crunchyroll api when the user decides to stop the download in the middle and, for example, 2 out of 5 urls got parsed but not used.
  • The --directory flag can now contain the same format patterns as --output.
  • Removed --color, --only-sub, --no-hardsub and --alternative-progress flag since they have no really use (in my opinion).
  • The temporary directory is now removed correctly (this sometimes didn't happen with the old downloader).
  • Some downloads with more than one season won't cause weird behavior anymore (#16).

? Library

  • Internal caching: Requests are now cached by default, so no matter how often you call a method which needs api data, the request itself is only made once.
  • More high level design. Working with the bare bones api v1 was always a high effort, for this reason the (now removed) utils.Structure struct came shipped since the first version to simplify the working with the api. It was simply too low level for an api like this.
  • Because of the more high level design the utils.Structure struct is no longer needed and removed.
  • The downloading was also redesigned. If you want to download something, call Format.Download(...) with the new created Download struct as argument. A general / template can be received via the method NewDownloader(...). For all other cases use the Download interface directly.
  • All download functions accepting now io.Writer instead of *os.File for higher flexibility.
  • Format has now a InitVideo() functions which initializes Format.Video.Chunklist which is nil by default. This method will probably not often be used but is helpful nevertheless.

? Others

  • A wiki was created in order to describe more detailed usage of the cli and library.
  • Despite all of the new features, v2 has only ~200 lines more code than the last v1 release.

v1.2.4

2 years ago

CLI

  • Fix for 'Access Denied' when executing the windows binary from v1.2.3 (#11)
  • Direct (non beta) episode urls are working again on windows (#11)

v1.2.3

2 years ago

CLI

  • Added support for beta urls (#10)

Library

  • Updated regex for urls
  • Added support for beta urls in utils.EpisodeStructure.GetEpisodeByURL(...)

Other

  • Typo fixes (#9)

v1.2.2

2 years ago

CLI

Fix for #8

  • no output name parsing with season_number and episode_number
  • missing help text / documentation for series_name format option

Library

Removed unnecessary print in utils.EpisodeStructure.GetEpisodeByURL(...)

v1.2.1

2 years ago

General

  • Fix for #7

Library

  • EpisodeStructure.GetEpisodeByURL(...) checks now the url's episode number if the title could not be found in the api requests
  • Deprecated MatchEpisode(...), use ParseEpisodeURL(...) instead

v1.2.0

2 years ago

Library

  • New Format.DownloadGoroutines(...) function (use for now deprecated Format.Download(...) function)
  • Added timeout when downloading segment and the download fails (useful because sometimes the connection is refused)

CLI

  • Multiple subtitle support for mkv (#5)
  • --only-sub flag to download only subtitles
  • Fix for incomplete file names when automatically renamed

v1.1.0

2 years ago

General

  • Added man page
  • General bugfixes

Library

  • Additional utils
  • Custom error type for utils.Structure related errors

CLI

  • Faster url parsing when downloading a series or multiple videos from the same series
  • More informative output when downloading (#2)
  • More options to name output file
  • Fix for #4

v1.0.1

2 years ago

Fix for #3

v1.0

2 years ago

Initial release