mirobouma / MusicControl

Spotify music control plugin for https://github.com/SteamDeckHomebrew/decky-loader
MIT License
21 stars 3 forks source link

Correct Plugin Titles #3

Closed OdinVex closed 2 years ago

OdinVex commented 2 years ago

This should be all that is necessary to correct the plugin's titles through-out user-interfaces. Only during filesystem access should spaces be removed or escaped (or otherwise use things such as underscores or dashes).

OdinVex commented 2 years ago

Feel free to turn down, it just looks weird having only one plugin having a non-formal name versus all others.

mirobouma commented 2 years ago

I wanted to do this earlier, but if i update the name, it will break the plugin update flow of decky itself. There are a few other plugins that also use the same style so its not completely out of place. I'd prefer not to break compatibility with people who already have the plugin installed, unless decky adds a better way of identifying the plugin for updates in the future.

OdinVex commented 2 years ago

What is Decky's method (aside from folder/file-naming) of identifying a plugin, then? You might ignore the plugin.json, but that'll keep the menu entry in Decky as “MusicControl”. I'd rather update now, the user count can only grow from here.

mirobouma commented 2 years ago

Not quite sure, but I asked about this specific case of renaming and they mentioned it will break the plugin update flow, requiring users to re-install the plugin. I gave a suggestion to base this on the package.json name instead since that is not user facing.

mirobouma commented 2 years ago
export async function checkForUpdates(plugins: Plugin[]): Promise<PluginUpdateMapping> {
  const serverData = await getPluginList();
  const updateMap = new Map<string, StorePluginVersion>();
  for (let plugin of plugins) {
    const remotePlugin = serverData?.find((x) => x.name == plugin.name);
    if (remotePlugin && remotePlugin.versions?.length > 0 && plugin.version != remotePlugin?.versions?.[0]?.name) {
      updateMap.set(plugin.name, remotePlugin.versions[0]);
    }
  }
  return updateMap;
}

from decky-loader

OdinVex commented 2 years ago

The plugin.json may need to be kept the same, but the rest could be altered, for close-to-perfect while maintaining compatibility. Only the entry in the Decky list would be without a space. For some reason, it still hates my Rhythmbox install, so I'm hopeful for Steam to put something in native.

mirobouma commented 2 years ago

Unfortunately, both the title in the tab and in the plugin list will be MusicControl (the title property is deprecated and actually hardcoded into decky), so it would only show in the info section, which makes it inconsistent based on the rest of the view

OdinVex commented 2 years ago

Unfortunately, both the title in the tab and in the plugin list will be MusicControl (the title property is deprecated and actually hardcoded into decky), so it would only show in the info section, which makes it inconsistent based on the rest of the view

You re-stated what I was saying. >_> Anyway, I'm just going to seek a different solution, Flatpak Rhythmbox just locks up the Steam Deck UI (pretty much all Flatpak crap is doing it in my case, even on fresh installs).

mirobouma commented 2 years ago

Unfortunately, both the title in the tab and in the plugin list will be MusicControl (the title property is deprecated and actually hardcoded into decky), so it would only show in the info section, which makes it inconsistent based on the rest of the view

You re-stated what I was saying. >_> Anyway, I'm just going to seek a different solution, Flatpak Rhythmbox just locks up the Steam Deck UI (pretty much all Flatpak crap is doing it in my case, even on fresh installs).

I stated that also the title in the control view would have no space, not just the listing in the plugin list.

OdinVex commented 2 years ago

Unfortunately, both the title in the tab and in the plugin list will be MusicControl (the title property is deprecated and actually hardcoded into decky), so it would only show in the info section, which makes it inconsistent based on the rest of the view

You re-stated what I was saying. >_> Anyway, I'm just going to seek a different solution, Flatpak Rhythmbox just locks up the Steam Deck UI (pretty much all Flatpak crap is doing it in my case, even on fresh installs).

I stated that also the title in the control view would have no space, not just the listing in the plugin list.

You're certain you're not talking about src/routes/index.tsx ? >_>