Closed tonyedwardspz closed 11 months ago
I've poked the current implementation a bit more and think I spotted a bug.
If the app is set to connect to the server, but enters a disconnected state (turn network off to simulate), clicking a local podcast does not open the series page. There is no way to start a new episode without either explicitly disconecting from the server or reconnecting to the network. The UI looks like playing a locally saved episode should be possible, after automatically loading a local item focused home view.
If the filter is implemented, the local podcast series could check connection status and default to local only if there is no connection.
From a user perspective, it would behave exactly the same as if the app is set to disconnected from the server. I guess this means it could be implemented without the filter functionality, but with some state checking instead π€·ββοΈ
Thanks, I just fixed that bug
I'm adding the downloaded episode filter now. After that I'm on the fence about whether we should have the last filter/sort saved locally so it sticks until you change it again. That would not be set for each individual podcast though.
Alternatively we can just have it so that if you click the podcast from the local podcasts shelf on the home page it will filter for downloaded episodes.
I went with the latter
Nice. That was the direction I was leaning.
Really appreciate this. ABS is a great piece of software π
I've grabbed the latest code and put it on my phone. The bug is fixed for me, and finding local podcasts is possible again for my use case. Really pleased with the update πͺ
Thanks for taking the time to do this.
I've spotted that bug again, although it's happening a lot less now. I think it can be fixed by checking against the connection state to the server, rather than network.
In the screenshot below:
In this sate, the local podcasts are unclickable. It does sort itself out after a while, once the app has given up on trying to connect to the server and fallen back fully to the offline home screen.
Is it possible to revert to local only podcasts in any connection state other than fully connected to the server?
Ah I see, for this we have to know if the server is local only. I'll leave this open but I pushed a release making some updates
I've just poked the code, and think I've squashed the bug for my use case.
I'm not at home to test properly (does it automatically work as intended when re-connected etc), but it's working on a train with the same conditions as in the screenshot. I think.
EDIT: I did not.
Whether the server is local only or not, its the connection checking that appears to be blocking the clicks from users p.o.v. This would affect everyone (e.g those on a temporarally slow connection, spotty 4g, going through a tunnel) not just peeps with a local server. . . although the latter will notice it the most π Edge case for most tho, granted.
This is a nice codebase to poke through btw.
Now I've played with this a bit more, I have a question.
Do we need to know if the server is local only to skip a certain part / all of the loading phase of the Bookshelf Index?
Or is that to change behaviour more widely / elsewhere?
It seems like user interaction is being blocked because of the api call. This part usually isn't around for all that long for most people, so isn't a huge problem. Even for me under normal usage tbh. I'm curious now as much as anything.
It's not that the interaction is being blocked it is that it is failing to redirect to the server copy of the podcast
That is happening here https://github.com/advplyr/audiobookshelf-app/blob/f89148b92e3f8b2f2bc929f7b440d859eae3eb0d/pages/item/_id/index.vue#L175-L179
The server address matches and you currently have a network connection is what it is checking.
From your screenshot it looks like it was connected at first launch since the library is set, that happens here https://github.com/advplyr/audiobookshelf-app/blob/f89148b92e3f8b2f2bc929f7b440d859eae3eb0d/layouts/default.vue#L141-L148
One option is we could check if the socket is connected since that is polling the server.
Ahhh. That makes things make more sense. Thanks for explaining and pointing me towards those parts. I'd added some checking for socket connection. . . nice to know I was thinking along the right thread.
I'll play around again sometime soon.
Imo, the original request on this thread has been serviced with the new release btw. It's working well, and the filters are much nicer than the previous two separate screens for a series π
Is your feature request related to a problem? Please describe.
When clicking on a series under 'Local Podcasts' from a podcast library, the user is no longer presented with just the episodes saved locally. Using the android app to listen to saved episodes, even when connected to the server, now requires disconnecting from the server to easily find them, particuarly for long serieses.
For anyone who enters and leaves a network connected state when using the app, this adds the need to explicitly toggle being disconnected. Letting the app manage connecting and disconnecting has worked well in my uses case, and being disconnected isn't ideal.
Listening primarily to local episodes side-steps the issue of slow loading podcast series on Android.
Describe the solution you'd like
A filter on the individual podcast series page would reintroduce this functionality, without reintroducing the confusion of multiple pages for a series with distinct content.
The filter would fit well alongside Show all, incomplete, In progress, Complete.
It could be pre-selected when entering a podcast series via the Local Podcasts section. It could be argued this is the expected behaviour given the use of the word local in the section heading and having the number of local epidodes on the individual podcast covers within this section.
Describe alternatives you've considered
The local podcasts are easy to find when disconnected from a server π, just inconvienient for some usage patterns.
Additional context
Originating from Issue #954. This is the info about my use case from the replies:
I've been using the app to support an offline first consumption pattern with the server only availible on my home network. The local podcast section is where I typically listen to podcasts from on mobile after downloading a few episodes ahead of time, even when connected to the server. There or the latest feed.
I'm away from a connection to the server enough to warrent listening primarily to local podcasts / books on mobile. But connected enough and listening directly to make toggling between the two connectivity states a hassle. 3-4 times an hour is not unusual, with occasional switches between the web app on desktop and mobile.
With the local podcasts section, this consumption pattern was super convienient and required zero extra effort or thought beyond downloading a few episodes (I have to do this anyway for communig). It also sidesteps the slow loading of series withn a large numbers of episodes (I've seen the discussion around this π), which there are a few I listen to daily.