-
Notifications
You must be signed in to change notification settings - Fork 76
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
[WIP] Add TMDB support #1082
[WIP] Add TMDB support #1082
Conversation
.editorconfig
Outdated
dotnet_naming_style.instance_field_style.capitalization = camel_case | ||
dotnet_naming_style.instance_field_style.required_prefix = _ | ||
dotnet_naming_style.instance_field_style.capitalization = pascal_case | ||
dotnet_naming_style.instance_field_style.required_prefix = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's happened here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. No pascal case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to get the IDE to shut up about it's "suggestions" to rename the fields. My IDE was suggesting to renaming all properties to use camel case and a prefix. If you can somehow tweak the rules to only apply the prefix and camel case to the private properties, then be my guest, i won't invest time into finding the correct settings to use atm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And yes, I can remove the commit that changed these settings from this PR, but it's staying for now, so i can keep my sanity… for now.
"UNK" => TitleLanguage.Unknown, | ||
_ => TitleLanguage.Unknown, | ||
"UR" or "URD" => TitleLanguage.Urdu, | ||
"GREEK (ANCIENT)" => TitleLanguage.Greek, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's all this? The format changed entirely
Shoko.Server/API/v1/Implementations/ShokoServiceImplementation/ShokoServiceImplementation.cs
Outdated
Show resolved
Hide resolved
/// <returns>200 on found, 400/404 if the type or source are invalid, and 404 if the id is not found</returns> | ||
[HttpGet("{source}/{type}/{value}")] | ||
[ProducesResponseType(typeof(FileStreamResult), 200)] | ||
[ProducesResponseType(404)] | ||
public ActionResult GetImage([FromRoute] Image.ImageSource source, [FromRoute] Image.ImageType type, | ||
[FromRoute] string value) | ||
[FromRoute] int value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a breaking change. Please comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Theoretically breaking, practically not so much. We never used the "static" images in v3, since all the images the web ui needs are shipped with the web ui, so having the id as a stringified int 100% of the time made no sense (to me at least). I could had made this change to master instead of in this PR, yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the way we use the image metadata in the web ui makes it so this change won't break the web ui. Shokofin might break, but I can fix that in the "unstable" channel if it does break it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at @harshithmohan's v3 branch for Metadata, then it doesn't look like it will break since it's just using the JSON values as-is without any type checking (which is done in Shokofin, since it's C#).
b0981b1
to
6a53308
Compare
7416a7b
to
33af2fd
Compare
- Overhauled the TMDB support in Shoko. This also means shoko will download all your TMDB related metadata again, but it will (thankfully for you) keep the existing cross-references for movies. In addition to movies we also now support shows, seasons, episodes, movie collections, alternate orderings for shows/seasons/episodes, studios, and much more. Also, the new tmdb data is also _minimally_ exposed to plugins through the abstraction — basic show/episode/movie information is available along with titles, overviews/descriptions and images — and fully exposed in the v3 REST API. - Updated the plugin abstraction to include `IShokoSeries`, `IShokoEpisode`, `IShokoGroup`, `IMovie`, and updated the existing `ISeries`, `IEpisode` interfaces to better go along with the new interfaces. There is also a new `IWithImages` interface implemented by all the previously mentioned interfaces where you can get any and all images related to the entries. Also **broke __a lot__ of the existing interfaces and events**, as the rename events has been replaced by the move event (for now, until the renamer refactor replaces it entirely), and the properties that ended in `*Info` (except `MediaInfo`) have had the `*Info` part removed. `IAnime`, `IRelatedAnime` and `IGroup` are gone, the base metadata in the file events have shifted from the anidb data to the shoko data, so it will acomodate the data from all sources by default unless you specifically asks for e.g. anidb, among many other breaking changes. **Use at your own risk.** - Overhauled the image internals. It should now be much easier (||for me at least, not sure about others||) to implement alternate image providers (e.g. user uploaded, FanartTV, etc.) as long as they add a new table with a model extending the `Image_Base` model or otherwise implement the new `IImageMetadata` interface. Also, as stated above, images are now exposed to plugins, though there is still no way to get `ISeries`, `IEpisode` or `IMovie` entities outside the renaming system and file events. This change involved rewriting the internal image handling of AniDB, TvDB and TMDB images, along with all the REST APIs and the plugin abstraction. If there are any bugs related to images in the coming days/weeks/months then it's probably safe to blame me. - Some spring cleaning to get the warning count down to 0. Removed a lot of old, unused code, and updated obsolete code to not produce warnings. - Went full grammar/code-style nazi on some of the files I touched, fixing both short-form variable names like `fldr` → `folder`, and actual grammatical errors like `retrive` → `retrieve`, in addition to a lot of _modernization_ of said files. Basically, if my editor/IDE were complaining, then I touched/fixed it.
I don't know why his editor weren't complaining, but mine were.
No description provided.