Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Releases: CosmicHorrorDev/subwinder

v1.1.2 Bugfix (and other small changes)

29 May 01:43
Compare
Choose a tag to compare

Bugfixes

  • (174bc95) xml.parsers.expat.ExpatErrors from the API are now re-exposed as SubServerErrors to give more appropriate context.
  • (4a38a8c) Fixed a bug where .download_subtitles(...) was updated to take SubtitlesInfo along with SearchResult: however, the helper function ._download_subtitles(...) was not fully updated to accept these changes appropriately.
  • (e3c1059) Fixed a bug where filename and dirname weren't renamed from faked Media in .download_subtitles(...) leading to an error when trying to download with SubtitlesInfo. This was updated to avoid faking Media in general since it seems to be an error-prone solution. The test was updated to better cover the different cases.

Docs

  • (23f03a2) Added another example to show off some more functionality provided by the library (namely .suggest_media(...), .preview_subtitles(...), .user_info(), and actually using some custom extended MovieInfo and TvSeriesInfo
  • Some outdated information in the docs was found and updated

Dev tools

  • (f079f70) Added in a tool that can generate files with a specified size and special_hash. This allows people to test functionality requiring local files without actually having them in cases where it would be cumbersome to build the Media.from_parts.

v1.1.1 Bugfix

25 May 21:00
Compare
Choose a tag to compare
  • (2dd147a) Fixed a bug introduced from incorrectly checking the length of the pairs for asw.search_subtitles(...) and updated tests to prevent any regressions.

v1.1.0 Minor Release

24 May 02:15
Compare
Choose a tag to compare

Breaking Changes

  • (#37) All the .from_data(...) constructors now just take the raw data instead of filename and dirname too
  • (#36) The ranking functions now take library objects instead of the raw data, so rank_search_subtitles now takes a list of SearchResults and rank_guess_media takes the new GuessMediaResult
  • (#47) Media and MediaInfo's filename and dirname are both private now. They now include getters and setters if you want to take a look at the docs. This was done because they're assumed to be pathlib.Paths, but the user may want to pass in any pathlike value
  • (#42) .report_move(...) was renamed to .report_media(...) to match the media agnostic tone of the rest of the library

New Features

  • (#40) ranking module was made public since the different ranking functions make good fallbacks for custom ranking functions
  • (#41) Several endpoints dealing with subtitles related actions can now take SubtitlesInfo objects along with SearchResults
  • (#43) report_media now raises a ValueError when it's used with a SearchResult that wasn't found using the filehash and size
  • (#34) search_subtitles and guess_media now have unranked variants that directly return a list of SearchResults and GuessMediaResults for each query respectively
  • (#45) .search_subtitles(...) can now take queries as a zip too which works well for giving the desired language codes
  • (2f9ffde) atomicwrites is now included as an optional dependency to allow for saving subtitles atomically
  • (2d670be) the library now aggressively checks for wrong types and tries to return information on the allowed types

Bugfixes

  • (#46) .guess_media(...) previously had some weird edge-cases that would throw an obscure error (searching for "", or something with no results like "asdkfjldsflgskdmfkl"). Now the library handles these cases and the ranked version returns None while the unranked variant gets GuessMediaResult with no data (full of None and empty lists)

Documentation

  • (#39) More advanced examples were added to show a more featureful quickstart and more robust searching

Misc.

  • (93f6df3) Added a PR template
  • (#33) Releases are now automatically published to pypi when a new release tag is pushed to the repo

Minor Bugfix Release

08 May 14:56
Compare
Choose a tag to compare

Bugfixes

  • Fixed a bug where the lang module still tried passing in a string for the endpoint instead of a subwinder._request.Endpoints option. This would cause fetching the lang list to fail which means most of the endpoints would fail to work correctly.

Minor Bugfix Release

04 May 23:18
Compare
Choose a tag to compare

Bugfixes

  • AuthSubwinder bugs
    • Fixed a bug where having download_dir set in.download_subtitles(...) will fail with a type error due to incorrect changes trying to use pathlib.Paths
    • Fixed a bug where you incorrectly couldn't .vote(...) for subtitles with a score of 1

All bugs have had tests added/updated to ensure behavior doesn't regress.

1.0 Release!

03 May 19:30
Compare
Choose a tag to compare

The fabled 1.0 release. No this isn't close to the final version of the library, I'm saving 2.0 for having all the endpoints exposed that I'm planning on exposing (#8). Instead this is more to signify that the library's API should be mostly stable and I wanted the chance to make some breaking changes early on if I could. So here goes

Features

  • The docs are now tracked in the repo instead of using the GitHub wiki. This provides the ease of setup from not having to use some external site while allowing docs to be pinned to each version. If you want to read more about it you can check here (#23)
  • Documentation was added for the utils functions
  • CI is now more extensive with unit testing run on all 3 major platforms (Windows, Mac, Linux). this has already helped to catch a platform-related bug before they made it into a release (4d7f1f5)
  • On top of that more extensive tests are now run to catch bugs that popped up during the release
  • Common classes are now exposed from the base module from subwinder import AuthSubwinder, Subwinder, Media
  • Media had its default construct switched to what was .from_file(...), with the old constructor now residing as .from_parts(...)
  • Downloaded subtitles are now saved atomically thanks to atomicwrites to prevent weird partially saved subtitles behavior

Bugfixes

  • name_format from Authsubwinder's .download_subtitles(...) should now accept more formats as valid
  • ProtocolErrors raised by opensubtitles API should be caught and handled now. It's hard to test with how sporadic the behavior is though

Breaking Changes

  • Both the subwinder.media.Subtitles class and corresponding subwinder.hashers.md5_hash function were removed since they are considered dead code till uploading subtitles has been worked on
  • Medias constructor was changed to match the behavior of the old .from_file(...) classmethod and the old constructor was added as the .from_parts(...) classmethod
  • The whole library always uses pathlib.Paths for any file paths or names. Externally everything can take a str or Path path, but it will always be stored and exposed as a Path now instead of a str
  • Lots of internal restructuring
    • Modules that were already private, but denoted wrong are now correctly private (_constants, _ranking, _request)
    • Everything from the base and auth modules got moved into core
    • SearchResult got moved into info since it better matches those classes
    • special_hash was moved into utils

Future Work

So most of the current groundwork has been laid out for CI, so some more work to finish that up will be done. Past that it's just improving documentation, getting some users to try out the library, and implementing the rest of the desired endpoints.

v0.5.1

17 Apr 08:40
Compare
Choose a tag to compare

So this release is the beginning or proper versioning and stability for the library. I gave up on proper versioning while the API was experiencing a lot of churn, but now that it's settled down I'll be doing proper versioning and release notes from here on out! If you want to play around with the current version it's available to download from pypi 🎉

Currently, the library supports some of what I consider the most common functionality in a nice ergonomic way (this is primarily searching and downloading which are demonstrated in the Quickstart). There's plenty of other functionality if you want to take a look in the wiki along with an outline of what endpoints are covered and what is still being worked on in #8. The main focus for work in the meantime will be on trying to improve quality of life before moving on to adding more features including, but not limited to:

  • Adding some integration tests to test overall behavior
    • Ideally this will test at least some of the code snippets included in the documentation. The hard part will be mocking out all the different API requests which will be painful, to say the least
  • Actually catch server errors correctly
    • Difficult to debug with how sporadic and infrequent the errors are
  • Cache the downloads for github actions runs since currently the majority of the time is spent downloading dependencies
  • Have formatting for black automatically push the changes to pull requests to reduce friction for new contributors
  • Automatically handle pushing releases to pypi when a release tag is pushed