Comments (2)
Yeah, this is a good point. Currently, our Peripheral Device API has no concept of default settings, and I think that's the reason everything is default-off - because it's undefined
. I guess the solution would be to come up with a way of having some default settings - the question is, how should they be handled? I suppose one way of doing it would be to allow the peripheral device to expose a defaultConfig
object, that would be valid for the configManifest
schema, and then later that would be copied over to the settings
property if this is the first connection of the device.
I don't think anything more can be done, without the Peripheral Device itself holding some sort of migration logic to migrate the settings
object. The best we could do would be to provide some warning if the current settings do not match the new manifest. I also don't think we could do anything if the defaults change. I don't think an infrastructure as complicated as the one we have for ShowStyles or Blueprint configs would be viable here.
from sofie-core.
We are populating default values for playout-gateway subdevices https://github.com/nrkno/sofie-core/blob/release50/packages/playout-gateway/src/tsrHandler.ts#L655-L661
And we do provide a utility to parse the defaults from the json-schema https://github.com/nrkno/sofie-core/blob/release50/packages/shared-lib/src/lib/JSONSchemaUtil.ts#L49.
So it wouldn't be too hard to on the fly do a deep-merge of the db config on top of the defaults. I don't know whether it would be better to do this in core of the gateway itself. Im not sure if we need to worry about saving the defaults into the database, as the ui may already present the defaults as defined in the schema when it encounters an undefined
from sofie-core.
Related Issues (20)
- RFC: This is a test
- RFC: This is a test
- RFC: Changes and addition to (meta)data properties (SOFIE-2797) HOT 5
- RFC: Updating the Looping Feature with Per-Part Looping HOT 9
- RFC: Removing potentially unused feature: 'Preserve contents of playing segment when unsynced' HOT 5
- RFC: Playlist Bucket Adlibs HOT 5
- Bug Report: Runaway playhead (SOFIE-2899) HOT 3
- RFC: Override NRCS Data in the Sofie GUI HOT 7
- Bug Report: AutoNexting missed Parts after Playout Gateway downtime HOT 1
- RFC: Improve GUI Accessibility HOT 1
- RFC: iNews compatiblity with segments HOT 5
- Bug Report: "debug_playlistRunBlueprints" breaks 'Reload NRCS Data' HOT 2
- Bug Report: Pieces reported as stopped when they're not
- Bug Report: Package statuses incorrectly get changed when set as next HOT 4
- Bug Report: Diff Different between (SOFIE-3004) HOT 1
- Bug Report: Inital Sofie Core Setup : Issue with Persistant Storage HOT 6
- RFC: Picking future technologies HOT 4
- RFC: Segment budget timing as primary timing in Sofie HOT 1
- RFC: Server-side notifications HOT 2
- Bug Report: Device Triggers temporarily go blank HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sofie-core.