Let the Player create the Playables #8

Open
opened 3 years ago by LEdoian · 0 comments
Owner

Currently, the songs declared in the INI are created as Song objects, regardless of what Player is used; the Player is expected to somehow be able to play the song.

The code however is written against the IPlayable interface, so that the Playables/Songs can take very different shapes.

Proposal: Let the Player create Playables it supports, using some factory-like interface. It will receive the parsed INI (as a dictionary of dictionaries) without the [general] section. The concrete form of the IPlayables created would be up to the Player. This also simplifies Configuration code a bit.

Motivation: Support of special Players that either need their own metadata in the song, want to add pseudo songs, or even to use QuickPlay as a general button board with the right Player.

Currently, the songs declared in the INI are created as Song objects, regardless of what Player is used; the Player is expected to somehow be able to play the song. The code however is written against the IPlayable interface, so that the Playables/Songs can take very different shapes. __Proposal:__ Let the Player create Playables it supports, using some factory-like interface. It will receive the parsed INI (as a dictionary of dictionaries) without the `[general]` section. The concrete form of the IPlayables created would be up to the Player. This also simplifies [Configuration code](https://gitea.ledoian.cz/LEdoian/QuickPlay/src/commit/43fa7bf7b5fc7dc4a1b93d31eb7d793a90d413a3/QuickPlay/Configuration.cs#L154) a bit. __Motivation:__ Support of special Players that either need their own metadata in the song, want to add pseudo songs, or even to use QuickPlay as a general button board with the right Player.
LEdoian added the
code-change
label 3 years ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: LEdoian/QuickPlay#8
Loading…
There is no content yet.