aboutsummaryrefslogtreecommitdiff
path: root/playlist-get
diff options
context:
space:
mode:
Diffstat (limited to 'playlist-get')
-rwxr-xr-xplaylist-get5
1 files changed, 5 insertions, 0 deletions
diff --git a/playlist-get b/playlist-get
index f184061..2d6426d 100755
--- a/playlist-get
+++ b/playlist-get
@@ -74,6 +74,11 @@ cat $PLAYLISTS/$PLAYLIST.m3u | while read file; do
prefix="/$(dirname "$file")"
echo mkdir -p \"$DEST$prefix\" | adb shell
$APP $action "$file" "$DEST$prefix"
+
+ # Thanks https://stackoverflow.com/questions/17928576/refresh-android-mediastore-using-adb
+ adb shell "find $DEST -exec am broadcast \
+ -a android.intent.action.MEDIA_SCANNER_SCAN_FILE \
+ -d file://{} \\;"
else
$APP $action "$file" $DEST
fi