Jump to content

Ability to select download folder for media


Recommended Posts

bastionntb
Posted

In the past I could download audio books through emby and have another program play the downloads directly from the android/data folder stored on my internal storage. (the controls and media functions are just more attuned for audio books than embys built in media player.)

However, recently an upgrade to Android 11 has since prevented apps from accessing the android/data folder and I can't seem to get past it.

I was wondering if it would be possible to have the ability to select where emby downloads media to, I could specify a folder outside of the android/data folder then.

I'm on a Samsung note10+

Thanks! 

  • Agree 1
Posted

Hi, newer versions of android are more restrictive about where the app can save files to, but we're looking into what our options are to improve this. Thanks for the feedback.

Posted

Hi guys!

@Luke: I have the same problem as @DatsiK96: having a Samsung phone which is upgraded to Android11.

Downloaded files can only accessible by MB, no other applications (on unrooted phones) are able to navigate into the "data" directory where MB downloads the files.

In the past (found in forums here) there were two options: "internal" and "external" for downloads. For some reason my MB on the phone only shows "internal".

There is no physical "external" SD card slot available on my phone, so tech-wise we can't speak of external location for download, but I wish I still could choose "external" which in this case shall instruct MB to download the files to the same location where everything else is downloaded.

To not just speak, here is a code snippet which can easily do this with ~20LOC (I've used this in one of my apps):

// query default gallery folder
File dcimFolder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);

// create it if for some wierd reason doesn't exist
if (!dcimFolder.exists()) dcimFolder.mkdir();

// generate download's filename
String filename = dcimFolder.getAbsolutePath() + "/" + downloaded_file_name;

// TODO save the download with "filename"

// notify Android's library about the new file (context is needed for that)
if (your_app_context != null) MediaScannerConnection.scanFile(your_app_context, new String[]{filename}, new String[]{"MIMETYPE"}, null);

This might not be the 100% perfect solution for MB as the new files in this case will be presented in the standard Gallery too (I needed that for my app). But this can give you some idea on how can you improve this little part :)

Cheers,
Dan

 

 

Posted

We're going to add options to allow you to use the device's public downloads folder or the public audio/video folders. Thanks for the feedback.

  • 2 weeks later...
Posted

Luke, sounds fantastic!

Do you have an idea on next update's schedule by any chance?

 

Thank you!

negativzeroe
Posted (edited)
On 3/17/2021 at 8:08 PM, Luke said:

We're going to add options to allow you to use the device's public downloads folder or the public audio/video folders. Thanks for the feedback.

Luke, just fyi, /sdcard/Android/data is locked but /sdcard/Android/media is not, Nextcloud has this as the default, you may want to consider switching to this as well just for the default location (in addition to this feature I mean).

Edited by negativzeroe
Posted
4 minutes ago, negativzeroe said:

Luke, just fyi, /sdcard/Android/data is locked but /sdcard/Android//media is not, Nextcloud has this as the default, you may want to consider switching to this as well just for the default location (in addition to this feature I mean).

Thanks for the info.

  • 1 month later...
danergo
Posted

@Luke, I've updated my Emby client on Android, and now it has an option for selecting download folder to External (see screenshot), but my download still went into

/storage/emulated/0/Android/data/com.mb.android/files/Download/...

Is there a way to change this?

 

 

Screenshot_20210514-223442_Emby.jpg

Screenshot_20210514-223612_Emby.jpg

Carlo
Posted

Did you by any chance have those download setup before you changed the location?

danergo
Posted

Hi, actually no:

1.) I have restarted Emby on NAS

2.) I cleared cache and data on Android app, so it started from scratch.

3.) I logged in to my server

4.) I changed the download location to external then

5.) I started the download

 

So I think orders of operations were fine.

  • Like 1
Carlo
Posted

OK thanks.  One of the devs will have to comment.

  • 2 weeks later...
Posted

Hi, where are you expecting them to go?

danergo
Posted

Hi, Luke!

Actually anywhere is fine except "data" which is not visible by other apps (without root permission).

We might have an option somewhere in the Android app where we can specify what "external" shall mean.

Or, we can simply shoot on the global downloads folder:

dmr.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS)

What do you think?

Posted
On 5/14/2021 at 3:41 PM, danergo said:

