Skip to content

Commit

Permalink
Fix MPRIS for flatpak (#1032)
Browse files Browse the repository at this point in the history
* Add App-Id to config

* use the correct appid as MPRIS bus name suffix

fixes MPRIS for flatpak
  • Loading branch information
swick authored Aug 6, 2021
1 parent 977b235 commit c2bd4dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/main/src/services/@linux/system-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class LinuxMediaService extends MprisService implements NuclearApi {
@inject(Window) private window: Window
) {
super({
name: config.title.replace(/ /g, '_'),
name: config.appid,
identity: config.title,
supportedMimeTypes: config.supportedFormats.map(format => `audio/${format}`),
supportedUriSchemes: ['file', 'uri'],
Expand Down
2 changes: 2 additions & 0 deletions packages/main/src/services/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Config {
youtubeUrl: string;
youtubeSearch: string;
title: string;
appid: string;
supportedFormats: string[];
env: Env;
icon: string;
Expand All @@ -33,6 +34,7 @@ class Config {
) {
this.env = process.env.NODE_ENV as Env || Env.DEV;
this.title = 'Nuclear Music Player';
this.appid = 'org.js.nuclear.Nuclear';
this.youtubeUrl = 'https://www.youtube.com/watch';
this.youtubeSearch = 'https://www.googleapis.com/youtube/v3/search?part=id,snippet&type=video&maxResults=50&q=';
this.supportedFormats = _.uniq(pkg.build.fileAssociations.map(({ ext }) => ext));
Expand Down

0 comments on commit c2bd4dd

Please sign in to comment.