Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add series and movies grouping and refactor internals #14

Merged
merged 14 commits into from
Aug 29, 2021

Conversation

revam
Copy link
Member

@revam revam commented Oct 12, 2020

Changes

  • Add a Library "Scanner" to "pre-heat" the entries we need to fetch from Shoko and to filter out some items.

  • Add an Api Manager (basically a data store for the items retrived from shoko). Streamlining how to get data from the API, by going through the manager instead of directly using the API (everytime).

  • Refactored Helper.cs into two new separate classes, under a new namespace Shokofin.Utils.

    • Shokofin.Utils.Ordering - holds helpers for ordering and sorting groups/series/seasons/episodes.

    • Shokofin.Utils.Text - holds helpers related to text manipulation and extraction (e.g. sanitize the summary, get the title of a series/season/episode, etc.)

  • Updated the configuration page

  • Episodes of type Credits, ThemeSong and Trailer are excluded, because they will be added to series separately (read: not as episodes) in a later PR

  • Added Series grouping based on Shoko's group feature

    • Normal and special episodes are grouped together within the same season, for now. With the specials having an negative index. (This is a temporary state, and will be fixed later)

    • Seasons in the grouped series can be ordered by Shoko release-date (or in chronological order when that's added).

  • Added Movies grouping based on Shoko's group feature

    • See above
  • Added an experimental library separation feature, so you can use the same library on disk, but have separate movie and series libraries in Jellyfin. Though, keep in mind this feature is experimental, and requires a workaround to work where you either have to mount the same directory twice in docker or use a symbolic link for one of them

@revam revam force-pushed the add-grouping-and-refactor branch 2 times, most recently from 1e075ba to 62b851c Compare October 12, 2020 15:53
@revam revam changed the title [WIP] Add series grouping and refactor internals [WIP] Add series and movies grouping and refactor internals Dec 5, 2020
@revam revam force-pushed the add-grouping-and-refactor branch 2 times, most recently from 45bcbcf to 0bfcd7f Compare December 14, 2020 17:00
@revam revam force-pushed the add-grouping-and-refactor branch 2 times, most recently from cb143ac to 72f7aee Compare March 12, 2021 16:38
@revam revam marked this pull request as ready for review August 29, 2021 19:23
 ## Changes

- Refactored Helper.cs into three new seperate classes, under
  a new namespace `Shokofin.Utils`. Streamlined how to get data from the
  api, by going through new helpers instead of directly using the api
  _everytime_.

  - `Shokofin.Utils.DataUtil` - holds helpers for getting data

  - `Shokofin.Utils.OrderingUtil` - holds helpers for ordering episodes

  - `Shokofin.Utils.TextUtil` - holds helpers related to text

- Updated the configuration page layout

- Added Series grouping based on Shoko's group feature

  - Seasons in the grouped series can be ordered by release-date
  or in chonological order.

 ## To-do

- Depends on missing feature: relations in group
 # Changes

- Commented out reference to Chronological ordering in the html config
  template

- Removed the api call for group relations (that currently does not
  exist in Shoko master branch)

- Removed the incomplete chronological sorter

- Made the "default" (AKA let shoko decide) ordering the default
the leading url to the shoko server (e.g. so proxies are supported)
Don't append the ": " if the episode title is empty in the current
language for movies
grouped.

A workaround, for now.
Add a warning for series grouping using shoko's groups,
change "Default" to "Let Shoko decide", and
correct "libraries" to "library types"
Don't return id from *ByPath endoints, renamed and/or
moved some classes added in this PR, etc.

See the commit for all changes.
So, did some coding over the weekend;
- added a library "scanner", and removed all the other ignore rules present
- laid the ground work for adding virtual missing episodes, theme videos, trailers, interviews to series/seasons (will be added in a later commit)
- fixed the code style for _most_ of the code base to _my liking_.
- fixed the "bug" resulting in single "episodes" of series with type "movie" only being named "Complete Movie" (note; it was not really a bug, but working as intended)
- _a lot_ of refactor of the api manager.
@revam revam changed the title [WIP] Add series and movies grouping and refactor internals Add series and movies grouping and refactor internals Aug 29, 2021
Copy link
Member

@harshithmohan harshithmohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@revam revam merged commit 335dd24 into ShokoAnime:master Aug 29, 2021
@revam revam deleted the add-grouping-and-refactor branch August 29, 2021 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants