<commit_before>/*
 * Copyright (C) 2014 Easy Target
 *
 * 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.txt
 *
 * 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.
 */

package org.eztarget.vidcheroo;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.util.Properties;

import uk.co.caprica.vlcj.binding.LibVlc;
import uk.co.caprica.vlcj.runtime.RuntimeUtil;

import com.sun.jna.Native;
import com.sun.jna.NativeLibrary;

public class VidcherooConfig {
	
	private static VidcherooConfig instance = null;

	// TODO: Find further variations of this.
	private static final String VLC_DEFAULT_PATH_LIN = "/usr/lib/vlc";
	private static final String VLC_DEFAULT_PATH_OSX = "/Applications/VLC.app/Contents/MacOS/lib";
	private static final String VLC_DEFAULT_PATH_W32 = "C:\\Program Files\\VideoLAN\\VLC\\";
	private static final String VLC_DEFAULT_PATH_W64 = "C:/Program Files(x86)/VideoLAN/VLC/";
	
	private static String mediaPath;
	private static String vlcPath;
	private static float tempo = 120f;
	
	/*
	 * Singleton Constructor Methods
	 */
	
	protected VidcherooConfig() {
		restoreConfigProperties();
		
		// TODO: Find VLC without help.
		if (vlcPath == null) {
			switch (Engine.getOs()) {
			case LIN:
				setVlcPath(VLC_DEFAULT_PATH_LIN);
				break;
			case OSX:
				setVlcPath(VLC_DEFAULT_PATH_OSX);
				break;
			case WIN:
				setVlcPath(VLC_DEFAULT_PATH_W64);
				// TODO: Try other directory on fail.<commit_msg>Corrected VLC paths<commit_after>/*
 * Copyright (C) 2014 Easy Target
 *
 * 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.txt
 *
 * 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.
 */

package org.eztarget.vidcheroo;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.util.Properties;

import uk.co.caprica.vlcj.binding.LibVlc;
import uk.co.caprica.vlcj.runtime.RuntimeUtil;

import com.sun.jna.Native;
import com.sun.jna.NativeLibrary;

public class VidcherooConfig {
	
	private static VidcherooConfig instance = null;

	// TODO: Find further variations of this.
	private static final String VLC_DEFAULT_PATH_LIN = "/usr/lib/vlc";
	private static final String VLC_DEFAULT_PATH_OSX = "/Applications/VLC.app/Contents/MacOS/lib";
	private static final String VLC_DEFAULT_PATH_WIN = "C:\\Program Files\\VLC\\";
	private static final String VLC_DEFAULT_PATH_WI2 = "C:\\Program Files (x86)\\VideoLAN\\VLC\\";
	
	private static String mediaPath;
	private static String vlcPath;
	private static float tempo = 120f;
	
	/*
	 * Singleton Constructor Methods
	 */
	
	protected VidcherooConfig() {
		restoreConfigProperties();
		
		// TODO: Find VLC without help.
		if (vlcPath == null) {
			switch (Engine.getOs()) {
			case LIN:
				setVlcPath(VLC_DEFAULT_PATH_LIN);
				break;
			case OSX:
				setVlcPath(VLC_DEFAULT_PATH_OSX);
				break;
			case WIN:
				setVlcPath(VLC_DEFAULT_PATH_WIN);
				// TODO: Try other directory on fail.
{'fraction_non_alphanumeric': 0.09337570276216084, 'fraction_numerical': 0.008066487411390858, 'mean_word_length': 4.064356435643564, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '966716', 'n_tokens_mistral': 1363, 'n_tokens_neox': 1243, 'n_words': 394}