Skip to content

Commit

Permalink
Merge branch 'release/2.4.0'
Browse files Browse the repository at this point in the history
Performance verbesserungen für MServer
  • Loading branch information
alex1702 committed Mar 1, 2017
2 parents a115572 + 20254c3 commit ca4646d
Show file tree
Hide file tree
Showing 18 changed files with 871 additions and 742 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ dist/javadoc
/nbproject/private/
.externalToolBuilders
.idea
version.properties
/src/main/resources/version.properties
/.nb-gradle/
RepoZugang.properties
31 changes: 18 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8

group = 'de.mediathekview'
version = '2.3.0'
version = '2.4.0'

ext {
propsFile = file('src/main/resources/version.properties').absoluteFile
Expand Down Expand Up @@ -69,20 +69,25 @@ dependencies {
compile 'com.fasterxml.jackson.core:jackson-core:2.7.0'
compile 'com.jidesoft:jide-oss:3.6.16'
compile 'org.tukaani:xz:1.5'
compile 'com.squareup.okhttp3:okhttp:3.6.0'
compile 'fm.void.jetm:jetm:1.2.3'

}

task updateVersion << {
Properties props = loadVersionProperties()
def oldVersion = props.getProperty('VERSION')
String buildDate = new Date().format('dd.MM.yyyy HH:mm:ss')
if (!oldVersion.equals(project.version)) {
logger.lifecycle "==msearch======================"
logger.lifecycle "Version: $project.version"
logger.lifecycle "Baudatum: $buildDate"
logger.lifecycle "==msearch======================"
props.setProperty('VERSION', project.version)
props.setProperty('DATE', buildDate)
props.store(propsFile.newWriter(), null)
task updateVersion {
doLast {
Properties props = loadVersionProperties()
def oldVersion = props.getProperty('VERSION')
String buildDate = new Date().format('dd.MM.yyyy HH:mm:ss')
if (!oldVersion.equals(project.version)) {
logger.lifecycle "==msearch======================"
logger.lifecycle "Version: $project.version"
logger.lifecycle "Baudatum: $buildDate"
logger.lifecycle "==msearch======================"
props.setProperty('VERSION', project.version)
props.setProperty('DATE', buildDate)
props.store(propsFile.newWriter(), null)
}
}
}
processResources.dependsOn updateVersion
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Oct 27 18:40:24 CEST 2016
#Sun Feb 26 14:24:27 CET 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4-bin.zip
19 changes: 11 additions & 8 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
Expand Down Expand Up @@ -154,16 +154,19 @@ if $cygwin ; then
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save ( ) {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [[ "$(uname)" == "Darwin" ]] && [[ "$HOME" == "$PWD" ]]; then
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
exec "$JAVACMD" "$@"
22 changes: 9 additions & 13 deletions src/main/java/mSearch/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
*/
package mSearch;

import java.util.concurrent.atomic.AtomicBoolean;

public class Config {

public static int bandbreite = 0; // maxBandbreite in Byte
private static String userAgent = null;
public static boolean debug = false; // Debugmodus
private static boolean stop = false; // damit kannn das Laden gestoppt werden
private static final AtomicBoolean stop = new AtomicBoolean(false); // damit kannn das Laden gestoppt werden

public static void setUserAgent(String ua) {
// Useragent den der Benutzer vorgegeben hat
Expand All @@ -40,27 +42,21 @@ public static String getUserAgent() {
}

/**
* Damit kann das Suchen abgebrochen werden
*/
public static synchronized void setStop() {
Config.stop = true;
}

/**
* Damit kann "stop" gesetzt/rückgesetzt werden
* Damit kann "stop" gesetzt/rückgesetzt werden.
* Bei true wird die Suche abgebrochen.
*
* @param set
*/
public static synchronized void setStop(boolean set) {
Config.stop = set;
public static void setStop(boolean set) {
stop.set(set);
}

/**
* Abfrage, ob ein Abbruch erfogte
*
* @return true/false
*/
public static synchronized boolean getStop() {
return Config.stop;
public static boolean getStop() {
return stop.get();
}
}
21 changes: 0 additions & 21 deletions src/main/java/mSearch/Const.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,33 +28,12 @@ public class Const {
public static final String PROGRAMMNAME = "MSearch";
public static final String USER_AGENT_DEFAULT = Const.PROGRAMMNAME + Functions.getProgVersionString();
// MediathekView URLs
// public static final String ADRESSE_FILMLISTEN_SERVER_XML = "http://zdfmediathk.sourceforge.net/update.xml";
// public static final String ADRESSE_FILMLISTEN_SERVER_JSON = "http://zdfmediathk.sourceforge.net/update-json.xml";
public static final String ADRESSE_FILMLISTEN_SERVER_DIFF = "http://res.mediathekview.de/diff.xml";
public static final String ADRESSE_FILMLISTEN_SERVER_AKT = "http://res.mediathekview.de/akt.xml";
// public static final String ADRESSE_FILMLISTEN_SERVER_DIFF_RES = "http://92.51.131.172/diff.xml";
// public static final String ADRESSE_FILMLISTEN_SERVER_AKT_RES = "http://92.51.131.172/akt.xml";

// public static final String DATEINAME_LISTE_FILMLISTEN = "filmlisten.xml";
public static final String ADRESSE_PROGRAMM_VERSION = "https://res.mediathekview.de/version.xml";
public static final String ADRESSE_DOWNLAD = "https://mediathekview.de/download/";
public static final String ADRESSE_ANLEITUNG = "https://github.com/mediathekview/MediathekView/wiki";
public static final String ADRESSE_VORLAGE_PROGRAMMGRUPPEN = "https://res.mediathekview.de/programmgruppen/programmgruppen.xml";
public static final String ADRESSE_WEBSITE = "https://mediathekview.de";
public static final String ADRESSE_FORUM = "https://forum.mediathekview.de";
// Dateien/Verzeichnisse
public static final String XML_DATEI = "mediathek.xml";
public static final String XML_DATEI_FILME = "filme.xml";
//
public static final int MIN_DATEI_GROESSE_FILM = 256 * 1000; //minimale Größe (256 kB) eines Films um nicht als Fehler zu gelten
public static final String KODIERUNG_UTF = "UTF-8";
public static final String KODIERUNG_ISO15 = "ISO-8859-15";
public static final String XML_START = "Mediathek";
public static final int MAX_SENDER_FILME_LADEN = 2;//es können maximal soviele Filme eines Senders/Servers gleichzeitig geladen werden
public static final int STRING_BUFFER_START_BUFFER = 8 * 1024 * 8; // 8 KiB
public static final String FORMAT_ZIP = ".zip";
public static final String FORMAT_XZ = ".xz";
public static final String FORMAT_JSON = ".json";
public static final String RTMP_PRTOKOLL = "rtmp";
public static final String RTMP_FLVSTREAMER = "-r ";
public static final int ALTER_FILMLISTE_SEKUNDEN_FUER_AUTOUPDATE = 3 * 60 * 60; // beim Start des Programms wir die Liste geladen wenn sie älter ist als ..
Expand Down
Loading

0 comments on commit ca4646d

Please sign in to comment.