public void init(){
  SystemProperties props=SystemProperties.getInstance();
  Path playlistFolder=props.getApplicationFolder("playlist");
  String defaultPlaylistFile=props.get("playlist.v2.defaultfilename","playlist_v2.xml");
  String playlistFile=props.get("playlist.v2.currentfilename",defaultPlaylistFile);
  mCurrentPlaylistPath=playlistFolder.resolve(playlistFile);
  PlaylistV2 playlist=load(mCurrentPlaylistPath);
  boolean saveRequired=false;
  if (playlist == null) {
    mLog.info("Couldn't find version 2 playlist - looking for " + "version 1 playlist to convert");
    Path playlistV1Path=playlistFolder.resolve("playlist.xml");
    PlaylistConverterV1ToV2 converter=new PlaylistConverterV1ToV2(playlistV1Path);
    if (converter.hasErrorMessages()) {
      mLog.error("Playlist version 1 conversion errors: " + converter.getErrorMessages());
    }
    playlist=converter.getConvertedPlaylist();
    saveRequired=true;
  }
  transferPlaylistToModels(playlist);
  if (saveRequired) {
    schedulePlaylistSave();
  }
}

public void init ( ) { SystemProperties props = SystemProperties . getInstance ( ) ; Path playlistFolder = props . getApplicationFolder ( "playlist" ) ; String defaultPlaylistFile = props . get ( "playlist.v2.defaultfilename" , "playlist_v2.xml" ) ; String playlistFile = props . get ( "playlist.v2.currentfilename" , defaultPlaylistFile ) ; mCurrentPlaylistPath = playlistFolder . resolve ( playlistFile ) ; PlaylistV2 playlist = load ( mCurrentPlaylistPath ) ; boolean saveRequired = false ; if ( playlist == null ) { mLog . info ( "Couldn't find version 2 playlist - looking for " + "version 1 playlist to convert" ) ; Path playlistV1Path = playlistFolder . resolve ( "playlist.xml" ) ; PlaylistConverterV1ToV2 converter = new PlaylistConverterV1ToV2 ( playlistV1Path ) ; if ( converter . hasErrorMessages ( ) ) { mLog . error ( "Playlist version 1 conversion errors: " + converter . getErrorMessages ( ) ) ; } playlist = converter . getConvertedPlaylist ( ) ; saveRequired = true ; } transferPlaylistToModels ( playlist ) ; if ( saveRequired ) { schedulePlaylistSave ( ) ; } }
loads playlist from the current playlist file , or the default playlist file , as specified in the current sdrtrunk system settings
