mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-21 16:19:49 +01:00
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() {
|
||||
assertEquals(suggestionReply.size() > 0, true);
|
||||
assertEquals(!suggestionReply.isEmpty(), true);
|
||||
}
|
||||
|
||||
public void testIfSuggestionsAreValid() {
|
||||
|
@ -130,7 +130,7 @@ public class DownloadDialog extends DialogFragment {
|
||||
private String createFileName(String fName) {
|
||||
// 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("[\\*\"/\\\\\\[\\]\\:\\;\\|\\=\\,]+"); // Windows
|
||||
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
|
||||
if(streamInfo.dashMpdUrl != null && !streamInfo.dashMpdUrl.isEmpty()) {
|
||||
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
|
||||
// same as the quick and dirty aboth
|
||||
|
@ -569,9 +569,8 @@ public class YoutubeStreamExtractor extends StreamExtractor {
|
||||
int hours = (hoursString.isEmpty() ? 0 : Integer.parseInt(hoursString));
|
||||
|
||||
//don't trust BODMAS!
|
||||
int ret = seconds + (60 * minutes) + (3600 * hours);
|
||||
return seconds + (60 * minutes) + (3600 * hours);
|
||||
//Log.d(TAG, "derived timestamp value:"+ret);
|
||||
return ret;
|
||||
//the ordering varies internationally
|
||||
} catch (ParsingException e) {
|
||||
throw new ParsingException("Could not get timestamp.", e);
|
||||
|
Loading…
Reference in New Issue
Block a user