Providers framework needs to be able to target specific consumers

Bug #1044907 reported by Dustin Spicuzza
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Exaile
Fix Released
Wishlist
Dustin Spicuzza

Bug Description

Providers in Exaile are pretty useful, but they currently are a bit limited. Currently, providers are all or nothing -- so there isn't a way to say 'only provide this service to a particular thing'.

A good example where this could be useful is with player enhancements. If I have an enhancement plugin that attaches to the player pipeline (say, to add an echo or something), when it registers a provider it will be added to *all* player objects that get created. However, what I really want is to only add the echo enhancement to a particular player object, and still be able to use the provider system to register other things for all players.

Another example would be with provider-based menus. You could use this functionality to ensure that a particular menu item is only applied to a particular widget, instead of all widgets -- while still retaining the ability for other menu items to be applied to all widgets if they so desire.

Related branches

Revision history for this message
Dustin Spicuzza (dustin-virtualroadside) wrote :

FIxed in r4259, with ProviderMenu enhancements in r4260

Changed in exaile:
assignee: nobody → Dustin Spicuzza (dustin-virtualroadside)
status: New → Fix Committed
Revision history for this message
Dustin Spicuzza (dustin-virtualroadside) wrote :

Note that the best way to go about this if we were starting from scratch is to force all provider consumers to pass themselves as a possible target, but that would be rather invasive. Instead, I opted to make targets optional, and only use this enhancement where needed, since it will usually not be used.

Changed in exaile:
status: Fix Committed → Fix Released
Revision history for this message
Dustin Spicuzza (dustin-virtualroadside) wrote :

This never made it into 3.3.x, targeting for 3.4.x instead.

Changed in exaile:
milestone: 3.3.0 → 3.4.0
status: Fix Released → Fix Committed
Changed in exaile:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.