kopia lustrzana https://github.com/TeamNewPipe/NewPipe
Merge pull request #237 from DevFactory/release/general-code-quality-fix-2
General code quality fix-2pull/261/head
commit
6a8c4a65c5
|
@ -110,7 +110,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);
|
||||
|
|
Ładowanie…
Reference in New Issue