Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .idea/dictionaries/the_scrabi.xml

This file was deleted.

5 changes: 2 additions & 3 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@
</content>
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="rhino-1.7.7" level="project" />
<orderEntry type="library" exported="" name="recyclerview-v7-23.1.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.1.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-23.1.0" level="project" />
<orderEntry type="library" exported="" name="design-23.1.0" level="project" />
<orderEntry type="library" exported="" name="jsoup-1.8.3" level="project" />
<orderEntry type="library" exported="" name="support-v4-23.1.0" level="project" />
<orderEntry type="library" exported="" name="rhino-1.7.7" level="project" />
<orderEntry type="library" exported="" name="design-23.1.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-23.1.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.1.0" level="project" />
</component>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public View getViewByVideoInfoItem(View convertView, ViewGroup parent, VideoInfo
}

if(info.thumbnail == null) {
holder.itemThumbnailView.setImageResource(R.drawable.dummi_thumbnail);
holder.itemThumbnailView.setImageResource(R.drawable.dummy_thumbnail);
} else {
holder.itemThumbnailView.setImageBitmap(info.thumbnail);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ public VideoInfo getVideoInfo(String siteUrl) {
videoInfo.upload_date = doc.select("strong[class=\"watch-time-text\"").first()
.text();

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

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

// Extracting the number of views from header
videoInfo.view_count = matchGroup1("([0-9,]*$)", videoInfo.view_count);

// next video
videoInfo.nextVideo = extractVideoInfoItem(doc.select("div[class=\"watch-sidebar-section\"]").first()
.select("li").first());
Expand Down Expand Up @@ -383,7 +386,7 @@ private VideoInfo.AudioStream[] parseDashManifest(String dashManifest, String de
format = MediaFormat.M4A.id;
}
audioStreams.add(new VideoInfo.AudioStream(parser.getText(),
format, currentBandwidth, currentSamplingRate));
format, currentBandwidth, currentSamplingRate));
}
case XmlPullParser.END_TAG:
if(tagName.equals("AdaptationSet")) {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout-land/fragment_videoitem_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:src="@drawable/dummi_thumbnail"/>
android:src="@drawable/dummy_thumbnail"/>

<TextView android:id="@+id/detailVideoTitleView"
android:layout_width="wrap_content"
Expand All @@ -53,7 +53,7 @@
android:paddingRight="5dp"
android:layout_below="@id/detailVideoTitleView"
android:layout_alignParentLeft="true"
android:src="@drawable/budy" />
android:src="@drawable/buddy" />

<TextView android:id="@+id/detailUploaderView"
android:layout_width="wrap_content"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout-sw600dp/fragment_videoitem_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:src="@drawable/dummi_thumbnail"/>
android:src="@drawable/dummy_thumbnail"/>

<TextView android:id="@+id/detailVideoTitleView"
android:layout_width="wrap_content"
Expand All @@ -53,7 +53,7 @@
android:paddingRight="5dp"
android:layout_below="@id/detailVideoTitleView"
android:layout_alignParentLeft="true"
android:src="@drawable/budy" />
android:src="@drawable/buddy" />

<TextView android:id="@+id/detailUploaderView"
android:layout_width="wrap_content"
Expand Down
40 changes: 25 additions & 15 deletions app/src/main/res/layout/fragment_videoitem_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:src="@drawable/dummi_thumbnail"/>
android:src="@drawable/dummy_thumbnail"/>

<TextView android:id="@+id/detailVideoTitleView"
android:layout_width="wrap_content"
Expand All @@ -42,19 +42,21 @@
android:layout_alignParentLeft="true"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingBottom="20dp"
android:paddingBottom="0dp"
android:paddingTop="3dp"
android:textStyle="bold"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Bla blabla !!!"/>
android:text="Video title placeholder"/>

<ImageView android:id="@+id/detailUploaderThumbnailView"
android:layout_width="85dp"
android:layout_height="100dp"
android:paddingTop="25dp"
android:paddingTop="0dp"
android:paddingLeft="2dp"
android:paddingRight="2dp"
android:layout_below="@id/detailVideoTitleView"
android:layout_alignParentLeft="true"
android:src="@drawable/budy" />
android:src="@drawable/buddy" />

<TextView android:id="@+id/detailUploaderView"
android:layout_width="wrap_content"
Expand All @@ -63,19 +65,22 @@
android:layout_alignParentLeft="true"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Herr von Gurken" />
android:textStyle="bold"
android:textSize="@dimen/text_video_uploader_size"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="username" />

<TextView android:id="@+id/detailViewCountView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="25dp"
android:paddingTop="6dp"
android:layout_below="@id/detailVideoTitleView"
android:layout_alignParentRight="true"
android:paddingRight="16dp"
android:paddingLeft="16dp"
android:textSize="@dimen/text_video_visits_size"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="drölf views" />
android:text="81,754 views" />

<TextView android:id="@+id/detailThumbsDownCountView"
android:layout_width="wrap_content"
Expand All @@ -84,8 +89,9 @@
android:layout_alignParentRight="true"
android:paddingRight="16dp"
android:paddingLeft="16dp"
android:textSize="@dimen/text_video_like_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="-5.000" />
android:text="100" />

<ImageView android:id="@+id/detailThumbsDownImgView"
android:layout_width="40dp"
Expand All @@ -99,8 +105,9 @@
android:layout_height="wrap_content"
android:layout_below="@id/detailViewCountView"
android:layout_toLeftOf="@id/detailThumbsDownImgView"
android:textSize="@dimen/text_video_like_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="" />
android:text="20" />

<ImageView android:id="@+id/detailThumbsUpImgView"
android:layout_width="40dp"
Expand All @@ -116,17 +123,20 @@
android:layout_alignParentLeft="true"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingTop="20dp"
android:paddingTop="0dp"
android:textSize="@dimen/text_video_uploadtime_size"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Uploaded at: 45.64.1285" />
android:text="Published on Jan 01 1975" />

<TextView android:id="@+id/detailDescriptionView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/detailUploadDateView"
android:layout_alignParentLeft="true"
android:paddingTop="3dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textSize="@dimen/text_video_description_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmodtempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. "
/>
Expand Down Expand Up @@ -204,10 +214,10 @@
<android.support.design.widget.FloatingActionButton
android:id="@+id/playVideoButton"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:backgroundTint="@color/primaryColorYoutube"
android:src="@drawable/ic_play_arrow_black"
android:layout_margin="16dip"/>
android:layout_margin="20dp"/>
</RelativeLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/video_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:scaleType="centerCrop"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/dummi_thumbnail"/>
android:src="@drawable/dummy_thumbnail"/>

<TextView android:id="@+id/itemVideoTitleView"
android:layout_width="wrap_content"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="primaryColorYoutube">#dd0000</color>
<color name="primaryColorDarkYoutube">#bb0000</color>
<color name="primaryColorYoutube">#cd322e</color>
<color name="primaryColorDarkYoutube">#bc211d</color>
<color name="accentColorYoutube">#000000</color>
<color name="black_overlay">#66000000</color>
</resources>
6 changes: 6 additions & 0 deletions app/src/main/res/values/dimentxt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@
<dimen name="text_search_duration_size">11sp</dimen>
<dimen name="text_search_uploader_size">12sp</dimen>
<dimen name="text_search_uploadtime_size">12sp</dimen>
<dimen name="text_video_title_size">14sp</dimen>
<dimen name="text_video_visits_size">14sp</dimen>
<dimen name="text_video_like_size">12sp</dimen>
<dimen name="text_video_uploader_size">14sp</dimen>
<dimen name="text_video_uploadtime_size">14sp</dimen>
<dimen name="text_video_description_size">14sp</dimen>
</resources>
12 changes: 6 additions & 6 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<string name="title_videoitem_detail">NewPipe</string>
<string name="nothingFound">Nothing found</string>
<string name="viewSufix">views</string>
<string name="uploadDatePrefix">Uploaded at: </string>
<string name="uploadDatePrefix">Published on </string>
<string name="noPlayerFound">No StreamPlayer found. You may want to install one.</string>
<string name="installStreamPlayer">Install one</string>
<string name="cancel">Cancel</string>
Expand Down Expand Up @@ -45,9 +45,9 @@
<item>Video</item>
<item>Audio</item>
</string-array>
<string name="nextVideoTitle">Next Video</string>
<string name="showNextAndSimilarTitle">Show next and similar Videos.</string>
<string name="urlNotSupportedText">Url not Supported.</string>
<string name="showSimilarVideosButtonText">Similar Videos</string>
<string name="searchLanguageTitle">Video Search Language</string>
<string name="nextVideoTitle">Next video</string>
<string name="showNextAndSimilarTitle">Show next and similar videos</string>
<string name="urlNotSupportedText">URL not supported.</string>
<string name="showSimilarVideosButtonText">Similar videos</string>
<string name="searchLanguageTitle">Preferable content language</string>
</resources>