Reduce log spam during feed update (#7667)

This commit is contained in:
ByteHamster 2025-02-21 21:51:50 +01:00 committed by GitHub
parent 613dcc143f
commit dd82ec143f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 10 deletions

View File

@ -455,9 +455,7 @@ public class NavDrawerFragment extends Fragment implements SharedPreferences.OnS
public static String getLastNavFragment(Context context) {
SharedPreferences prefs = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);
String lastFragment = prefs.getString(PREF_LAST_FRAGMENT_TAG, HomeFragment.TAG);
Log.d(TAG, "getLastNavFragment() -> " + lastFragment);
return lastFragment;
return prefs.getString(PREF_LAST_FRAGMENT_TAG, HomeFragment.TAG);
}
@Override

View File

@ -4,8 +4,6 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.io.Serializable;
import java.util.Date;
@ -493,7 +491,7 @@ public class FeedItem implements Serializable {
@NonNull
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
return "FeedItem [id=" + id + ", title=" + title + ", feedId=" + feedId + ", pubDate=" + pubDate + "]";
}
@Override

View File

@ -85,7 +85,7 @@ public class Atom extends Namespace {
String strSize = attributes.getValue(LINK_LENGTH);
long size = 0;
try {
if (strSize != null) {
if (!TextUtils.isEmpty(strSize)) {
size = Long.parseLong(strSize);
}
} catch (NumberFormatException e) {

View File

@ -54,7 +54,10 @@ public class Rss20 extends Namespace {
&& MimeTypeUtils.isMediaFile(mimeType) && validUrl) {
long size = 0;
try {
size = Long.parseLong(attributes.getValue(ENC_LEN));
String sizeStr = attributes.getValue(ENC_LEN);
if (!TextUtils.isEmpty(sizeStr)) {
size = Long.parseLong(sizeStr);
}
if (size < 16384) {
// less than 16kb is suspicious, check manually
size = 0;

View File

@ -187,8 +187,6 @@ public abstract class FeedDatabaseWriter {
|| priorMostRecentDate.before(item.getPubDate())
|| priorMostRecentDate.equals(item.getPubDate());
if (savedFeed.getState() == Feed.STATE_SUBSCRIBED && shouldPerformNewEpisodesAction) {
Log.d(TAG, "Performing new episode action for item published on " + item.getPubDate()
+ ", prior most recent date = " + priorMostRecentDate);
FeedPreferences.NewEpisodesAction action = savedFeed.getPreferences().getNewEpisodesAction();
if (action == FeedPreferences.NewEpisodesAction.GLOBAL) {
action = UserPreferences.getNewEpisodesAction();