MediaLibrary Plugin

From

Jump to: navigation, search

Contents

Media Library

Overview

This plugin handles all media storage related things, such as Playlist generation, id3 tag reading, playlist editing, and loading/saving of playlists. This is one of the core plugins, without which RevFE simply ceases to functon properly, so this plugin, or an equivalant one is required for normal operation. MediaLibrary maintains an internal list of all media currently accounted for by the system. This is a list of MediaFileClass objects. Each object has within it the full file path of the file, as well as an ID3Tag structure with the pertenant information about the file. MediaLibrary can either generate this information on the fly, or save and load it from a sqlite3 .db file. Once a folder is scanned for media, each file is added to the MediaList with an invalid ID3 tag. At this point, a scanning loop is entered, and each tag is populated with the proper data as the files are read. This is a slow process, hence saving this information to a sqlite3 database. Once all media is scanned for id3 tag information, you can generate folder based, or "album" tag based playlists. These playlists contain references to the media files that are contained by them, to save memory, rather than copies. Once the initial playlist creation is complete, playlists can be created, deleted, and edited completly independant of the origional playlist structure. The initial generation is only intended to be a starting point, assuming you have enough media to warrant multiple playlists.

Once all the media is loaded, you can then tell MediaLibrary to set the current playlist for playing. This is done via the following command: "MediaLibrary:playlist set !title!"

This command causes MediaLibrary to make a copy of the selected list, set its name as "Current Playlist", and throw event:playlistloaded as well as setting the qml property list currentPlaylistModel.

Skinning Properties

propertyMap

Media_Scanner_Progress - Progress text for media scanning and tag reading

Standard ListModels

  • currentPlaylistModel
    • text = "artist - title"
  • MEDIA_EDIT_CURRENT_LIST
    • text = full path of file
  • MEDIA_EDIT_FILELIST
    • text = list of files in "current" directory
  • MEDIA_EDIT_DIRLIST
    • text = directory of dirs in "current" directory
  • playlistListModel
    • text = playlist name

Complex ListModels

none

Events

  • event:newmedialist
    • Thrown when the main media list has been updated, so plugins should re-request the list
  • event:mediascanfinished
    • Thrown when the media scanner has finished scanning the current set of media.
  • event:playlistloaded title (optional)autostart (optional+1)pos (optional+2)song
    • Throw when a new playlist has been loaded. The option parameters are included if media library wishes the MediaEngine to automatically start playback
  • event:newmediadir
    • Fired when a new media dir is set. This event is no longer in use

Available Commands

Work In Progress

Personal tools
MediaWiki Appliance - Powered by TurnKey Linux