Commit Graph
100 Commits
Author SHA1 Message Date
Jordan Petridis 36f97a5300 Flatpak: minor cleanup 2018-12-09 20:40:41 +02:00
Jordan Petridis 4adc3fadaa Flatpak: Set an env var so gstreamer uses playbin3 2018-12-09 20:39:17 +02:00
Jordan Petridis d9c64e7f87 CI: move the rustfmt check before the build/test 2018-12-09 04:02:29 +02:00
Jordan Petridis 9f8ae75691 Remove depricated lints 2018-12-09 03:53:17 +02:00
Jordan Petridis 7e0b88ddbd Merge branch 'remove-custom-devel-class' into 'master'
style.css: Remove custom .devel style class

See merge request World/podcasts!87
2018-12-08 23:00:14 +00:00
Jordan Petridis 4e89cdaca1 Merge branch 'alatiera/cargo-check' into 'master'
Boring build system stuff

Closes #109

See merge request World/podcasts!86
2018-12-02 00:40:49 +00:00
Jordan Petridis b72ba8c66a podcasts-gtk: make it possible to compile with just cargo
This is not supported at all, and it still won't run with cargo
run, thankfully, you should use meson instead...

The only purpose of this commit is to make it possible for
cargo check, and by extension rls, to function and work
properly.

Part of #110
2018-12-02 02:10:09 +02:00
Jordan Petridis fc9de568bd meson: remove dead code 2018-12-02 02:03:34 +02:00
Jordan Petridis fe5a542e08 meson: Declare dependencies
Close #109
2018-12-02 02:03:33 +02:00
Jordan Petridis 5d86693d98 Merge branch 'fix/error-format' into 'master'
Remap rustc output to show errors in GNOME Builder sidebar

See merge request World/podcasts!81
2018-12-01 12:18:41 +00:00
Jordan Petridis 2f843a4d40 Merge branch 'patch-1' into 'master'
Support vendored builds / distribution packaging

See merge request World/podcasts!85
2018-11-30 11:25:59 +00:00
Jordan Petridis f9f0dad203 cargo fmt 2018-11-29 14:36:06 +02:00
Jordan Petridis fdb064ffc8 Update dependancies 2018-11-29 11:57:27 +02:00
Jordan Petridis e98231c327 Merge branch 'cleanups' into 'master'
Cleanups

See merge request World/podcasts!84
2018-11-18 13:27:59 +00:00
Jordan Petridis 0888da2197 Upgrade dependencies 2018-11-18 12:59:02 +00:00
Jordan Petridis 2d231ad989 Update dependancies 2018-11-18 12:59:01 +00:00
Jordan Petridis 19e0b7e565 Further preparations for Rusto 2018 edition 2018-11-18 12:59:01 +00:00
Jordan Petridis fd4128c364 Prepare for Rust 2018 edition 2018-11-18 12:59:01 +00:00
Jordan Petridis 98f105fda0 Player: Use a wrapper struct to write methods on &self
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.
2018-11-18 12:59:01 +00:00
Jordan Petridis 32b257ec30 cargo fmt 2018-11-13 15:29:20 +02:00
Jordan Petridis 53bceb89cd Merge branch 'Ophirr33/podcasts-master'
See !82 for more.
2018-11-07 01:34:06 +02:00
Jordan Petridis 04770a1e8f Merge branch 'ZanderBrown/hammond-wip/zbrown/jump-to-start'
See !83 for more.
2018-11-07 00:49:47 +02:00
Jordan Petridis 5ac4f6dcf9 Mpris: Actually raise the window
This fixes a bug where can_raise was never registered on dbus,
but it also works around a wayland issue with the .present()
method.

