Shokofin Dev 5.0.3.1
Pre-releaseUpdate your plugin using the dev manifest or by downloading the release from GitHub Releases and installing it manually!
Changes since last build:
fix: Don't assume item id and library options are available:
Don't assume the ItemId and LibraryOptions are always available on VirtualFolderInfo. They can both be null if the library failed to be parsed.
fix: Better media folder mapping logic:
Check all ≥101 (up from ≥100) locations for a match before deciding on a mapping between the media folder and import folder, instead of picking the first found match. This will help in cases where some files have multiple locations with the same file name but different relative paths.
Fixes #68
repo: Update README.md for JF 10.10 UI changes (#77).
fix: Split library check in two:
Split the library exists check and library id is valid check into two, because the library id may be null if the virtual folder is in a bad state in core Jellyfin, but the library may still exist in the UI.
fix: Check if subtitle file is a symbolic link:
When attempting to move a subtitle file, check if it's a symbolic link and abort if the link target doesn't exist, or create a copy to use if it exists but is pointing to the wrong place.
feat: Automagically move trickplay files:
Automagically move trickplay files between the VFS and the underlying library/libraries.
misc: Add logging when moving:
Added debug logging when moving subtitle files and trickplay files from the VFS to the underlying library.
cleanup: Remove unused dictionary in api manager.
fix: Ignore non-titles for episodes:
Ignore non-titles for episodes, e.g. "Episode X",Special X", "OVA", "Complete Movie", and fallback to the next title source or null if it's the last source in the list.
fix: Also ignore volumes.
fix: Move control for merge seasons setting to the correct tab.
repo: Make discord hook optional for building dev releases.
fix: Use ignore patterns during media folder search and in the ignore rule:
Use a copy of the ignore patterns taken from the Jellyfin core (since they're not exposed through the abstraction used by plugins) to ignore paths we shouldn't check in the media folder mapping check and in the ignore rule check. The latter check is redundant since the core also has such a check, but in the off-case that the shoko ignore rule is ran before the core ignore rule then we won't attempt to check the paths that would otherwise had been checked because of the run order.
fix: Check if provider is enabled for item in added/updated events before looking up ids.
fix: Also check if the provider is enabled for seasons/series and not just videos.
fix: Add extra type for 'talk show'.
cleanup: Remove unnecessary namespacing.
fix: Fix dir exists checks for trickplay directory in vfs.
fix: More robust trickplay move logic in VFS:
Some more fixes for moving the trickplay directories in the VFS because the rephrase point is treated like a file while real directories are not, so both need their own handling.
fix: Better forward season merging logic:
Added better forward merging logic for the season merging to allow the "primary" series to match the year regex. Also uglified the year regex some more.
Note: Casual reminder not to use the season merging advanced setting if you don't like pain.
fix: Respect no merge tag:
If you want a series to never be merged, then (potentially create and) add the "shokofin/no merge" custom tag on the series in shoko server, and it will never be merged with another series in the plugin.
fix: Always run custom providers.
fix: Respect map as specials tag:
The custom tag "shokofin/map as specials" should generally be applied to OVAs where you want the episodes to show up as specials and not normal episodes, but the system will allow you to set the tag on any series and it should Just Work™. It can also be combined with the season merging, or used outside it in shoko groups.
fix: Await production locations instead of genres.
fix: Better removal of alternate versions:
Improved the logic where we split the alternate versions in the merge versions manager to also account for local alternate versions. Since we're only operating on Shoko managed libraries then I'm fine with the plugin completely managing the alternate versions so we'll just take control of it all, instead of the partway control we before this commit where we were intentionally ignoring the local versions and somewhat half-baked removing the linked local versions.
Also hello 👋 to the one reading this.
fix: Attempt to upgrade trickplay files:
Attempt to "upgrade" the trickplay files in the underlying library if we have a newer version in the VFS compared to what is in the underlying library.
fix: Skip visited videos regardless of depth.
feat: Make multiple version order configurable (#78):
The order in the multiple versions drop-down on the episode/movie pages for libraries managed by the plugin is now configurable through the plugin settings, and by default will use the imported at date, but you can change the ordering as an advanced setting if you feel like it.
Thanks to @GlawenC (Discord: <@707281950355881994>) for doing the research needed to implement this feature and for providing the basic implementation that was built upon in this commit.
Closes #46
Co-authored-by: Mikal Stordal mikalstordal@gmail.com
fix: Use backdrops as thumbnails for "movie" episodes:
Use backdrops tied to the episode as thumbnails for "movie" episodes inside a shows type (or mixed type) library when a movie type series is showing up as a show.
feat: Add series configuration + more:
-
Added new per-series configuration, stored on the server as custom tags.
-
Added a new selector to chose between anidb structure, shoko structure, and tmdb structure to use by default for all libraries, and together with the new per-series configuration we allow it to be overridden on a per-series basis, though no UI to do it yet.
-
Added a new per-series setting to display specials as normal episodes after the normal episodes.
fix: Fix episode type masking:
Fix the episode type masking i just broke in the last commit.
refactor: Reconstruct the episode info:
Remove the directly exposed anidb and shoko objects on the episode info, and instead place the needed properties directly on the episode info object to make it easier to add episode info for tmdb episodes in the future.
fix: Only mark specials and not normal episodes.
refactor: Add tmdb episode data and constructor for episode info.
fix: More through refresh dispatching logic:
Made the refresh dispatching logic in the event dispatcher service more through, by distincting the input lists we get from the core, and also tracking which entities has been updated and their parents, and only firing the event if the entity or it's parents haven't been updated since the last usage stalled event or if the clear plugin cache task is ran.
refactor: Drop ordering information for now:
Don't request the ordering information for now. We'll request it later if we need it for any future features.
refactor: Add season id to episode info.
fix: Removed erroneous "$" in TMDB API Request (#79):
The pains of working in C# and JS. 😔
feat: Add series config. option to order by airdate:
This option will only make sense if you enable the other series config. to include specials as episodes.
chore: A dashing commit (#81):
The biggest commit ever seen by man (||maybe||).
refactor: Implement multi-structure support + more:
Implemented Multi-Structure Support
-
Finally implemented support for multiple library structures. Users can now set a base structure and override it on a per-Shoko-Series basis. With the addition of the new TMDB shows and movies structure, the library now supports three possible structures, which can be used as a whole and overridden as needed.
-
Leveraging the updated data abstraction, the plugin can now map TMDB _shows as movies_¹ or TMDB movies as shows.
-
For movies, if TMDB movie collections are enabled in Shoko, the plugin uses these collections to create either show entries or collection entries based on how your libraries and plugin settings are configured. In show-type libraries, movies are mapped as seasons/episodes, while in movie-type libraries² collections are mapped as actual collections.
-
For shows, we support using "alternate orderings" (or "episode groups" in TMDB terminology) if enabled in Shoko, allowing alternate season/episode arrangements³ if the default arrangement is not to your liking. You will have to configure the alternate ordering to use in Shoko for now, until the utility is done (||totally not foreshadowing||).
-
Added support for TMDB metadata across all structures, including studios, content ratings, production locations, tags, and genres. The settings apply globally across all structures, and metadata is excluded if any of these options are disabled, even if available.
General Changes
-
Replaced the global language code setting for images with per-entity-type, per-image-type settings. Existing settings are automatically migrated, but feel free to tweak them after the update.
-
Fixed an issue with "missing" episodes. The plugin now disables the server's unaired filter, ensuring unaired episodes populate correctly. Sorry about that.
-
Introduced an option to replace images during automatic metadata updates triggered by SignalR events (disabled by default).
-
Updated references to TMDB in the Jellyfin UI to "TheMovieDb," aligning with TMDB’s native branding and the rest of the Jellyfin UI.
-
Exposed AniDB IDs for series, seasons, episodes, and movies, enabling users to view and link to AniDB pages. No idea how compatible this is with the default AniDB plugin, but even if it's incompatible I don't think you should be using that plugin if you have this plugin installed.
Code Style & Modernization
-
Updated to use primary constructors where applicable.
-
Changed bracket placement from C# style (new line) to JS style (same line) for improved readability and reduced vertical space.
-
Standardized variable naming across the codebase. As part of the refactor, made sure the
[Ss]eriesIds that were previously referring to the season info's id and not the Shoko Series' id were renamed to[Ss]easonId, among other similar changes. -
Added missing
.ConfigureAwait(false)calls onawait-edTasks.
¹ Please don't do that, for your own mental health.
² If collections are enabled ONLY for movies and the option to separate movies from series/shows is enabled in the plugin settings.
³ Note: Alternate season images are not currently available in Shoko or TMDB.
fix: Track usage in virtual root task.
misc: Include our upstream source in images:
Include our upstream source in images provided by the plugin.
fix: Add back proper per-library media folder config removal.
misc: Add log point at the beginning of VFS generation.
fix: Use invariant culture ignore case for resolved tag children.
fix: Unmark library structure mode as expert.
misc: Add debug & experimental setting badges.
feat: Add per library structure type respect preferred image setting.
fix: Upgrade tag/genres sources to include the new TMDB sources by default.
chore: Move all extensions to their own namespace.
misc: Change log level for guarded memory cache exception logging.
fix: Movie collections can be known but not downloaded in the server.
misc: Mark "Require Two Entries for a Collection" option as a debug option.
fix: Don't assume the tmdb episode exists:
Don't assume the TMDB episode exists, even if we have a cross-reference for it.
chore: Rename Default* to * on IBaseItemInfo:
Rename DefaultTitle and DefaultOverview to just Title and Overview on the IBaseItemInfo interface, and also add summaries for the properties of the interface and the interface itself.
fix: Fix double namespacing on series.
fix: Return early in startup tasks if the plugin is not connected to a server.
fix: Fix serialization of component version.
fix: Properly set anidb anime id for series info and season info.
fix: Complain loudly if we find a mismatch between files found and cross-references found.
feat: Add anidb creator id for people.
fix: Fallback to anidb cast/crew if tmdb cast/crew is unavailable.
fix: Add provider ids to cast/crew.
fix: Hopefully fix character names breaking everything.
misc: Better response logging in api client.
fix: Remove unnecessary usage of EpisodeInfo.SeasonNumber.
fix: Improve show info community rating:
Improved the show info community rating by pre-caching it instead of calculating it on demand, allowing us to do different methods of calculation per show info type/impl., which allows us to use a direct value for show infos for tmdb shows and movies and anidb anime, while aggregating the value for shoko groups and tmdb movie collections.
feat: Expose community rating for images if available.
repo: Update version matrix in read-me file.
fix: Inverse reversed boolean logic.
misc: Update comment. (Skip CI)
fix: Always use default tmdb title for tmdb entities and set a better fallback name.
feat: I18n buttons in plugin settings.
misc: Move back accidentally moved file.
fix: Enable more code analyzers & fix locking on this issue.
misc: Remove unnecessary virtual field on external ids.
fix: Remove legacy support for 4.2 in cross-reference by marking the percentage object on the episode reference as non-nullable, since they're always available from 5.0 and onwards.
fix: Fix up creator role for latest daily server.
misc: Add created at and updated at to base info interface.
fix: Missed a spot:
follow up commit for 3ef0aec.
chore: DI usage tracker in api client and manager.
chore: Add concurrency lock to API client:
Added a concurrency lock to the API client, to allow a maximum of 10 concurrent requests at all times, as to not overload the server with a DoS attack when iterating a long-running series like e.g. One Piece.
Also tweaked the log statements and made POST requests able to be cached if needed, but they skip the cache by default.
chore: Further restrict library item searches to only physical libraries in managers/services.
chore: Pass and use cancellation token in the guarded cache.
fix: Fix default selected options in settings html.
fix: Filter out empty series from VFS and library:
Filter out series which we have no normal episodes or specials for from all libraries, be it those managed through the VFS or traditional filtering.
fix: Distinct character names before joining.
fix: Skip cast/crew if staff member don't have a name.
fix: Hard code haruhi '06 for VFS:
<a:thisIsFine:1058294258727145473>
repo: Update shoko link: (Skip CI)
fix: Improve file system change reports for physical VFS libraries:
Leave it 100% to Jellyfin for how to handle it when new series have been added to the VFS, instead of giving it a random folder in the root of the physical VFS and say it has changed.
fix: Missed a spot in the last commit:
Added the changes to a missing spot in commit def7e76.
fix: Log which locations will be emitted:
Log which locations will be emitted to the core in the event dispatch service when verbose/trace logging is enabled for the service.
fix: Check staff name, not role name, during transform to person info.
refactor: Remove VFS cache placement option.
fix: Readjust season id read from path before use.
refactor: Remove TryGetEpisodeIdFor in favor of TryGetEpisodeIdsFor.
fix: Better "missing" episode removal logic:
This should hopefully fix the faulty removal logic for good… hopefully.
repo: Update version matrix in read-me. (Skip CI)
chore: Remove trailing whitespaces.
feat: Add iterative file checks mode in VFS:
Added a new iterative file check mode for VFS generation, to be used when iterating the file system is expensive (e.g. if the libraries are on a network mapped mount/drive, etc.), if you just prefer it to be done incrementally instead of up front. The setting is marked as debug.
fix: Silently suppress the double namespace issue:
Silently suppress the double namespace issue for the internal plugin id on entities when we encounter it.
misc: Mark all vfs location settings as debug instead of experimental.
feat: Add support for merging side/main stories:
Added EXPERIMENTAL support for merging side/main stories… making the existing merge logic even more complex in the process.
misc: Allow syncing vfs thread count to refresh thread count:
Allow synchronizing the number of threads to use during a VFS (re-)generation to the number of threads to use during a recursive refresh of a folder (any folder, by it the library itself, a series within, etc.) defined in the jellyfin core system settings by setting the VFS threads setting to -1. Setting it to 0 or anything below -1 will still set it to use the number of available CPU cores, but -1 is now reserved for following the system setting.
fix: More systematic ordering of relations during merging.
fix: Add guard for shared side stories:
Added a guard to prevent accidentally duplicating a series across multiple merge groups because the series is a side story to multiple main stories (e.g. linked to two series which have a sequel/prequel relationship, etc.).
fix: Suppress ignored episode titles.
fix: Provide fallback title in providers.
chore: Simplify special prefix logic.
fix: Ignore more episode names.
fix: Check all titles if they're invalid, not just some.
misc: Add roman letter fallback for movie series if no subtitle is available.
fix: Suppress people and committees from studio list.
feat: Add setting to only show animation studios.
misc: Add more invalid episode titles.
repo: Update version matrix in read-me file.
fix: Add missing series types for daily server.
feat: Add support for multiple alt/orig. titles per entry.
chore: Remove extra whitespace.
refactor: Tweak SignalR auto-reconnect behavior:
- Tweaked the SignalR auto-reconnect behavior to not sort and filter the list, and to use the last interval in the list indefinitely until a successful connection is made, instead of the old behavior of not trying again once we've tried all the intervals in the list.
misc: Remove numbering if it's only one:
- Removed the numbering of the alternate/original titles in the UI if it's only one.
misc: Move add button, show remaining instead of total:
-
Moved the button responsible for adding new alternate/original titles into the
<fieldset>of the first title, making it so it won't move when you press it and also feel more in-line (literally) with the rest of the alternate/original title UI. -
Show remaining titles you can add instead of showing the maximum allowed titles.
-
Switch the add button from primary to secondary when we disable it, since it seems like Jellyfin doesn't have CSS for disabled primary buttons, so this will make it more obvious (hopefully) that it's in a disabled state.
feat: Add advanced title settings:
- Added per-structure-type per-base-item title settings, all disabled by default. Can't get more advanced than this I think. but because it's so advanced, it's hard to make an intuitive UI for it, so no UI for now.
Hey! You! Yes, the one reading this. Are you tired of the plugin only supporting a single set of settings for titles across all types (i.e. shows/seasons/episodes/movies/collections)? Rejoice! You now have per-structure-type, per-base-item advanced title settings — because only you know best what you want. 🎉 The only catch? There’s no fancy UI for it, so roll up your sleeves and tweak the XML directly to your heart’s content.
refactor: Impl. series config. service [1/2]:
Part 1 of 2 of the series configuration implementation. This is the backend code and the api client methods to-be-used by the series configuration utility in the future, giving the minimum required to test it in devtools before figuring out the rest.
refactor: Make compatible with provider refactor + more:
-
Made the plugin with the provider info refactor branch on the server without breaking compatibility with the current dailies. This required tweaking the REST API endpoints & models and SignalR channels and models to support both versions at the same time.
-
Updated URL handling for
IExternalIds toIExternalUrlProviderand reorganized the external id namespace. Also removed the Shoko fields so you can't edit them. They were only previously exposed because that was the only way to get the redirects back to shoko working. -
Renamed 'import folder' to 'managed folder' throughout the code base, including in the user/admin facing UIs.
-
Added support for redirecting to the correct location when the Web UI prefix has been tweaked in Shoko Server. So users(/me) mounting the Web UI at
/or other locations will still result in the links redirecting to the correct pages.
fix: Fix enum usage for dailies.
fix: Allow release group id to be a number or string.
chore: Clean up style. (Skip CI)
feat: Add yearly seasons & air days:
-
Added yearly seasons as tags. E.g.
Winter 2013/14,Spring 2001, etc. -
Added air days for series. This is a native Jellyfin feature, so they're not added as tags.
feat: Add tag/genre exclusion lists:
- Added the ability to exclude certain tags from being displayed as tags/genres.
refactor: Add plain text / markdown conversion modes:
- Added a plain text or markdown conversion mode for descriptions. Markdown is used by default.
feat: Add advanced description settings:
The same advanced settings as for titles, but for descriptions. Only configurable in the XML settings file for now.