Package phones :: Module com_lg :: Class LGNewIndexedMedia2
[hide private]
[frames] | no frames]

Class LGNewIndexedMedia2

source code

LGNewIndexedMedia --+
                    |
                   LGNewIndexedMedia2
Known Subclasses:

Implements media for LG phones that use the newer index format such as the VX8100/5200 Similar ot the other new media type hence the subclassing, but the type field in the PACKET has a different meaning so different code is required and it has support for an icon field that affects whcih icon is displayed next to the tone on the phone

Instance Methods [hide private]
 
_guessvtype(self, filename, typemajor) source code
 
getmediaindex(self, builtins, maps, results, key)
Gets the media (wallpaper/ringtone) index
source code
 
getmedia(self, maps, results, key) source code
 
savemedia(self, mediakey, mediaindexkey, maps, results, merge, reindexfunction)
Actually saves out the media
source code

Inherited from LGNewIndexedMedia: __init__, getindex, getringtoneindices, getringtones, getwallpaperindices, getwallpapers, saveringtones, savewallpapers

Class Variables [hide private]
  _minor_typemap = {'.3g2': 3, '.bmp': 1, '.jpg': 3, '.mid': 4, ...
Method Details [hide private]

_guessvtype(self, filename, typemajor)

source code 
Overrides: LGNewIndexedMedia._guessvtype

getmediaindex(self, builtins, maps, results, key)

source code 

Gets the media (wallpaper/ringtone) index

Parameters:
  • builtins - the builtin list on the phone
  • results - places results in this dict
  • maps - the list of index files and locations
  • key - key to place results in
Overrides: LGNewIndexedMedia.getmediaindex

getmedia(self, maps, results, key)

source code 
Overrides: LGNewIndexedMedia.getmedia

savemedia(self, mediakey, mediaindexkey, maps, results, merge, reindexfunction)

source code 

Actually saves out the media

Parameters:
  • mediakey - key of the media (eg 'wallpapers' or 'ringtones')
  • mediaindexkey - index key (eg 'wallpaper-index')
  • maps - list index files and locations
  • results - results dict
  • merge - are we merging or overwriting what is there?
  • reindexfunction - the media is re-indexed at the end. this function is called to do it
Overrides: LGNewIndexedMedia.savemedia

Class Variable Details [hide private]

_minor_typemap

Value:
{'.3g2': 3, '.bmp': 1, '.jpg': 3, '.mid': 4, '.qcp': 5}