String userId = req.getParameter("userId");
String uri = "https://gdata.youtube.com/feeds/api/users/"
+ userId;
if (uri != null && uri.length() > 0) {
if (AuthorModel.getById(uri) == null) {
Author author = new Author();
author.setUri(uri);
String[] spl = uri.split("/");
author.setName(spl[spl.length - 1]);
author = YoutubeService.getUserProfile(author);
author.setStatus(1);
author.setBumpPoint(Calendar.getInstance()
.getTimeInMillis() / 1000);
author.setUpdated(Calendar.getInstance().getTime());
AuthorModel.insert(author);
com.tubeonfire.model.AuthorModel.clearModelCache();
}
}
}