Fixing squid:S1155, squid:S2293, squid:S1488
This commit is contained in:
parent
35e11e43de
commit
2f9142419a
|
@ -101,7 +101,7 @@ public class YoutubeSearchEngineTest extends AndroidTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testIfSuggestionsAreReplied() {
|
public void testIfSuggestionsAreReplied() {
|
||||||
assertEquals(suggestionReply.size() > 0, true);
|
assertEquals(!suggestionReply.isEmpty(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testIfSuggestionsAreValid() {
|
public void testIfSuggestionsAreValid() {
|
||||||
|
|
|
@ -130,7 +130,7 @@ public class DownloadDialog extends DialogFragment {
|
||||||
private String createFileName(String fName) {
|
private String createFileName(String fName) {
|
||||||
// from http://eng-przemelek.blogspot.de/2009/07/how-to-create-valid-file-name.html
|
// from http://eng-przemelek.blogspot.de/2009/07/how-to-create-valid-file-name.html
|
||||||
|
|
||||||
List<String> forbiddenCharsPatterns = new ArrayList<String> ();
|
List<String> forbiddenCharsPatterns = new ArrayList<> ();
|
||||||
forbiddenCharsPatterns.add("[:]+"); // Mac OS, but it looks that also Windows XP
|
forbiddenCharsPatterns.add("[:]+"); // Mac OS, but it looks that also Windows XP
|
||||||
forbiddenCharsPatterns.add("[\\*\"/\\\\\\[\\]\\:\\;\\|\\=\\,]+"); // Windows
|
forbiddenCharsPatterns.add("[\\*\"/\\\\\\[\\]\\:\\;\\|\\=\\,]+"); // Windows
|
||||||
forbiddenCharsPatterns.add("[^\\w\\d\\.]+"); // last chance... only latin letters and digits
|
forbiddenCharsPatterns.add("[^\\w\\d\\.]+"); // last chance... only latin letters and digits
|
||||||
|
|
|
@ -127,7 +127,7 @@ public class StreamInfo extends AbstractVideoInfo {
|
||||||
// also try to get streams from the dashMpd
|
// also try to get streams from the dashMpd
|
||||||
if(streamInfo.dashMpdUrl != null && !streamInfo.dashMpdUrl.isEmpty()) {
|
if(streamInfo.dashMpdUrl != null && !streamInfo.dashMpdUrl.isEmpty()) {
|
||||||
if(streamInfo.audio_streams == null) {
|
if(streamInfo.audio_streams == null) {
|
||||||
streamInfo.audio_streams = new Vector<AudioStream>();
|
streamInfo.audio_streams = new Vector<>();
|
||||||
}
|
}
|
||||||
//todo: make this quick and dirty solution a real fallback
|
//todo: make this quick and dirty solution a real fallback
|
||||||
// same as the quick and dirty aboth
|
// same as the quick and dirty aboth
|
||||||
|
|
|
@ -569,9 +569,8 @@ public class YoutubeStreamExtractor extends StreamExtractor {
|
||||||
int hours = (hoursString.isEmpty() ? 0 : Integer.parseInt(hoursString));
|
int hours = (hoursString.isEmpty() ? 0 : Integer.parseInt(hoursString));
|
||||||
|
|
||||||
//don't trust BODMAS!
|
//don't trust BODMAS!
|
||||||
int ret = seconds + (60 * minutes) + (3600 * hours);
|
return seconds + (60 * minutes) + (3600 * hours);
|
||||||
//Log.d(TAG, "derived timestamp value:"+ret);
|
//Log.d(TAG, "derived timestamp value:"+ret);
|
||||||
return ret;
|
|
||||||
//the ordering varies internationally
|
//the ordering varies internationally
|
||||||
} catch (ParsingException e) {
|
} catch (ParsingException e) {
|
||||||
throw new ParsingException("Could not get timestamp.", e);
|
throw new ParsingException("Could not get timestamp.", e);
|
||||||
|
|
Loading…
Reference in New Issue