From 8da694d0f6eebd9004fbe825ca20c2b09d16387c Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 6 Feb 2013 14:09:35 +0000 Subject: [PATCH] * customize filebot user agent so it doesn't get blocked --- source/net/sourceforge/filebot/Main.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/net/sourceforge/filebot/Main.java b/source/net/sourceforge/filebot/Main.java index 8dc20107..d5522332 100644 --- a/source/net/sourceforge/filebot/Main.java +++ b/source/net/sourceforge/filebot/Main.java @@ -111,7 +111,10 @@ public class Main { CacheManager.getInstance().clearAll(); } - // set unixfs system property + // update system properties + if (System.getProperty("http.agent") == null) { + System.setProperty("http.agent", String.format("%s %s", getApplicationName(), getApplicationVersion())); + } if (args.unixfs) { System.setProperty("unixfs", "true"); }