Mholloway has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311821

Change subject: Remove underscores from video filenames when loading in gallery
......................................................................

Remove underscores from video filenames when loading in gallery

It seems that a video's being playable in the Gallery activity depends
on its filename NOT containing underscores in place of spaces.  Use
StringUtil.removeUnderscores to remove them when loading from the content
service.  (They're already absent when coming from mobileview HTML.)

Bug: T140905
Change-Id: I3a7eceb55051adf3f40cd583ef2d661141894236
---
M app/src/main/java/org/wikipedia/page/PageFragment.java
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/21/311821/1

diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index 1b84651..a1af473 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -72,6 +72,7 @@
 import org.wikipedia.util.FeedbackUtil;
 import org.wikipedia.util.ResourceUtil;
 import org.wikipedia.util.ShareUtil;
+import org.wikipedia.util.StringUtil;
 import org.wikipedia.util.ThrowableUtil;
 import org.wikipedia.util.UriUtil;
 import org.wikipedia.util.log.L;
@@ -1067,7 +1068,7 @@
             public void onMessage(String messageType, JSONObject 
messagePayload) {
                 try {
                     String href = decodeURL(messagePayload.getString("href"));
-                    String filename = UriUtil.removeInternalLinkPrefix(href);
+                    String filename = 
StringUtil.removeUnderscores(UriUtil.removeInternalLinkPrefix(href));
                     Site site = model.getTitle().getSite();
                     
startActivityForResult(GalleryActivity.newIntent(getContext(),
                             model.getTitleOriginal(), filename, site,

-- 
To view, visit https://gerrit.wikimedia.org/r/311821
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a7eceb55051adf3f40cd583ef2d661141894236
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway <mhollo...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to