Skip to content

Conversation

@Tapanila
Copy link
Owner

Update media handling and testing framework

  • Changed application ID in ChromecastApplicationTester.cs.
  • Refactored MediaChannelTester.cs to replace queue navigation tests with item ID loading tests.
  • Added QueueTester class for enhanced media queue testing.
  • Introduced CreateTestCdWithItemIds in TestHelper.cs for specific item ID queues.
  • Modified MediaChannel.cs methods to return nullable MediaStatus?.
  • Removed QueueNextMessage and QueuePrevMessage classes; replaced with enhanced QueueUpdateMessage.
  • Updated media properties in Media.cs for improved JSON serialization.
  • Enabled nullable reference types in Sharpcaster.csproj for better code safety.

Fixes #351

Tapanila added 3 commits July 19, 2025 17:10
- Changed application ID in `ChromecastApplicationTester.cs`. - Refactored `MediaChannelTester.cs` to replace queue navigation tests with item ID loading tests. - Added `QueueTester` class for enhanced media queue testing. - Introduced `CreateTestCdWithItemIds` in `TestHelper.cs` for specific item ID queues. - Modified `MediaChannel.cs` methods to return nullable `MediaStatus?`. - Removed `QueueNextMessage` and `QueuePrevMessage` classes; replaced with enhanced `QueueUpdateMessage`. - Updated media properties in `Media.cs` for improved JSON serialization. - Enabled nullable reference types in `Sharpcaster.csproj` for better code safety.
Copilot AI review requested due to automatic review settings July 19, 2025 18:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a comprehensive refactoring of the media queue handling system to fix queue-related issues. The changes introduce enhanced queue functionality, improve code safety through nullable reference types, and update the testing framework.

  • Enhanced QueueUpdateMessage with additional properties for comprehensive queue management
  • Replaced separate queue navigation messages with a unified approach using QueueUpdateMessage
  • Enabled nullable reference types across the project for improved type safety

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
Sharpcaster.csproj Enables nullable reference types for improved code safety
Media.cs Adds ContentId property and JSON serialization attributes for optional properties
QueueUpdateMessage.cs Enhances with additional queue management properties (CurrentItemId, Jump, RepeatMode, etc.)
QueuePrevMessage.cs Removes obsolete queue navigation message class
QueueNextMessage.cs Removes obsolete queue navigation message class
IMediaChannel.cs Changes QueueLoadAsync return type to nullable MediaStatus
SharpcasteSerialiationContext.cs Removes serialization context for deleted message types
ChromeCastClient.cs Updates variable declarations for nullable reference types
SpotifyChannel.cs Fixes switch statement logic and method call parameters
MediaChannel.cs Implements new queue navigation logic using QueueUpdateMessage and handles nullable returns
TestHelper.cs Adds new test data methods for queue testing with and without item IDs
QueueTester.cs New test class for comprehensive queue functionality testing
MediaChannelTester.cs Refactors queue tests and adds item ID validation test
ChromecastApplicationTester.cs Updates application ID for testing
@Tapanila Tapanila merged commit 6b69ab2 into main Jul 19, 2025
2 checks passed
@Tapanila Tapanila deleted the fixing-queue branch July 19, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants