mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 09:49:30 +02:00
40 lines
No EOL
1.6 KiB
Text
40 lines
No EOL
1.6 KiB
Text
-------------------------------------------------------------------------------
|
|
----------------- PLUGINS - Ampache v.3.6 ----------------------
|
|
-------------------------------------------------------------------------------
|
|
|
|
Plugins are placed in modules/plugins; the name of the file must be
|
|
<Name>.plugin.php, e.g. Dummy.plugin.php. The file must declare a
|
|
corresponding class and the name of the class must be prefixed with
|
|
Ampache, e.g. AmpacheDummy.
|
|
|
|
The following public variables must be declared:
|
|
name (string)
|
|
description (string)
|
|
version (int) - This plugin's version
|
|
min_ampache (int) - Minimum Ampache DB version required
|
|
max_ampache (int) - Maximum Ampache DB version supported
|
|
|
|
The following public methods must be implemented:
|
|
install
|
|
uninstall
|
|
load
|
|
|
|
The following public methods may be implemented:
|
|
upgrade
|
|
|
|
Finally, for the plugin to actually be useful one or more of the following hooks
|
|
should be implemented as a public method:
|
|
get_metadata(Array $metadata)
|
|
The passed array contains the best metadata we've got.
|
|
save_rating(Rating $rating, int $new_value)
|
|
save_mediaplay(Media $media)
|
|
get_lyrics(Song $song)
|
|
process_wanted(Wanted $wanted)
|
|
shortener(string $url)
|
|
get_photos(string $search)
|
|
gather_arts(string $type, array $options, int $limit)
|
|
get_song_preview(string $track_mbid, string $artist_name, string $title)
|
|
stream_song_preview(string $file)
|
|
display_home()
|
|
external_share(string $url, string $text)
|
|
display_user_field(User $user, library_item $libitem = null) |