Skip to content

Commit 799faec

Browse files
committed
Merge pull request #80 from chschtsch/master
Update layout (initially suggested by @darkon5) + miscellaneous fixes
2 parents 596443b + 731321b commit 799faec

16 files changed

Lines changed: 59 additions & 44 deletions

File tree

.idea/dictionaries/the_scrabi.xml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.idea/gradle.xml

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/app.iml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@
9292
</content>
9393
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
9494
<orderEntry type="sourceFolder" forTests="false" />
95+
<orderEntry type="library" exported="" name="rhino-1.7.7" level="project" />
9596
<orderEntry type="library" exported="" name="recyclerview-v7-23.1.0" level="project" />
97+
<orderEntry type="library" exported="" name="support-annotations-23.1.0" level="project" />
98+
<orderEntry type="library" exported="" name="appcompat-v7-23.1.0" level="project" />
99+
<orderEntry type="library" exported="" name="design-23.1.0" level="project" />
96100
<orderEntry type="library" exported="" name="jsoup-1.8.3" level="project" />
97101
<orderEntry type="library" exported="" name="support-v4-23.1.0" level="project" />
98-
<orderEntry type="library" exported="" name="rhino-1.7.7" level="project" />
99-
<orderEntry type="library" exported="" name="design-23.1.0" level="project" />
100-
<orderEntry type="library" exported="" name="appcompat-v7-23.1.0" level="project" />
101-
<orderEntry type="library" exported="" name="support-annotations-23.1.0" level="project" />
102102
</component>
103103
</module>

app/src/main/java/org/schabi/newpipe/VideoInfoItemViewCreator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public View getViewByVideoInfoItem(View convertView, ViewGroup parent, VideoInfo
5151
}
5252

5353
if(info.thumbnail == null) {
54-
holder.itemThumbnailView.setImageResource(R.drawable.dummi_thumbnail);
54+
holder.itemThumbnailView.setImageResource(R.drawable.dummy_thumbnail);
5555
} else {
5656
holder.itemThumbnailView.setImageBitmap(info.thumbnail);
5757
}

app/src/main/java/org/schabi/newpipe/youtube/YoutubeExtractor.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ public VideoInfo getVideoInfo(String siteUrl) {
288288
videoInfo.upload_date = doc.select("strong[class=\"watch-time-text\"").first()
289289
.text();
290290

291-
// Try to only use date not the text around it
292-
videoInfo.upload_date = matchGroup1("([0-9.]*$)", videoInfo.upload_date);
291+
// Extracting the date itself from header
292+
videoInfo.upload_date = matchGroup1("([A-Za-z]{3}\\s[\\d]{1,2},\\s[\\d]{4}$)", videoInfo.upload_date);
293293

294294
// description
295295
videoInfo.description = doc.select("p[id=\"eow-description\"]").first()
@@ -320,6 +320,9 @@ public VideoInfo getVideoInfo(String siteUrl) {
320320
// view count
321321
videoInfo.view_count = doc.select("div[class=\"watch-view-count\"]").first().text();
322322

323+
// Extracting the number of views from header
324+
videoInfo.view_count = matchGroup1("([0-9,]*$)", videoInfo.view_count);
325+
323326
// next video
324327
videoInfo.nextVideo = extractVideoInfoItem(doc.select("div[class=\"watch-sidebar-section\"]").first()
325328
.select("li").first());
@@ -383,7 +386,7 @@ private VideoInfo.AudioStream[] parseDashManifest(String dashManifest, String de
383386
format = MediaFormat.M4A.id;
384387
}
385388
audioStreams.add(new VideoInfo.AudioStream(parser.getText(),
386-
format, currentBandwidth, currentSamplingRate));
389+
format, currentBandwidth, currentSamplingRate));
387390
}
388391
case XmlPullParser.END_TAG:
389392
if(tagName.equals("AdaptationSet")) {
File renamed without changes.

app/src/main/res/layout-land/fragment_videoitem_detail.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
android:layout_alignParentLeft="true"
3434
android:layout_alignParentTop="true"
3535
android:adjustViewBounds="true"
36-
android:src="@drawable/dummi_thumbnail"/>
36+
android:src="@drawable/dummy_thumbnail"/>
3737

3838
<TextView android:id="@+id/detailVideoTitleView"
3939
android:layout_width="wrap_content"
@@ -53,7 +53,7 @@
5353
android:paddingRight="5dp"
5454
android:layout_below="@id/detailVideoTitleView"
5555
android:layout_alignParentLeft="true"
56-
android:src="@drawable/budy" />
56+
android:src="@drawable/buddy" />
5757

5858
<TextView android:id="@+id/detailUploaderView"
5959
android:layout_width="wrap_content"

0 commit comments

Comments
 (0)