https://gitlab.gnome.org/GNOME/gtk/issues/624
2018-11-04 21:05:09 +02:00
Jordan Petridis 6671f8c6fe podcasts-gtk: Add per file license annotations 2018-11-04 19:35:35 +02:00
Jordan Petridis 5b77bb4649 podcasts-downloader: Add per file license annotations 2018-11-04 19:35:35 +02:00
Jordan Petridis 8f6329d71d podcasts-data: Add per file license annotations 2018-11-04 19:35:35 +02:00
Jordan Petridis 1a1e5ecd3f Update App icon. Close #102 2018-10-30 20:34:47 +02:00
Jordan Petridis 990d830f24 cargo fmt 2018-10-23 13:23:01 +03:00
Jordan Petridis 9f60121609 Flatpak: Cleanup libhandy headers 2018-10-09 12:58:40 +03:00
Jordan Petridis 885b796f85 New release 0.4.6 2018-10-07 10:18:15 +03:00
Jordan Petridis fa47806c93 Update Changelog 2018-10-07 10:18:14 +03:00
Jordan Petridis 40186ce155 Update dependancies 2018-10-06 11:29:52 +03:00
Jordan Petridis 9cfdb35224 AboutDialog: Update contributors list 2018-10-06 11:09:07 +03:00
Jordan Petridis 64860c4624 Update screenshots 2018-10-06 10:32:46 +03:00
Jordan Petridis 32bd2a89a3 Stacks: Check if there episodes insteads of shows
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.
2018-10-06 10:22:24 +03:00
Jordan Petridis df302ad517 Pipeline: Do not terminate the stream upon errors
Stream::for_each terminated the stream upon the first error. This
was causing feeds to not update if any one returned a non-200ish
result. To work around this, we create a succesfull result for
every entry regardless at the end.

While we are at it, aslo switch from FuturesOrdered stream
to FuturesUnordered. There is no reason to use Ordered, this was
a typo initially.
2018-10-04 18:48:11 +03:00
Jordan Petridis 357d99ac7c Remove temporary file 2018-10-04 17:18:07 +03:00
Jordan Petridis 7e3fecc44a Source: Refactor the clear_etags method api 2018-10-04 16:46:04 +03:00
Jordan Petridis e0b3dd9795 Mpris: Implement the raise method 2018-10-04 16:46:04 +03:00
Jordan Petridis cd2b087006 Player: Check the episode id before triggering a smart rewind 2018-10-04 05:27:11 +00:00
Jordan Petridis ef2940142c PlayerInfo: Store the id of the current playing episode 2018-10-04 05:27:11 +00:00
Jordan Petridis e13b8b8827 Player: Tweak the smart rewind behavior
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.
2018-10-04 05:27:11 +00:00
Jordan Petridis 43fce2e89a CI: Use generic bundle name
When run an environment CI_COMMIT_SHA is not resolved and results
into a 404 url in the review apps
2018-10-04 08:25:50 +03:00
Jordan Petridis bcc6ab50e2 PlayerInfo: Minor refactor of the mpris cover 2018-10-04 02:19:56 +00:00
Jordan Petridis 23aa8c05ab Player: Do not duplicate the mpris instance 2018-10-04 02:19:56 +00:00
Jordan Petridis 986d898217 Player: Remove an unwrap 2018-10-04 02:19:56 +00:00
Jordan Petridis 654c0e5e56 Player: Remove Initialization test
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)
2018-10-04 02:19:56 +00:00
Jordan Petridis fc80b180bc CI: Allow rusftm check to fail for now
Stuff broke with rustfmt nightly 0.99.5 and I haven't found time
to look into it yet.
2018-10-04 05:17:21 +03:00
Jordan Petridis 0d9dca99e9 Meson: capture the output of the custom target
Previously meson would withhold the stdout output, and only
print it once the job was finished. This was a bit problematic
with the current way we wire cargo into meson, cause you have
no output of whats going on till then causing a degraded UX.

With this change output is printed directly to stdout and
behaves as expected.

https://mesonbuild.com/Reference-manual.html#custom_target
2018-10-04 04:58:57 +03:00
Jordan Petridis a2b6d622de Update dependancies 2018-09-29 13:58:45 +03:00
Jordan Petridis 0887789f5e Pipeline: Complete the move to Tokio Runtime 2018-09-29 13:35:45 +03:00
Jordan Petridis 3c4574f2ec scripts/test.sh: Don't keep build-dirs 2018-09-29 12:07:21 +03:00
Jordan Petridis 62029f6164 Pipeline: Minor refactor
Use the proper Stream API to return a future to run on the
executor. Previously I was using a workaround to convert the
Stream into a future and run it to completion in the Executor,
since I was not aware of a better API.
2018-09-29 12:03:00 +03:00
Jordan Petridis ba986847d6 Merge branch 'wip/hyper-12.X-update'
See merge request World/podcasts!75
2018-09-29 11:42:53 +03:00
Jordan Petridis fded78ce6f Flatpak: Switch to the master runtime again 2018-09-29 11:18:39 +03:00
Jordan Petridis 8d44649a1e Update dependancies 2018-09-29 09:54:06 +03:00
Jordan Petridis f4d0c51dc2 podcasts-downloader: Upgrade reqwests to 0.9 2018-09-29 09:54:06 +03:00
Jordan Petridis ba60db9977 podcasts-gtk: Upgrade reqwests to 0.9 2018-09-29 09:54:06 +03:00
Jordan Petridis 0a5a7a684d podcasts-downloader: Remove direct dependancy on hyper 2018-09-29 09:54:06 +03:00
Jordan Petridis 5050dda4d2 Hamburger: Update to reflect the latest HIG changes
Preferences are now grouped with the application actions.
The About label was renamed to "About Podcasts".

https://mail.gnome.org/archives/desktop-devel-list/2018-September/msg00015.html
2018-09-29 02:43:19 +03:00
Jordan Petridis b1e99b96c4 CI: Switch the flatpak image 2018-09-22 04:53:08 +03:00
Jordan Petridis de1c8485ae Fix rustc warnings
New warnings were introduced with rustc 1.29.0

podcasts-data/src/lib.rs: this one can be removed once diesel is
upgraded.
https://github.com/diesel-rs/diesel/issues/1785#issuecomment-422577018

podcasts-gtk/src/i18n.rs: This is just a deprication warning
2018-09-22 04:47:24 +03:00
Jordan Petridis 565d1d0388 Build against the 3.28 runtime for now
Freedesktop 18.08.11 dropped openssl 1.0 which caused hyper to
no longer build. Reverting to the old runtime till hyper is
upgraded. See #84 for more.
2018-09-22 04:47:24 +03:00
Jordan Petridis da3cf6ca27 Flatpak: Pass configuration to libhandy
Do not build what we don't need.
2018-09-18 12:43:51 +03:00
Jordan Petridis 208f0c248d Update rest of the dependancies 2018-09-13 15:47:40 +03:00
Jordan Petridis c0e034726a Upgrade gtk-rs and friends
Upgrade gtk-rs, and everything dependings on it like gst-rs and
libhandy bindigns
2018-09-13 15:47:40 +03:00
Jordan Petridis 2e4a9eaaeb Update dependancies 2018-09-08 21:41:39 +03:00
Jordan Petridis baa84773a5 EpisodeWidget: Change the "cancel" action icon 2018-09-08 20:17:47 +03:00
Jordan Petridis a39e642b5a EpisodeWidget: Change cacnel button to an icon
This also reworks the button_box to be just a GtkBox instead.
I couldn't get ButtonBox to behave the way I wanted.

Fixes #89
2018-09-08 20:17:47 +03:00
Jordan Petridis e42cb49cbe EpisodeWidget: Hide total_size if request fails
This moves the rest of the methods of Progress struct to the downloader
trait and cancels the Progress if the request does nto succed.

Close #90
2018-09-08 20:17:47 +03:00
Jordan Petridis b40c12efbd Pipeline: Avoid spamming stderr when not needed
This commit add a new DataError Variant for feeds that return 304.
Its expected behaviror and the current API of Source::into_feed
is kinda limiting the return type to make it easier to handle.

Up till now 304 was returning an Error to early return. Ideally
Source::into_feed will return a Multi variant Result Enum.

example:

enum FeedResult {
    Ok(Success(feed)),
    Ok(NotModified),
    Err(err),
}

Hopefully in a refactor in the near Future™

Till then we will just have to match and ignore
DataError::FeedNotModified.
2018-09-08 20:17:47 +03:00
Jordan Petridis 3c5ddad133 DataError: Improve the FeedRedirect variant 2018-09-08 20:17:47 +03:00
Jordan Petridis 1ca4cb40dd Pipeline: clear the imports of fututres 2018-09-08 20:17:47 +03:00
Jordan Petridis 678b0b9db1 BaseView: Set minimum width to 360
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.
2018-09-08 20:17:47 +03:00
Jordan Petridis e633fa41ac Pipeline: Minor formatting improvment 2018-09-08 20:17:47 +03:00
Jordan Petridis dac303e33b Pipeline: Use a custom tokio threadpool
This reverts commit e64883eecb
and 40dd2d6923

Seems like core.run() returns once its done even if there
are still tasks in the Runtime underneath. A way to solve that
would be to call the shutdown_on_idle method.

We need ownership of the threadpool in order to invoke
`shutdown_on_idle` method but core.runtime only returns a
referrence so we need to create our own threadpool.
2018-09-08 20:17:46 +03:00
Jordan Petridis fd77d672c5 Update Changelog 2018-09-08 20:17:46 +03:00
Jordan Petridis a991d9f512 DataError: Remove unused error variant
This was added due to Threadpool::spawn returning errors, but its
no longer used.
2018-09-08 20:17:46 +03:00
Jordan Petridis 674b3b54dc Pipeline: reuse the prexisting runtime executor
Instead of creating our own threadpool, we should reuse the executor
of the tokio::runtime::Runtime that backs the tokio::reactor::Core.
2018-09-08 20:17:46 +03:00
Jordan Petridis 09948845ca Pipeline: Remove use of clone! macro 2018-09-08 20:17:46 +03:00
Jordan Petridis 0b8a0695f7 Pipeline: Use tokio threadpool to index feeds 2018-09-08 20:17:46 +03:00
Jordan Petridis a7c95d5718 Pipeline: Remove dependancy on rayon_futures
This requires a RUSTFLAG to be set before hand for rayon to build.
This brakes a lot of tools like rls and clippy by default and
require special configs for itnegration.

Additionally, rayon_futures is still 0.1 and not much work seem
to have gone into it. Ideally it should be replased with the tokio
runtime/threadpool.
2018-09-08 20:17:46 +03:00
Jordan Petridis 8a05597e52 Feed: Remove another unnecessary wrapper 2018-09-08 20:17:45 +03:00
Jordan Petridis 145d45f800 Feed: Remove unnecessary function wrapper 2018-09-08 20:17:45 +03:00
Jordan Petridis a3f5dbfe07 CI: cache only the sources from flatpak-builder
Gitlab CI zips its cache target which causes it to strip
xattributes. This breaks ostree and the cache artifacts.

Cache only the sources instead.
2018-09-05 00:47:45 +03:00
Jordan Petridis b05163632b test.sh: build with devel profile as well 2018-09-03 11:17:03 +03:00
Jordan Petridis 064d877205 Appdata: add release notes 2018-08-31 21:00:18 +03:00
Jordan Petridis 3f509f44a1 Update dependancies. 2018-08-30 20:45:53 +03:00
Jordan Petridis 9bc8a8ac2b Release: include meson_options.txt 2018-08-30 20:21:11 +03:00
Jordan Petridis abfe98283b EpisodeWidget: Allow size labels to elipsize 2018-08-30 20:21:10 +03:00
Jordan Petridis 993b6e9d0a Utils: only queue a single cover download
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.
2018-08-28 21:15:52 +00:00
Jordan Petridis 273c9f7b99 Utils: Change the priority of the cover caches
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.
2018-08-28 21:15:52 +00:00
Jordan Petridis 822deb2867 Utils: do not block the cover_dl registry
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.
2018-08-28 21:15:52 +00:00
Jordan Petridis 87e8d0b775 Fix the test-suite 2018-08-28 17:50:57 +03:00
Jordan Petridis 569c00ff5f Allow for parallel development instance
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.
2018-08-28 17:22:13 +03:00
Jordan Petridis 15457e1db4 App/Build: Use env! macro to fetch the variable
env! is resolved at compile time which means we don't need to read
and set LOCALDI from build.rs
2018-08-28 17:22:13 +03:00
Jordan Petridis 0ae1eb9578 build: Translate desktop and appdata files 2018-08-28 17:22:13 +03:00
Jordan Petridis aa1d0161d3 cargo fmt 2018-08-27 21:08:29 +03:00
Jordan Petridis a1b4306954 Merge remote-tracking branch 'zander/master'
See !65 for more.
2018-08-27 10:53:07 +03:00
Jordan Petridis 46cfa79e89 Update .gitignore 2018-08-26 12:39:26 +03:00