View Bug Report
Library update removes all already registered media types
Bug #: 962
File: LibMediaProvider
Date: 07/17/14 01:20 PM
By: Garkin
Status: Fixed
As stated in the title:
When library is updated, all media types are wiped out, so it cause conflicts between addons.

To fix this issue you should probably change lines 13-15 to something like this:
Lua Code:
  1. LMP.DefaultMedia = LMP.DefaultMedia or {}
  2. LMP.MediaList = LMP.MediaList or {}
  3. LMP.MediaTable = LMP.MediaTable or {}

RSS 2.0 Feed for Bug CommentsNotes Sort Options
By: Garkin - 07/18/14 05:40 AM
I'm sorry but the changes I have posted before is not enough to make it working. You will need to change also lines 30, 41, 55, 72 and 78. All those lines are overwritting existing media table.
By: Seerah - 07/18/14 11:05 AM
Yep. I totally missed that, too.
By: Garkin - 07/20/14 08:35 AM
Possible r6 (I have tested that it is actually working):
http://pastebin.com/unp3E5G1
By: Garkin - 07/20/14 08:37 AM
Oh, oversight:

It is possible to define new media types, so line 16 should be:
LMP.MediaType = LMP.MediaType or {}
By: Seerah - 07/20/14 07:59 PM
Close. There's the table definition below that. Changed it to:
Lua Code:
  1. if not LMP.MediaType then
  2.     LMP.MediaType = {
  3.         BACKGROUND = "background"-- background textures
  4.         BORDER = "border",          -- border textures
  5.         FONT = "font",              -- fonts
  6.         STATUSBAR = "statusbar",    -- statusbar textures
  7.         SOUND = "sound",            -- sound files
  8.     }
  9. end