Ease new actions development and integration

Bug #233112 reported by Benjamin Kampmann
2
Affects Status Importance Assigned to Milestone
Moovida
Fix Released
Critical
Benjamin Kampmann

Bug Description

Currently a developer has to hack the different activities to make them support his new action.

We need a way to plug actions to activities or uris much easier.

Revision history for this message
Florian Boucault (fboucault) wrote :

Related work is ongoing and this ticket is just too vague.

Revision history for this message
Benjamin Kampmann (benjamin-fluendo) wrote :

well.

WE decided together(!!!) in a meeting that that's a problem and I should open that ticket. It was so vague, because we didn't have any idea how/what to make.

But if it is to vague for you, here you get an example:
If there is a developer, who makes an action to be able to rate an audio-file, we should be able to display it in the menu or to make it accessable for the user. Because we don't know _all_ actions that might come or could be activitated by the user, we need a generic way to do this (like we have a generic way to access metadata without knowing all the metadata providers).

That is still valid!

Revision history for this message
Florian Boucault (fboucault) wrote :

That is a use-case. We now need more of them. Also, there is no need to get over-excited.

Revision history for this message
Benjamin Kampmann (benjamin-fluendo) wrote :

more usecases? Okay:

 * an action for ripping audiocd-tracks to mp3/ogg/flac
 * an action for making an ISO of any cd/dvd inserted
 * an action to download stage6-movies (or other extern data) to the local system
 * an action to add something to favorite-data (like my favorites movies) or
 * an action love/hate to rate media
 * an action to find similar songs (related to #577)
 * an action to send a uri (for e.g. a stage6 or youtube one) to another elisa (for e.g. using a jabber service or pidgin over dbus)
 * an action to eject an audiocd (like we have for videodvd)
 * an action to upload images to flickr (or something)
 * an action to upload videos to stage6/youtube or something
 * an action to add tags to media (or to sort it into categories or both)
 * an action to display metadata of a media (like exif) and/or
 * an action to edit metadata (and write it to the file)
 * an action to transfer media to another elisa system (not the uri only) or to transfer it using jabber/pidigin (over dbus)
 * an action to select a (special) cover or poster for audio or video media

to be continued... (if you want to have)

A lot of them can be done by external or free developers, the only thing we need is a generic, smart and easy possibility to integrate them into elisa without changing the code...

Revision history for this message
Philippe Normand (philn) wrote :

Here's a plan to make it happen. Currently the actions are created by the media_menu_activity.

- In menu_activity we should add the ability for the activity to create an action component given its path (plugin:component_name). Let's name that method: _create_action(path) for instance.
- in media_menu_activity config we can add 2 options:

  * directory_actions: list of strings indicating action paths
  * file_actions: list of strings indicating action paths

- media_menu_activity would use these options, call _create_action for each value of the lists, create menu_models and insert them at the correct places in the menu tree.
- we would need to add additional data (such as the menu label) to the actions

Revision history for this message
Philippe Normand (philn) wrote :

The above plan doesn't solve all use-cases obviously. Example:"an action for ripping audiocd-tracks to mp3/ogg/flac". For this kind of thing we can provide some API addition in media_provider:

- get_directory_actions(directory_uri): returns list of action paths
- get_file_actions(file_uri): returns list of action paths

The activity would then be able to use that new API to on-the-file create new actions depending of the uri scheme and/or uri "type" (file/directory).

Revision history for this message
Florian Boucault (fboucault) wrote :

To sum up a little, actions should be able to access to launch any kind of task which may or may not have a UI.

Revision history for this message
Florian Boucault (fboucault) wrote :

It is not possible currently because Actions have access only to the controller which calls it.

Also, Actions should probably not be assigned to a model instance but rather in the controller layer:

- models would be more reusable

- it would probably waste less memory

- it would provide more flexibility

Revision history for this message
Florian Boucault (fboucault) wrote :

Postponing. Raising priority and severity.

Changed in elisa:
milestone: 0.3.6 → none
Changed in elisa:
assignee: benjamin-fluendo → lightyear
Changed in elisa:
milestone: none → 0.5.1
status: New → 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.