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

10.9 support #115

Merged
merged 4 commits into from
Apr 3, 2024
Merged

10.9 support #115

merged 4 commits into from
Apr 3, 2024

Conversation

MBR-0001
Copy link
Contributor

@MBR-0001 MBR-0001 commented Feb 17, 2023

Also "modernized" the code:

  • Use file scoped namespaces, which is the reason why diff is big :(
  • Use is (not) null
  • Bumped .net version to 7 lol
  • Use PluginServiceRegistrator to register OpenSubtitleDownloader as an ISubtitleProvider because of ApplicationHost cleanup jellyfin#9191 (that's the only way I know how to do it)

Closes #143

Comment on lines +55 to +58
catch (Exception ex)
{
throw new JsonException($"Failed to parse response, code: {Code}, context: {string.Join(", ", context)}, body: \n{(string.IsNullOrWhiteSpace(Body) ? "\"\"" : Body)}", ex);
}

Check notice

Code scanning / CodeQL

Generic catch clause Note

Generic catch clause.
Copy link
Member

@crobibero crobibero left a comment

Choose a reason for hiding this comment

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

Thank you for making the update, so far it looks great!

@crobibero
Copy link
Member

If you rebase on the unstable branch we can release this into the wild

@crobibero
Copy link
Member

Also sorry for making other 10.9 changes, I just went through the list of plugins to make them buildable

@MBR-0001 MBR-0001 changed the base branch from master to unstable April 2, 2024 18:41
@MBR-0001 MBR-0001 marked this pull request as ready for review April 2, 2024 20:32
}
};

request.Headers.Add("User-Agent", $"Jellyfin-Plugin-OpenSubtitles v{_version}");
Copy link
Member

Choose a reason for hiding this comment

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

request.Headers.UserAgent.Add("Jellyfin-Plugin-OpenSubtitles", _version); should work

Copy link
Member

Choose a reason for hiding this comment

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

@MBR-0001 in case you missed it :)

Copy link
Contributor Author

@MBR-0001 MBR-0001 Apr 3, 2024

Choose a reason for hiding this comment

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

I reverted to just setting it inside constructor in 996de2d

I don't remember why I changed this in the first place

@MBR-0001 MBR-0001 changed the title WIP: 10.9 support 10.9 support Apr 3, 2024
@MBR-0001
Copy link
Contributor Author

MBR-0001 commented Apr 3, 2024

I had to do the following modifications to csproj for it to build:

<ItemGroup>
    <Reference Include="blah/jellyfin/MediaBrowser.Common/bin/Debug/net8.0/MediaBrowser.Common.dll" />
    <Reference Include="blah/jellyfin/MediaBrowser.Controller/bin/Debug/net8.0/MediaBrowser.Controller.dll" />
    <Reference Include="blah/jellyfin/MediaBrowser.Model/bin/Debug/net8.0/MediaBrowser.Model.dll" />
  </ItemGroup>

original is:

<PackageReference Include="Jellyfin.Common" Version="10.*-*" />
<PackageReference Include="Jellyfin.Controller" Version="10.*-*" />

CI is not running so I'm not sure if this actually builds with unchanged csproj

@crobibero crobibero merged commit 1ae4798 into jellyfin:unstable Apr 3, 2024
crobibero pushed a commit that referenced this pull request May 11, 2024
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.

None yet

2 participants