Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app: Migrate the old taggedNowPlaying overlay type
- Loading branch information
1 parent
80dc62c
commit eead1df
Showing
2 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import {set} from 'mobx'; | ||
|
||
import store from 'src/shared/store'; | ||
|
||
/** | ||
* There may be some situations where we have to implement migrations of the | ||
* users configuration as they upgrade versiosns. These migrations will live | ||
* here. | ||
*/ | ||
export function runConfigMigrations() { | ||
/** | ||
* 11-19-20 | ||
* | ||
* Migrate old 'taggedNowPlaying' overlay configurations to the new themeable | ||
* nowPlaying overlay type. | ||
*/ | ||
(() => { | ||
const overlay = store.config.overlays.find( | ||
overlay => overlay.type == 'taggedNowPlaying' | ||
); | ||
|
||
if (overlay === undefined) { | ||
return; | ||
} | ||
|
||
set(overlay, {type: 'nowPlaying'}); | ||
set(overlay.config, {theme: 'modern'}); | ||
})(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters