Previously, methods that required the Player to be ref counted,
were using static methods with s: &Rc<Self> as the first argument.
Now the wrapper type auto-derefs to the inner struct and you can
declare methods on just &self.
Previously if you hit fast-forward but the offset remaining was
let that the amount you wanted to seek, it would do nothing.
Now it resets the stream and seekbar to the start.
Eventually this will just move on to the next episode in the
Queue once that's implemented.
If you added a Feed where a Show exists but it had no episodes
entries, the stack would end up in a populated state, but the
HomeView would be blank without widgets.
This changes it so the stack state depends upon the episodes
table being populated instead of the show. The downside
is that if your only feed is one without episodes you can
no longer navigate and interact with it.
Check if time interval passed since the last pause, and only
rewind if the delta to indicates that the user had
switched their focus.
In other words, avoid rewinding if the track was just paused and
resumed.
When constucting Player in the Sandbox, it tries to use X-11
for dbus-autolaunch which is disabled in the flatpak environment.
It fails with the following error:
D-Bus error: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead (org.freedesktop.DBus.Error.NotSupported)
While the HomeView and ShowView can't yet scale that low,
the ShowWidget could get to about 270p already which is not
desirable.
This commit sets the minimum width of all the Views to 360p,
which is our mobile target size.
Before we were inserting the id of the cover into the registry
from a rayon thread. But rayon will only execute N threads at the
same time and let the rest into a queue. This would casue mutliple
jobs being queued since the cover id was not inserted in the
registry until the downloading had started.
This fixes said behavior by having the main thread block and write
in the id in the registry.
Since loadign a pixbuf from the pre-rendered cache is the most
common operation and it does not affect the behavior we can
first check that and then if the cover is midway downloading.
This avoids a mutex lock for the most common path.
Accidently after f21398357b when a download would start,
it would lock the cover_dl_registry hashmap till it had finished.
Since the registry.read() happens on the main thread this would
cause the UI to block until the download was and the mutex guard
from the download thread dropped.
This adds a configuration option in meson, if set it changes the
application ID allowing for stable and development version to be
run at the same time.
This is never used anywhere else apart from the testsuite. Instead
of ignoring etags we should instead not save them if the feed does
not return 200 or 304. See #64.
This allows for more responsive updates. The implementation still
sucks though. Ideally we would pass a receiver in the callback
and have an even lower timeout_add.
This allows for a custom timer to be set before the
callback will be run. Currently all the callbacks only
run once and then retunr glib::Continue(false) but this
would allow for setting a low timer and have a callback
that would determine if it needs to be run again, Continue(true),
in a relative responsive way.
Currently it just re-exports its children with getters,
but the idea is that it will also be able to handle
the saving the state of its height adjustment later.
Since 9a76c6428a I've noticed
the applciation does not quit properly, and then it's unable
to be launched again till it's killed manually.
This patch is an attept to correct/workaroud that by calling
explcitly gio::ApplicationExt::quit().
Added translation support based on the Fractal i18n. To do this I've
added the gettext-rs crate dep. I'm using my own fork because the
official gettext-rs release includes the gettext source files and that
increase the distribution package a lot and for distribution with
flatkap we don't need to build gettext, the lib is in the gnome sdk. So
this gettext-rs fork is the same, but removing the not needed gettext
source files.
The i18n.rs file adds some useful functions to translate strings. These
functions wraps the original gettext and adds more functionality, to be
able to translate compound strings, something that's not supported by
the gettext function.
The 'i18n' function works like the gettext, receives a plain string
without params.
The 'i18n_f' function receives a string with "{}" and a ref to an array
of &str with substitutions for the "{}" in the original string. The
substitution is done by order.
The 'i18n_k' function receives a string with "{named}" and a ref to an
array of (&str, &str) with substitutions for the "{named}" in the
original string. The substitution is done by name, where the first &str
in the tuple is the name and the second the string to use for the
replace.
This mod also include ni18n variants of the three functions for plural
and singular translations.
I've also created the spanish translation.
See #61https://gitlab.gnome.org/World/podcasts/issues/61