@Luke, I've updated my Emby client on Android, and now it has an option for selecting download folder to External (see screenshot), but my download still went into


/storage/emulated/0/Android/data/com.mb.android/files/Download/...

Is there a way to change this?

 

 

Screenshot_20210514-223442_Emby.jpg

 

Is this screen available in Android 3.1.94?

I've been looking for options like this, but haven't been able to find it in the app.

danergo
Posted (edited)
10 minutes ago, roaku said:

Is this screen available in Android 3.1.94?

I've been looking for options like this, but haven't been able to find it in the app.

Hi, yes, I have that version. Here is how you can find it (I have premium if that matters):

 

Screenshot_20210524-224554_Emby.jpg

Edited by danergo
Posted
1 minute ago, danergo said:

Hi, yes, I have that version. Here is how you can find it (I have premium if that matters):

 

Screenshot_20210524-224554_Emby.jpg

Ok thanks. I have that screen. It just doesn't have those options. Maybe I'm stuck on an older version.

Posted

The options will also be limited depending on the version of android.

Posted
Just now, Luke said:

The options will also be limited depending on the version of android.

Right.

  • 3 weeks later...
Posted

@Luke: I found something today: MB downloaded my video to

 

 

/storage/emulated/0/Android/data/com.mb.android/files/Download/...

 

But! Subtitle belongs to this downloaded media is downloaded into

/storage/emulated/0/Download/emby_downloads/...

 

Both subtitle and media shall be downloaded into that "emby_downloads" folder.

Posted
On 6/15/2021 at 2:55 AM, danergo said:

@Luke: I found something today: MB downloaded my video to

 

 


/storage/emulated/0/Android/data/com.mb.android/files/Download/...

 

But! Subtitle belongs to this downloaded media is downloaded into


/storage/emulated/0/Download/emby_downloads/...

 

Both subtitle and media shall be downloaded into that "emby_downloads" folder.

HI, yes it's something we'll continue to look at improving. Thanks for the feedback.

  • 1 month later...
Posted

@Luke I noticed that the app has three options:

  • Internal Storage // Goes into android/data. I can access this from my file manager app.
  • External storage (disk) // This goes into android/data but on the sd card. Can't access this from other apps eg: third party file manager.
  • External (Downloads) // This goes into the downloads folder on the internal storage.

Is it possible to have a fourth option? The downloads folder on the external sd card? 

It might be nice to have the option to pick the location for each item so we can spread data across external sd card and internal. 

Thanks very much for the recent improvements. 

Chris

  • Thanks 1
Posted
7 hours ago, monotok said:

@Luke I noticed that the app has three options:

  • Internal Storage // Goes into android/data. I can access this from my file manager app.
  • External storage (disk) // This goes into android/data but on the sd card. Can't access this from other apps eg: third party file manager.
  • External (Downloads) // This goes into the downloads folder on the internal storage.

Is it possible to have a fourth option? The downloads folder on the external sd card? 

It might be nice to have the option to pick the location for each item so we can spread data across external sd card and internal. 

Thanks very much for the recent improvements. 

Chris

We'll look into it, but i think the app is already presenting you with all options that it has access to write to.

  • Thanks 1
Posted

Guys, I've just double checked this:

Downloads are now going into the public download folder in case selecting "External storage (Downloads)":

/storage/emulated/0/Download/emby_downloads/...

Thank you guys for this fantastic work.

Cheers!

Posted

Thanks for the feedback.

  • 3 weeks later...
Posted
On 7/22/2021 at 12:58 PM, monotok said:

@Luke I noticed that the app has three options:

  • Internal Storage // Goes into android/data. I can access this from my file manager app.
  • External storage (disk) // This goes into android/data but on the sd card. Can't access this from other apps eg: third party file manager.
  • External (Downloads) // This goes into the downloads folder on the internal storage.

Is it possible to have a fourth option? The downloads folder on the external sd card? 

It might be nice to have the option to pick the location for each item so we can spread data across external sd card and internal. 

Thanks very much for the recent improvements. 

Chris

Just out of curiosity... Regarding the 2nd option (the only one that actually goes to the SD card when on Android 11), since 3rd party apps can't access it, if the Emby app breaks or gets uninstalled, is there any way to recuperate the files... or to delete them to regain space?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...