public synchronized static void insertRelease(Release r) {
    Connection connection = null;
    Statement statement = null;
    PreparedStatement pstmt = null;

    try {
      Class.forName("org.sqlite.JDBC");
      connection = DriverManager.getConnection("jdbc:sqlite:"+Settings.DB_PATH);
      statement  = connection.createStatement();
      statement.setQueryTimeout(30);

      int teamID = 0;
      if (r.getTeam() != null)
        teamID = DB.getTeamId(statement, r.getTeam());

      int trackerID = DB.getTrackerId(statement, r.getTracker());

      Date releaseDate = new java.sql.Date(r.getReleaseDate().toDate().getTime()); // Look good, right ?
      Calendar currenttime = Calendar.getInstance();
      Date addDate = new java.sql.Date((currenttime.getTime()).getTime());


      String query = "insert into " + Settings.DB_TABLE_RELEASE + " (name, " +
        "quality, seasonEpisode, source, codec, subtitled, releaseDate, addDate, " +
        "idTracker, idTeam) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
      pstmt = connection.prepareStatement(query);
      pstmt.setString(1, r.getName());
      pstmt.setString(2, r.getQuality());
      pstmt.setString(3, r.getSeasonAndEpisode());
      pstmt.setString(4, r.getSource());
      pstmt.setString(5, r.getCodec());
      pstmt.setBoolean(6, r.isSubtitled());
      pstmt.setDate(7, releaseDate);
      pstmt.setDate(8, addDate);
      pstmt.setInt(9, trackerID);
      pstmt.setInt(10, teamID);
      pstmt.executeUpdate();
    }
    catch(Exception e)
    {
      Logger.logError(e.getMessage());
    }
    finally
    {
      try
      {
        if(connection != null)
          connection.close();
      }
      catch(SQLException e)
      {
        Logger.logError(e.getMessage());
      }
    }
  }