Skip to content

Commit

Permalink
Catch desktop exception, add linux wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
theotherp@gmx.de authored and theotherp@gmx.de committed Aug 6, 2017
1 parent 8655b42 commit 98d4141
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 3 deletions.
20 changes: 20 additions & 0 deletions ISSUE_TEMPLATE.md
@@ -0,0 +1,20 @@
You don't have to follow this template by the letter, just think about what you're trying to achieve ;-)

## How to do a bug report

* What do you expect to happen? What does happen?
* Have you searched for this problem? You don't have to answer, just make sure.
* Can the problem be reproduced? How?
* Use a proper title. Describe the problem succinctly, don't just copy and paste the error message.

**Set your log file level to debug, repeat the steps that cause the problem and post the debug info which can be retrieved in the [System / Bugreport section](http://127.0.0.1:5076system/bugreport). If other tools are involved post their logs as well.**

**I will close your issues if I you didn't provide proper information as described as above**

The more information you provide up front the higher the chance that I can help you.

## How to request a new feature
* What do you want to happen?
* If not clear, why do you want it?
* Do you think it's something only you need or something that might be popular?
* If need be explain the use case.
13 changes: 13 additions & 0 deletions LICENSE
@@ -0,0 +1,13 @@
Copyright 2017 The other P

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
9 changes: 7 additions & 2 deletions core/src/main/java/org/nzbhydra/misc/BrowserOpener.java
Expand Up @@ -18,10 +18,15 @@ public class BrowserOpener {
private ConfigProvider configProvider;

public void openBrowser() {
Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;
Desktop desktop = null;
try {
desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;
} catch (Exception e) {
logger.debug("Unable to get desktop");
}
URI uri = configProvider.getBaseConfig().getBaseUriBuilder().build().toUri();
logger.info("Opening {} in browser", uri);
if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {
logger.info("Opening {} in browser", uri);
try {
desktop.browse(uri);
} catch (Exception e) {
Expand Down
9 changes: 9 additions & 0 deletions linux-release/bin.xml
Expand Up @@ -21,5 +21,14 @@
<outputDirectory>./</outputDirectory>
<lineEnding>unix</lineEnding>
</fileSet>
<fileSet>
<directory>../</directory>
<outputDirectory>./</outputDirectory>
<includes>
<include>readme.md</include>
<include>LICENSE</include>
</includes>
<lineEnding>unix</lineEnding>
</fileSet>
</fileSets>
</assembly>
Binary file added linux-release/include/nzbhydra2
Binary file not shown.
2 changes: 2 additions & 0 deletions core/readme.md → readme.md
Expand Up @@ -27,6 +27,8 @@ TODO: Add wiki entries and link here
## Development and how you can help
Generally testing and any bug reports are very welcome.

I haven't been able to get the wrapper to run in docker. If you have found a way or want to help please let me know.

If you plan on doing any frontend work (JS, CSS, HTML): Please contact me first and don't just create a PR for changes on the merged CSS / JS files.

Please send merge requests to the develop branch!
Expand Down
10 changes: 9 additions & 1 deletion windows-release/bin.xml
Expand Up @@ -16,11 +16,19 @@
</includes>
</fileSet>
<fileSet>
<!--Would prefer to use a moduleset here or otherwise reference the -exec.jar but didn't get it to work-->
<directory>include</directory>
<outputDirectory>./</outputDirectory>
<lineEnding>crlf</lineEnding>
</fileSet>
<fileSet>
<directory>../</directory>
<outputDirectory>./</outputDirectory>
<includes>
<include>readme.md</include>
<include>LICENSE</include>
</includes>
<lineEnding>crlf</lineEnding>
</fileSet>
</fileSets>


Expand Down

0 comments on commit 98d4141

Please sign in to comment.