diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2023-12-13 21:12:49 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2023-12-13 21:12:49 -0300 |
commit | cf4123328878d683bee0d458e3f1c50793cec9b2 (patch) | |
tree | 2c1503fbdbd10f9df2cca45358723914abb62115 /playlist-get | |
parent | 1d056e11c165704b0bfde1e536efc09a6efbf5d8 (diff) | |
download | playlister-cf4123328878d683bee0d458e3f1c50793cec9b2.tar.gz playlister-cf4123328878d683bee0d458e3f1c50793cec9b2.tar.bz2 |
Feat: playlist-copy: adb: refresh mediastore
Diffstat (limited to 'playlist-get')
-rwxr-xr-x | playlist-get | 5 |
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 |