CappielloAntonio / tempo

An open source and lightweight music client for Subsonic, designed and built natively for Android.
GNU General Public License v3.0
865 stars 39 forks source link

[Feature Request] local address for server #175

Closed Efreak closed 3 weeks ago

Efreak commented 4 months ago

Please add a local address for the server like dsub uses. When available, connect and use the local server; when not available, connect over the internet.

There's several ways to implement this:

cstby commented 4 months ago

I'll add that this would be incredibly useful for those of us trying to be careful about server bandwidth or home Internet data usage. I would love to set a transcoding policy based on whether Tempo is connected over LAN or WAN.

CappielloAntonio commented 3 weeks ago

Hi, I have implemented the addition of the local address to which to connect instead of using the main address. The algorithm is something like this: If connected to a local address, it continues to use this until it is reachable, after which it switches to the main address.

If connected to the main address, try to connect to the local address after a fixed X amount of time has passed. If the latter can be reached, use the local one, otherwise continue using the main one.

If the main one is also not reachable then I present a warning message about the unreachability of the server.

The check on which type of connection to use is done every time you enter the app, after a pre-established X time.

At the moment I don't think I will implement an option for ad hoc transcoding by type of address used since the transcoding option by type of connection used already exists. I think this type of control is "stronger" than the previous one.

CappielloAntonio commented 3 weeks ago

The functionality still needs to be fully tested before we can release it, but if you prefer you can test it. I'm closing this issue, but feel free to reopen it or open a new one if you find any problems.

app-notquitemy-debug.zip