advplyr / audiobookshelf-app

Mobile application for Audiobookshelf
https://audiobookshelf.org
GNU General Public License v3.0
1.22k stars 166 forks source link

Allow streaming/downloads from WiFi connections only, disable streaming/downloads from mobile connections #1166

Closed ZLoth closed 1 month ago

ZLoth commented 6 months ago

Is your feature request related to a problem? Please describe.

For one of my friends, they have a very limited mobile data plan on their mobile device, thus streaming/downloading should be avoided when they are not connected to WiFi

Describe the solution you'd like

A toggle in Settings that says "Connect to WiFi only". When enabled, any attempt to stream/download book will result in a error message.

nichwall commented 6 months ago

Related to https://github.com/advplyr/audiobookshelf-app/issues/247

They may want to look at NetGuard (no root firewall) on Android. It allows you to control data connections by app based on whether you are connected to WiFi or mobile data. However, this would prevent their phone from syncing on mobile data if they block ABS.

I use NetGuard to block a lot of apps when on mobile data for the same reason.

ZLoth commented 6 months ago

Related to #247

They may want to look at NetGuard (no root firewall) on Android. It allows you to control data connections by app based on whether you are connected to WiFi or mobile data. However, this would prevent their phone from syncing on mobile data if they block ABS.

I use NetGuard to block a lot of apps when on mobile data for the same reason.

The syncing of the book status is very low in the bandwidth compared to streaming/downloading the media. Thus, completely blocking traffic isn't a good idea here.

mfcar commented 4 months ago

I've been checking other apps that offer options to limit streaming/download over mobile networks, and I've found the following implementations:


Overcast: Provides an option to allow downloads only over Wifi or both Wifi and Cellular. If you attempt to download an episode over a mobile network, the app will ask if you want to permit that episode to be downloaded over the cellular network.

image

Apple Podcast: Very similar to Overcast, but it also has an option to block downloads if they exceed a specific size.

image

Pocket Cast: Offers options to allow downloads only over wifi, and an option to warn if streaming is being done over cellular.

image

Audible: Provides an option to allow streaming and downloading only from wifi.

IMG_1654


Castro Box: Similar to Pocket Cast. It has an option to allow downloads over cellular and an option to warn if streaming over cellular or only play.

image

Spotify: This app provides an option to allow downloads using cellular data.

IMG_1662


Prologue: This app offers an option to always allow downloads via cellular, or to turn it off, or to require confirmation.

image

Podbean: This app provides options to allow cellular downloads and cellular streaming.

IMG_1658


All of these applications have very similar options. In general, I think a good implementation could be:

ZLoth commented 4 months ago

I've been checking other apps that offer options to limit streaming/download over mobile networks, and I've found the following implementations:

Very detailed. Thank you.

All of these applications have very similar options. In general, I think a good implementation could be:

  • Allow cellular downloads (on, off, require confirmation)
  • Allow cellular streaming (on, off, require confirmation)

Agreed. I'm very fortunate that I have unlimited data for streaming, but will still prefer to do the downloads on a WiFi network.

mfcar commented 4 months ago

I have started working on a prototype for this new setting. Feedback is appreciated.

1210

Maxklos commented 4 months ago

I think it's an great Idea. If you build an APK for me, I can test it on Android 14

mfcar commented 4 months ago

1210

Sorry for the delay. I'm not familiar with the Android ecosystem and was trying to set up the dev environment on my machine. But, I found that the APKs are built automatically. Here is the APK for the PR: https://github.com/advplyr/audiobookshelf-app/actions/runs/9246204920

github-actions[bot] commented 1 month ago

Fixed in v0.9.75-beta.

ZLoth commented 1 month ago

Thank you!