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

Development #2

Merged
merged 4 commits into from
Mar 30, 2024
Merged

Development #2

merged 4 commits into from
Mar 30, 2024

Conversation

AstreusCoding
Copy link
Owner

No description provided.

Added the configuration page under the "Plugins" bar to the left in Jellyfin settings.

Made so settings are more easily added in the future.

Code is a lot more cleaner and transparent also separated into a html and js file.
Bif files are now regenerated if the configuration does not match, removed option to have multiple bif files, might implement it back in the future. Added some more logging when I have time I will add more.
Added option to not regenerate manifest files / bif files not made by Jellyscrubberr
@AstreusCoding AstreusCoding merged commit e966155 into main Mar 30, 2024
2 checks passed
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @CasperDoesCoding - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 6 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Docstrings: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

};

// If a Manifest object already exists, combine resolutions
// Check if a manifest already exists for this item and if it matches the current configuration
Copy link

Choose a reason for hiding this comment

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

suggestion (code_refinement): Consider extracting manifest existence and match logic into a separate method for clarity.

Comment on lines +61 to +64
// Serialize and write to manifest file
using FileStream createStream = File.Create(path);
await JsonSerializer.SerializeAsync(createStream, newManifest);
await createStream.DisposeAsync();
Copy link

Choose a reason for hiding this comment

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

suggestion (code_refinement): Consider using 'await using' statement for automatic disposal of FileStream.

catch (JsonException)
{
_logger.LogWarning("Error deserializing manifest file at {0}", path);
return true; // ? I dont know what causes this error so to prevent files being regenerated, return true for now. If anyone knows what causes this error, please let me know.
Copy link

Choose a reason for hiding this comment

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

issue (code_clarification): Remove or address inline comment about unknown error causes before merging.

@@ -37,6 +37,8 @@ public class TrickplayController : ControllerBase
private readonly IServerConfigurationManager _configurationManager;
private readonly EncodingHelper _encodingHelper;
private readonly PluginConfiguration _config;
private static ManifestManager _manifestManager = null!;
Copy link

Choose a reason for hiding this comment

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

issue (code_refinement): Avoid using static fields for service instances to prevent potential lifecycle management issues.

@@ -0,0 +1,178 @@
const pluginId = "6b961c92-5678-45d1-a7ac-dd5003f03460";
Copy link

Choose a reason for hiding this comment

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

suggestion (code_refinement): Consider moving pluginId to a shared constants file if used across multiple files.

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.

1 participant