<div dir="ltr">Looks good to me, pushed!<div><br></div><div>FYI, it's not relevant to commit localized string resources, translation is managed on transifex.<br><br><div class="gmail_quote"><div dir="ltr">Le sam. 1 avr. 2017 à 22:47, Jens Jawer <<a href="mailto:jade@skygreen.de">jade@skygreen.de</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br class="gmail_msg">
vlc-android/res/menu/audio_list_browser.xml | 5 +++-<br class="gmail_msg">
vlc-android/res/values-de/strings.xml | 1 +<br class="gmail_msg">
vlc-android/res/values/strings.xml | 1 +<br class="gmail_msg">
.../src/org/videolan/vlc/PlaybackService.java | 33 ++++++++++++++++++++++<br class="gmail_msg">
.../src/org/videolan/vlc/gui/PlaylistActivity.java | 3 ++<br class="gmail_msg">
.../vlc/gui/audio/AudioAlbumsSongsFragment.java | 3 ++<br class="gmail_msg">
.../vlc/gui/audio/AudioBrowserFragment.java | 3 ++<br class="gmail_msg">
7 files changed, 48 insertions(+), 1 deletion(-)<br class="gmail_msg">
<br class="gmail_msg">
diff --git a/vlc-android/res/menu/audio_list_browser.xml b/vlc-android/res/menu/audio_list_browser.xml<br class="gmail_msg">
index f17432c..c4dcdad 100644<br class="gmail_msg">
--- a/vlc-android/res/menu/audio_list_browser.xml<br class="gmail_msg">
+++ b/vlc-android/res/menu/audio_list_browser.xml<br class="gmail_msg">
@@ -7,6 +7,9 @@<br class="gmail_msg">
<item<br class="gmail_msg">
android:id="@+id/audio_list_browser_append"<br class="gmail_msg">
android:title="@string/append" /><br class="gmail_msg">
+ <item<br class="gmail_msg">
+ android:id="@+id/audio_list_browser_insert_next"<br class="gmail_msg">
+ android:title="@string/insert_next" /><br class="gmail_msg">
<group android:id="@+id/songs_view_only"><br class="gmail_msg">
<item<br class="gmail_msg">
android:id="@+id/audio_list_browser_play_all"<br class="gmail_msg">
@@ -27,4 +30,4 @@<br class="gmail_msg">
android:title="@string/set_song"/><br class="gmail_msg">
</group><br class="gmail_msg">
<br class="gmail_msg">
-</menu><br class="gmail_msg">
\ No newline at end of file<br class="gmail_msg">
+</menu><br class="gmail_msg">
diff --git a/vlc-android/res/values-de/strings.xml b/vlc-android/res/values-de/strings.xml<br class="gmail_msg">
index 8ea9482..e4463b6 100644<br class="gmail_msg">
--- a/vlc-android/res/values-de/strings.xml<br class="gmail_msg">
+++ b/vlc-android/res/values-de/strings.xml<br class="gmail_msg">
@@ -24,6 +24,7 @@<br class="gmail_msg">
<string name="play_as_audio_background">Videos im Hintergrund abspielen</string><br class="gmail_msg">
<string name="play_as_audio_background_summary">Video-Wiedergabe im Hintergund fortsetzen, wenn der Gerätebildschirm ausgeschaltet oder der HOME-Button gedrückt wurde.</string><br class="gmail_msg">
<string name="append">Anhängen</string><br class="gmail_msg">
+ <string name="insert_next">Einfügen als Nächstes</string><br class="gmail_msg">
<string name="play_all">Alle wiedergeben</string><br class="gmail_msg">
<string name="append_all">Alle anhängen</string><br class="gmail_msg">
<string name="last_playlist">Letzte Wiedergabeliste</string><br class="gmail_msg">
diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml<br class="gmail_msg">
index cea6a3f..5a50c75 100644<br class="gmail_msg">
--- a/vlc-android/res/values/strings.xml<br class="gmail_msg">
+++ b/vlc-android/res/values/strings.xml<br class="gmail_msg">
@@ -28,6 +28,7 @@<br class="gmail_msg">
<string name="play_as_audio_background">Play videos in background</string><br class="gmail_msg">
<string name="play_as_audio_background_summary">Continue video playback in background when turning device screen off or clicking HOME button.</string><br class="gmail_msg">
<string name="append">Append</string><br class="gmail_msg">
+ <string name="insert_next">Insert next</string><br class="gmail_msg">
<string name="play_all">Play all</string><br class="gmail_msg">
<string name="append_all">Append all</string><br class="gmail_msg">
<string name="last_playlist">Last playlist</string><br class="gmail_msg">
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java<br class="gmail_msg">
index 9540b69..a6c9f44 100644<br class="gmail_msg">
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java<br class="gmail_msg">
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java<br class="gmail_msg">
@@ -2079,6 +2079,39 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo<br class="gmail_msg">
}<br class="gmail_msg">
<br class="gmail_msg">
/**<br class="gmail_msg">
+ * Insert into the current existing playlist<br class="gmail_msg">
+ */<br class="gmail_msg">
+<br class="gmail_msg">
+ @MainThread<br class="gmail_msg">
+ public void insertNext(MediaWrapper[] mediaList) {<br class="gmail_msg">
+ insertNext(Arrays.asList(mediaList));<br class="gmail_msg">
+ }<br class="gmail_msg">
+<br class="gmail_msg">
+ @MainThread<br class="gmail_msg">
+ public void insertNext(List<MediaWrapper> mediaList) {<br class="gmail_msg">
+ if (!hasCurrentMedia()) {<br class="gmail_msg">
+ load(mediaList, 0);<br class="gmail_msg">
+ return;<br class="gmail_msg">
+ }<br class="gmail_msg">
+<br class="gmail_msg">
+ int startIndex = mCurrentIndex + 1;<br class="gmail_msg">
+<br class="gmail_msg">
+ for (int i = 0; i < mediaList.size(); i++) {<br class="gmail_msg">
+ MediaWrapper mediaWrapper = mediaList.get(i);<br class="gmail_msg">
+ mMediaList.insert(startIndex + i, mediaWrapper);<br class="gmail_msg">
+ }<br class="gmail_msg">
+ onMediaListChanged();<br class="gmail_msg">
+ updateMediaQueue();<br class="gmail_msg">
+ }<br class="gmail_msg">
+<br class="gmail_msg">
+ @MainThread<br class="gmail_msg">
+ public void insertNext(MediaWrapper media) {<br class="gmail_msg">
+ ArrayList<MediaWrapper> arrayList = new ArrayList<>();<br class="gmail_msg">
+ arrayList.add(media);<br class="gmail_msg">
+ insertNext(arrayList);<br class="gmail_msg">
+ }<br class="gmail_msg">
+<br class="gmail_msg">
+ /**<br class="gmail_msg">
* Move an item inside the playlist.<br class="gmail_msg">
*/<br class="gmail_msg">
@MainThread<br class="gmail_msg">
diff --git a/vlc-android/src/org/videolan/vlc/gui/PlaylistActivity.java b/vlc-android/src/org/videolan/vlc/gui/PlaylistActivity.java<br class="gmail_msg">
index 0fdd39e..29745ab 100644<br class="gmail_msg">
--- a/vlc-android/src/org/videolan/vlc/gui/PlaylistActivity.java<br class="gmail_msg">
+++ b/vlc-android/src/org/videolan/vlc/gui/PlaylistActivity.java<br class="gmail_msg">
@@ -315,6 +315,9 @@ public class PlaylistActivity extends AudioPlayerContainerActivity implements IE<br class="gmail_msg">
} else if (id == R.id.audio_list_browser_append) {<br class="gmail_msg">
mService.append(media);<br class="gmail_msg">
return true;<br class="gmail_msg">
+ } else if (id == R.id.audio_list_browser_insert_next) {<br class="gmail_msg">
+ mService.insertNext(media);<br class="gmail_msg">
+ return true;<br class="gmail_msg">
} else if (id == R.id.audio_list_browser_delete) {<br class="gmail_msg">
mAdapter.remove(media);<br class="gmail_msg">
UiTools.snackerWithCancel(getWindow().getDecorView(), getString(R.string.file_deleted), new Runnable() {<br class="gmail_msg">
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java<br class="gmail_msg">
index e15e955..b79e774 100644<br class="gmail_msg">
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java<br class="gmail_msg">
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java<br class="gmail_msg">
@@ -200,6 +200,7 @@ public class AudioAlbumsSongsFragment extends BaseAudioBrowser implements SwipeR<br class="gmail_msg">
<br class="gmail_msg">
boolean useAllItems = id == R.id.audio_list_browser_play_all;<br class="gmail_msg">
boolean append = id == R.id.audio_list_browser_append;<br class="gmail_msg">
+ boolean insert_next = id == R.id.audio_list_browser_insert_next;<br class="gmail_msg">
<br class="gmail_msg">
if (id == R.id.audio_list_browser_delete) {<br class="gmail_msg">
<br class="gmail_msg">
@@ -254,6 +255,8 @@ public class AudioAlbumsSongsFragment extends BaseAudioBrowser implements SwipeR<br class="gmail_msg">
if (mService != null) {<br class="gmail_msg">
if (append)<br class="gmail_msg">
mService.append(medias);<br class="gmail_msg">
+ else if (insert_next)<br class="gmail_msg">
+ mService.insertNext(medias);<br class="gmail_msg">
else<br class="gmail_msg">
mService.load(medias, startPosition);<br class="gmail_msg">
return true;<br class="gmail_msg">
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java<br class="gmail_msg">
index 4ae3704..967412f 100644<br class="gmail_msg">
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java<br class="gmail_msg">
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java<br class="gmail_msg">
@@ -350,6 +350,7 @@ public class AudioBrowserFragment extends BaseAudioBrowser implements DevicesDis<br class="gmail_msg">
<br class="gmail_msg">
boolean useAllItems = id == R.id.audio_list_browser_play_all;<br class="gmail_msg">
boolean append = id == R.id.audio_list_browser_append;<br class="gmail_msg">
+ boolean insert_next = id == R.id.audio_list_browser_insert_next;<br class="gmail_msg">
<br class="gmail_msg">
// Play/Append<br class="gmail_msg">
if (useAllItems) {<br class="gmail_msg">
@@ -368,6 +369,8 @@ public class AudioBrowserFragment extends BaseAudioBrowser implements DevicesDis<br class="gmail_msg">
if (mService != null) {<br class="gmail_msg">
if (append)<br class="gmail_msg">
mService.append(medias);<br class="gmail_msg">
+ else if (insert_next)<br class="gmail_msg">
+ mService.insertNext(medias);<br class="gmail_msg">
else<br class="gmail_msg">
mService.load(medias, startPosition);<br class="gmail_msg">
return true;<br class="gmail_msg">
--<br class="gmail_msg">
2.7.4<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
Android mailing list<br class="gmail_msg">
<a href="mailto:Android@videolan.org" class="gmail_msg" target="_blank">Android@videolan.org</a><br class="gmail_msg">
<a href="https://mailman.videolan.org/listinfo/android" rel="noreferrer" class="gmail_msg" target="_blank">https://mailman.videolan.org/listinfo/android</a><br class="gmail_msg">
</blockquote></div></div></div>