foobnix / LibreraReader

Book Reader for Android
http://librera.mobi
Other
2.87k stars 305 forks source link

Identify Librera somehow in it's user agent string #1128

Closed dunxd closed 1 year ago

dunxd commented 1 year ago

Librera currently supplies a very generic User Agent value when requesting resources. I am working on a library server that automatically redirects detected OPDS clients to the OPDS feed, but cannot with Librera as I have not figured out a way to identify it.

If the USER_AGENT string sent when accessing the html interface of my library included "Librera" it would be simple to do this. I already have it working that way for Moon+ and other readers, but Librera is better and the one I recommend to users.

In case you are interested my library server is a fork of COPS built for hosting on Home Assistant.

foobnix commented 1 year ago

fixed

dunxd commented 1 year ago

That's great. I've updated my library server to look for Librera in the user agent, so I shoild see detection with the next Librera update on the Play store.

foobnix commented 1 year ago

you can test with beta.librera.mobi

dunxd commented 1 year ago

Works perfectly for Librera Pro-8.9.19-uni.apk - I guess the non-Pro Fdroid version doesn't include Network libraries?