diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 32c78c8..5323abb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: - review variables: - BUNDLE: "hammond-dev.flatpak" + BUNDLE: "gnome-podcasts-dev.flatpak" .cargo_cache_template: &cargo_cache cache: @@ -34,7 +34,7 @@ variables: script: - rustc -Vv && cargo -Vv # Force regeneration of gresources regardless of artifacts chage - - cd hammond-gtk/resources/ && glib-compile-resources --generate resources.xml && cd ../../ + - cd podcasts-gtk/resources/ && glib-compile-resources --generate resources.xml && cd ../../ - cargo build - cargo test -- --test-threads=1 @@ -58,22 +58,22 @@ flatpak: image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:3.28 stage: test script: - - flatpak-builder --stop-at=hammond app org.gnome.Hammond.json + - flatpak-builder --stop-at=gnome-podcasts app org.gnome.Podcasts.json # https://gitlab.gnome.org/World/hammond/issues/55 # Force regeneration of gresources regardless of artifacts chage - - flatpak-builder --run app org.gnome.Hammond.json glib-compile-resources --sourcedir=hammond-gtk/resources/ hammond-gtk/resources/resources.xml + - flatpak-builder --run app org.gnome.Podcasts.json glib-compile-resources --sourcedir=podcasts-gtk/resources/ podcasts-gtk/resources/resources.xml # Build the flatpak repo - - flatpak-builder --run app org.gnome.Hammond.json meson --prefix=/app --libdir=/app/lib _build - - flatpak-builder --run app org.gnome.Hammond.json ninja -C _build install - - flatpak-builder --finish-only app org.gnome.Hammond.json + - flatpak-builder --run app org.gnome.Podcasts.json meson --prefix=/app --libdir=/app/lib _build + - flatpak-builder --run app org.gnome.Podcasts.json ninja -C _build install + - flatpak-builder --finish-only app org.gnome.Podcasts.json - flatpak build-export repo app # Create a flatpak bundle - - flatpak build-bundle repo ${BUNDLE} org.gnome.Hammond + - flatpak build-bundle repo ${BUNDLE} org.gnome.Podcasts # Run the tests - # - flatpak-builder --run app org.gnome.Hammond.json cargo test -- --test-threads=1 - # - flatpak-builder --run app org.gnome.Hammond.json cargo test -- --test-threads=1 --ignored + # - flatpak-builder --run app org.gnome.Podcasts.json cargo test -- --test-threads=1 + # - flatpak-builder --run app org.gnome.Podcasts.json cargo test -- --test-threads=1 --ignored artifacts: paths: @@ -139,6 +139,6 @@ rustfmt: - rustc --version && cargo --version - cargo clippy --version # Force regeneration of gresources regardless of artifacts chage - - cd hammond-gtk/resources/ && glib-compile-resources --generate resources.xml && cd ../../ + - cd podcasts-gtk/resources/ && glib-compile-resources --generate resources.xml && cd ../../ - cargo clippy --all <<: *cargo_cache diff --git a/.gitlab/issue_templates/BrokenFeed.md b/.gitlab/issue_templates/BrokenFeed.md index f74b997..24bd2e4 100644 --- a/.gitlab/issue_templates/BrokenFeed.md +++ b/.gitlab/issue_templates/BrokenFeed.md @@ -18,7 +18,7 @@ Some common cases might be: Steps to reproduce: -1. Open Hammond +1. Open GNOME Podcasts 2. Do an action 3. ... diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9ecbc79..c9240d1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,17 +1,17 @@ -## Contributing to Hammond +## Contributing to GNOME Podcasts Thank you for looking in this file! -When contributing to the development of Hammond, please first discuss the change you wish to make via issue, email, or any other method with the maintainers before making a change. +When contributing to the development of GNOME Podcasts, please first discuss the change you wish to make via issue, email, or any other method with the maintainers before making a change. -If you have any questions regarding the use or development of Hammond, +If you have any questions regarding the use or development of GNOME Podcasts, want to discuss design or simply hang out, please join us in [#hammond on irc.gnome.org.](irc://irc.gnome.org/#hammond) Please note we have a [code of conduct](https://wiki.gnome.org/Foundation/CodeOfConduc), please follow it in all your interactions with the project. ## Source repository -Hammond's main source repository is at gitlab.gnome.org. You can view +GNOME Podcasts's main source repository is at gitlab.gnome.org. You can view the web interface [here](https://gitlab.gnome.org/World/hammond) Development happens in the master branch. @@ -50,8 +50,8 @@ In order to run the test suite use the following: `cargo test -- --test-threads= # Issues, issues and more issues! -There are many ways you can contribute to Hammond, and all of them involve creating issues -in [Hammond issue tracker](https://gitlab.gnome.org/World/hammond/issues). This is the entry point for your contribution. +There are many ways you can contribute to GNOME Podcasts, and all of them involve creating issues +in [GNOME Podcasts issue tracker](https://gitlab.gnome.org/World/hammond/issues). This is the entry point for your contribution. To create an effective and high quality ticket, try to put the following information on your ticket: @@ -74,7 +74,7 @@ If it's an issue, add the steps to reproduce like this: Steps to reproduce: -1. Open Hammond +1. Open GNOME Podcasts 2. Do an Action 3. ... diff --git a/Cargo.lock b/Cargo.lock index 9216b83..98edc06 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -897,88 +897,6 @@ dependencies = [ "pkg-config 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "hammond-data" -version = "0.1.0" -dependencies = [ - "ammonia 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "criterion 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_builder 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "diesel 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "diesel_migrations 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-tls 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon-futures 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rfc822_sanitizer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rss 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "hammond-downloader" -version = "0.1.0" -dependencies = [ - "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "hammond-data 0.1.0", - "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "mime_guess 1.8.6 (registry+https://github.com/rust-lang/crates.io-index)", - "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "hammond-gtk" -version = "0.1.0" -dependencies = [ - "chrono 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-channel 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gdk 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gdk-pixbuf 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gio 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "glib 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gstreamer 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", - "gstreamer-player 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", - "gtk 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hammond-data 0.1.0", - "hammond-downloader 0.1.0", - "html2text 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "loggerv 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "open 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)", - "send-cell 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "handlebars" version = "0.32.4" @@ -1562,6 +1480,88 @@ name = "pkg-config" version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "podcasts-data" +version = "0.1.0" +dependencies = [ + "ammonia 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_builder 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "diesel 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "diesel_migrations 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-tls 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon-futures 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rfc822_sanitizer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rss 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "podcasts-downloader" +version = "0.1.0" +dependencies = [ + "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "mime_guess 1.8.6 (registry+https://github.com/rust-lang/crates.io-index)", + "podcasts-data 0.1.0", + "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "podcasts-gtk" +version = "0.1.0" +dependencies = [ + "chrono 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-channel 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "gdk 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gdk-pixbuf 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gio 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "glib 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gstreamer 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", + "gstreamer-player 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", + "gtk 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "html2text 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "loggerv 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "open 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "podcasts-data 0.1.0", + "podcasts-downloader 0.1.0", + "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)", + "send-cell 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "precomputed-hash" version = "0.1.1" diff --git a/Cargo.toml b/Cargo.toml index 95e6219..934250f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [workspace] members = [ - "hammond-data", - "hammond-downloader", - "hammond-gtk" + "podcasts-data", + "podcasts-downloader", + "podcasts-gtk" ] [profile.release] diff --git a/LICENSE b/LICENSE index 74238ce..adba10d 100644 --- a/LICENSE +++ b/LICENSE @@ -631,7 +631,7 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Hammond + GNOME Podcasts Copyright (C) 2017 Jordan Petridis This program is free software: you can redistribute it and/or modify @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - Hammond Copyright (C) 2017 Jordan Petridis + GNOME Podcasts Copyright (C) 2017 Jordan Petridis This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/README.md b/README.md index a22c077..6cbc49d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Hammond +# GNOME Podcasts ### A Podcast Client for GNOME written in Rust. @@ -8,18 +8,18 @@ ## Quick start -Hammond can be built and run with [Gnome Builder](https://wiki.gnome.org/Apps/Builder) >= 3.28. +GNOME Podcasts can be built and run with [Gnome Builder](https://wiki.gnome.org/Apps/Builder) >= 3.28. Get Builder [here](https://wiki.gnome.org/Apps/Builder/Downloads) ## Broken Feeds -Found a feed that does not work in Hammond? +Found a feed that does not work in GNOME Podcasts? Please [open an issue](https://gitlab.gnome.org/World/hammond/issues/new) and choose the `BrokenFeed` template so we will know and fix it! ## Getting in Touch -If you have any questions regarding the use or development of Hammond, +If you have any questions regarding the use or development of GNOME Podcasts, want to discuss design or simply hang out, please join us in `#hammond` on [irc.gnome.org.][irc] or [matrix][matrix]. @@ -31,11 +31,11 @@ There isn't much documentation yet, so you will probably have question about par ### Flatpak -Flatpak is the reccomended way of building and installing Hammond. +Flatpak is the reccomended way of building and installing GNOME Podcasts. #### Building a Flatpak -Download the `org.gnome.Hammond.json` flatpak manifest from this repo. +Download the `org.gnome.Podcasts.json` flatpak manifest from this repo. ```bash # Add flathub repo @@ -46,21 +46,21 @@ flatpak --user remote-add gnome-nightly --if-not-exists https://sdk.gnome.org/gn flatpak --user install gnome-nightly org.gnome.Sdk org.gnome.Platform # Install the required rust-stable extension from flathub flatpak --user install flathub org.freedesktop.Sdk.Extension.rust-stable -flatpak-builder --user --repo=repo hammond org.gnome.Hammond.json --force-clean +flatpak-builder --user --repo=repo podcasts org.gnome.Podcasts.json --force-clean ``` To install the resulting flatpak you can do: ```bash -flatpak build-bundle repo hammond.flatpak org.gnome.Hammond -flatpak install --user --bundle hammond.flatpak +flatpak build-bundle repo gnome-podcasts.flatpak org.gnome.Podcasts +flatpak install --user --bundle gnome-podcasts.flatpak ``` ### Building from soure ```sh git clone https://gitlab.gnome.org/World/hammond.git -cd hammond/ +cd gnome-podcasts/ meson --prefix=/usr build ninja -C build sudo ninja -C build install @@ -119,15 +119,15 @@ There are also some minor tasks tagged with `TODO:` and `FIXME:` in the source c ```sh $ tree -d ├── screenshots # png's used in the README.md -├── hammond-data # Storate related stuff, SQLite, XDG setup, RSS Parser. +├── podcasts-data # Storate related stuff, SQLite, XDG setup, RSS Parser. │   ├── migrations # Diesel SQL migrations. │   │   └── ... │   ├── src │   └── tests │   └── feeds # Raw RSS Feeds used for tests. -├── hammond-downloader # Really basic, Really crappy downloader. +├── podcasts-downloader # Really basic, Really crappy downloader. │   └── src -├── hammond-gtk # The Gtk+ Client +├── podcasts-gtk # The Gtk+ Client │   ├── resources # GResources folder │   │   └── gtk # Contains the glade.ui files. │   └── src @@ -137,13 +137,12 @@ $ tree -d ## A note about the project's name -The project was named after Allan Moore's character [Evey Hammond](https://en.wikipedia.org/wiki/Evey_Hammond) from the graphic novel V for Vendetta. - -It has nothing to do with the horrible headlines on the news. +The project used to be called Hammond, after Allan Moore's character [Evey Hammond](https://en.wikipedia.org/wiki/Evey_Hammond) from the graphic novel V for Vendetta. +It was renamed to GNOME Podcasts on 2018/07/24 shortly before its first public release. ## Acknowledgments -Hammond's design is heavily insired by [GNOME Music](https://wiki.gnome.org/Design/Apps/Music) and [Vocal](http://vocalproject.net/). +GNOME Podcasts's design is heavily insired by [GNOME Music](https://wiki.gnome.org/Design/Apps/Music) and [Vocal](http://vocalproject.net/). We also copied some elements from [GNOME News](https://wiki.gnome.org/Design/Apps/Potential/News). @@ -151,4 +150,4 @@ And almost the entirety of the build system is copied from the [Fractal](https:/ [vendor]: https://github.com/alexcrichton/cargo-vendor [irc]: irc://irc.gnome.org/#hammond -[matrix]: https://matrix.to/#/#hammond:matrix.org \ No newline at end of file +[matrix]: https://matrix.to/#/#gnome-podcasts:matrix.org \ No newline at end of file diff --git a/hammond-gtk/resources/meson.build b/hammond-gtk/resources/meson.build deleted file mode 100644 index 1384da2..0000000 --- a/hammond-gtk/resources/meson.build +++ /dev/null @@ -1,13 +0,0 @@ -subdir('icons') - -install_data('org.gnome.Hammond.desktop', install_dir : datadir + '/applications') -install_data('org.gnome.Hammond.appdata.xml', install_dir : datadir + '/appdata') -install_data('org.gnome.Hammond.gschema.xml', install_dir: join_paths(datadir, 'glib-2.0', 'schemas')) - - -configure_file(input: 'org.gnome.Hammond.service.in', - output: 'org.gnome.Hammond.service', - configuration: hammond_conf, - install_dir: join_paths([datadir,'dbus-1/services'])) - -meson.add_install_script('../../scripts/compile-gschema.py') diff --git a/hammond-gtk/resources/org.gnome.Hammond.desktop b/hammond-gtk/resources/org.gnome.Hammond.desktop deleted file mode 100644 index ef4559b..0000000 --- a/hammond-gtk/resources/org.gnome.Hammond.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Name=Hammond -GenericName=Podcast Client -Comment=Play, Subscribe and Manage Podcast Feeds. -Icon=org.gnome.Hammond -Exec=hammond -Terminal=false -Type=Application -StartupNotify=true -Categories=AudioVideo;Audio; -Keywords=Podcast -DBusActivatable=true diff --git a/hammond-gtk/resources/org.gnome.Hammond.service.in b/hammond-gtk/resources/org.gnome.Hammond.service.in deleted file mode 100644 index 7b23700..0000000 --- a/hammond-gtk/resources/org.gnome.Hammond.service.in +++ /dev/null @@ -1,3 +0,0 @@ -[D-BUS Service] -Name=org.gnome.Hammond -Exec=@BINDIR@/hammond --gapplication-service \ No newline at end of file diff --git a/meson.build b/meson.build index 6428c59..4f5d5ff 100644 --- a/meson.build +++ b/meson.build @@ -2,26 +2,26 @@ # https://gitlab.gnome.org/danigm/fractal/blob/6e2911f9d2353c99a18a6c19fab7f903c4bbb431/meson.build project( - 'hammond', 'rust', + 'gnome-podcasts', 'rust', version: '0.4.0', license: 'GPLv3', ) -hammond_version = meson.project_version() -version_array = hammond_version.split('.') -hammond_major_version = version_array[0].to_int() -hammond_minor_version = version_array[1].to_int() -hammond_version_micro = version_array[2].to_int() +podcasts_version = meson.project_version() +version_array = podcasts_version.split('.') +podcasts_major_version = version_array[0].to_int() +podcasts_minor_version = version_array[1].to_int() +podcasts_version_micro = version_array[2].to_int() -hammond_prefix = get_option('prefix') -hammond_bindir = join_paths(hammond_prefix, get_option('bindir')) +podcasts_prefix = get_option('prefix') +podcasts_bindir = join_paths(podcasts_prefix, get_option('bindir')) -hammond_conf = configuration_data() -hammond_conf.set('BINDIR', hammond_bindir) +podcasts_conf = configuration_data() +podcasts_conf.set('BINDIR', podcasts_bindir) datadir = get_option('datadir') icondir = join_paths(datadir, 'icons') -subdir('hammond-gtk/resources') +subdir('podcasts-gtk/resources') cargo = find_program('cargo', required: false) gresource = find_program('glib-compile-resources', required: false) @@ -31,11 +31,11 @@ cargo_script = find_program('scripts/cargo.sh') cargo_release = custom_target('cargo-build', build_by_default: true, build_always: true, - output: ['hammond'], + output: ['gnome-podcasts'], install: true, - install_dir: hammond_bindir, + install_dir: podcasts_bindir, command: [cargo_script, '@CURRENT_SOURCE_DIR@', '@OUTPUT@']) run_target('release', command: ['scripts/release.sh', - meson.project_name() + '-' + hammond_version - ]) + meson.project_name() + '-' + podcasts_version + ]) \ No newline at end of file diff --git a/org.gnome.Hammond.json b/org.gnome.Podcasts.json similarity index 87% rename from org.gnome.Hammond.json rename to org.gnome.Podcasts.json index 6b305d8..01c27b9 100644 --- a/org.gnome.Hammond.json +++ b/org.gnome.Podcasts.json @@ -1,12 +1,12 @@ { - "app-id" : "org.gnome.Hammond", + "app-id" : "org.gnome.Podcasts", "runtime" : "org.gnome.Platform", "runtime-version" : "3.28", "sdk" : "org.gnome.Sdk", "sdk-extensions" : [ "org.freedesktop.Sdk.Extension.rust-stable" ], - "command" : "hammond", + "command" : "gnome-podcasts", "tags" : [ "nightly" ], @@ -29,14 +29,14 @@ "--share=network" ], "env" : { - "CARGO_HOME" : "/run/build/Hammond/cargo", + "CARGO_HOME" : "/run/build/Podcasts/cargo", "RUST_BACKTRACE" : "1", "DEBUG" : "true" } }, "modules" : [ { - "name" : "hammond", + "name" : "gnome-podcasts", "buildsystem" : "meson", "sources" : [ { diff --git a/hammond-data/Cargo.toml b/podcasts-data/Cargo.toml similarity index 97% rename from hammond-data/Cargo.toml rename to podcasts-data/Cargo.toml index ed55a01..ad39fbc 100644 --- a/hammond-data/Cargo.toml +++ b/podcasts-data/Cargo.toml @@ -1,6 +1,6 @@ [package] authors = ["Jordan Petridis "] -name = "hammond-data" +name = "podcasts-data" version = "0.1.0" workspace = "../" diff --git a/hammond-data/benches/bench.rs b/podcasts-data/benches/bench.rs similarity index 94% rename from hammond-data/benches/bench.rs rename to podcasts-data/benches/bench.rs index beb6fc0..9c53079 100644 --- a/hammond-data/benches/bench.rs +++ b/podcasts-data/benches/bench.rs @@ -5,9 +5,9 @@ extern crate criterion; use criterion::Criterion; // extern crate futures; -extern crate hammond_data; extern crate hyper; extern crate hyper_tls; +extern crate podcasts_data; extern crate rand; extern crate tokio_core; // extern crate rayon; @@ -18,11 +18,11 @@ extern crate rss; // use futures::future::*; use tokio_core::reactor::Core; -use hammond_data::database::truncate_db; -use hammond_data::pipeline; -use hammond_data::FeedBuilder; -use hammond_data::Source; -// use hammond_data::errors::*; +use podcasts_data::database::truncate_db; +use podcasts_data::pipeline; +use podcasts_data::FeedBuilder; +use podcasts_data::Source; +// use podcasts_data::errors::*; use std::io::BufReader; diff --git a/hammond-data/diesel.toml b/podcasts-data/diesel.toml similarity index 100% rename from hammond-data/diesel.toml rename to podcasts-data/diesel.toml diff --git a/hammond-data/migrations/2017-09-15-001128_init_schema/down.sql b/podcasts-data/migrations/2017-09-15-001128_init_schema/down.sql similarity index 100% rename from hammond-data/migrations/2017-09-15-001128_init_schema/down.sql rename to podcasts-data/migrations/2017-09-15-001128_init_schema/down.sql diff --git a/hammond-data/migrations/2017-09-15-001128_init_schema/up.sql b/podcasts-data/migrations/2017-09-15-001128_init_schema/up.sql similarity index 100% rename from hammond-data/migrations/2017-09-15-001128_init_schema/up.sql rename to podcasts-data/migrations/2017-09-15-001128_init_schema/up.sql diff --git a/hammond-data/migrations/2017-12-09-125835_change_episode_pk/down.sql b/podcasts-data/migrations/2017-12-09-125835_change_episode_pk/down.sql similarity index 100% rename from hammond-data/migrations/2017-12-09-125835_change_episode_pk/down.sql rename to podcasts-data/migrations/2017-12-09-125835_change_episode_pk/down.sql diff --git a/hammond-data/migrations/2017-12-09-125835_change_episode_pk/up.sql b/podcasts-data/migrations/2017-12-09-125835_change_episode_pk/up.sql similarity index 100% rename from hammond-data/migrations/2017-12-09-125835_change_episode_pk/up.sql rename to podcasts-data/migrations/2017-12-09-125835_change_episode_pk/up.sql diff --git a/hammond-data/migrations/2017-12-22-145740_add_duration_column/down.sql b/podcasts-data/migrations/2017-12-22-145740_add_duration_column/down.sql similarity index 100% rename from hammond-data/migrations/2017-12-22-145740_add_duration_column/down.sql rename to podcasts-data/migrations/2017-12-22-145740_add_duration_column/down.sql diff --git a/hammond-data/migrations/2017-12-22-145740_add_duration_column/up.sql b/podcasts-data/migrations/2017-12-22-145740_add_duration_column/up.sql similarity index 100% rename from hammond-data/migrations/2017-12-22-145740_add_duration_column/up.sql rename to podcasts-data/migrations/2017-12-22-145740_add_duration_column/up.sql diff --git a/hammond-data/migrations/2017-12-30-201631_remove_published_date/down.sql b/podcasts-data/migrations/2017-12-30-201631_remove_published_date/down.sql similarity index 100% rename from hammond-data/migrations/2017-12-30-201631_remove_published_date/down.sql rename to podcasts-data/migrations/2017-12-30-201631_remove_published_date/down.sql diff --git a/hammond-data/migrations/2017-12-30-201631_remove_published_date/up.sql b/podcasts-data/migrations/2017-12-30-201631_remove_published_date/up.sql similarity index 100% rename from hammond-data/migrations/2017-12-30-201631_remove_published_date/up.sql rename to podcasts-data/migrations/2017-12-30-201631_remove_published_date/up.sql diff --git a/hammond-data/migrations/2018-06-30-141659_remove_dead_fields/down.sql b/podcasts-data/migrations/2018-06-30-141659_remove_dead_fields/down.sql similarity index 100% rename from hammond-data/migrations/2018-06-30-141659_remove_dead_fields/down.sql rename to podcasts-data/migrations/2018-06-30-141659_remove_dead_fields/down.sql diff --git a/hammond-data/migrations/2018-06-30-141659_remove_dead_fields/up.sql b/podcasts-data/migrations/2018-06-30-141659_remove_dead_fields/up.sql similarity index 100% rename from hammond-data/migrations/2018-06-30-141659_remove_dead_fields/up.sql rename to podcasts-data/migrations/2018-06-30-141659_remove_dead_fields/up.sql diff --git a/hammond-data/migrations/2018-06-30-150717_rename_tables/down.sql b/podcasts-data/migrations/2018-06-30-150717_rename_tables/down.sql similarity index 100% rename from hammond-data/migrations/2018-06-30-150717_rename_tables/down.sql rename to podcasts-data/migrations/2018-06-30-150717_rename_tables/down.sql diff --git a/hammond-data/migrations/2018-06-30-150717_rename_tables/up.sql b/podcasts-data/migrations/2018-06-30-150717_rename_tables/up.sql similarity index 100% rename from hammond-data/migrations/2018-06-30-150717_rename_tables/up.sql rename to podcasts-data/migrations/2018-06-30-150717_rename_tables/up.sql diff --git a/hammond-data/src/database.rs b/podcasts-data/src/database.rs similarity index 88% rename from hammond-data/src/database.rs rename to podcasts-data/src/database.rs index d467aee..ef4abc3 100644 --- a/hammond-data/src/database.rs +++ b/podcasts-data/src/database.rs @@ -24,7 +24,9 @@ lazy_static! { #[cfg(not(test))] lazy_static! { - static ref DB_PATH: PathBuf = xdg_dirs::HAMMOND_XDG.place_data_file("hammond.db").unwrap(); + static ref DB_PATH: PathBuf = xdg_dirs::PODCASTS_XDG + .place_data_file("podcasts.db") + .unwrap(); } #[cfg(test)] @@ -32,8 +34,8 @@ extern crate tempdir; #[cfg(test)] lazy_static! { - static ref TEMPDIR: tempdir::TempDir = { tempdir::TempDir::new("hammond_unit_test").unwrap() }; - static ref DB_PATH: PathBuf = TEMPDIR.path().join("hammond.db"); + static ref TEMPDIR: tempdir::TempDir = { tempdir::TempDir::new("podcasts_unit_test").unwrap() }; + static ref DB_PATH: PathBuf = TEMPDIR.path().join("podcasts.db"); } /// Get an r2d2 `SqliteConnection`. diff --git a/hammond-data/src/dbqueries.rs b/podcasts-data/src/dbqueries.rs similarity index 100% rename from hammond-data/src/dbqueries.rs rename to podcasts-data/src/dbqueries.rs diff --git a/hammond-data/src/errors.rs b/podcasts-data/src/errors.rs similarity index 100% rename from hammond-data/src/errors.rs rename to podcasts-data/src/errors.rs diff --git a/hammond-data/src/feed.rs b/podcasts-data/src/feed.rs similarity index 100% rename from hammond-data/src/feed.rs rename to podcasts-data/src/feed.rs diff --git a/hammond-data/src/lib.rs b/podcasts-data/src/lib.rs similarity index 82% rename from hammond-data/src/lib.rs rename to podcasts-data/src/lib.rs index 0c21aad..84165b9 100644 --- a/hammond-data/src/lib.rs +++ b/podcasts-data/src/lib.rs @@ -125,28 +125,28 @@ pub mod xdg_dirs { use xdg; lazy_static!{ - pub(crate) static ref HAMMOND_XDG: xdg::BaseDirectories = { - xdg::BaseDirectories::with_prefix("hammond").unwrap() + pub(crate) static ref PODCASTS_XDG: xdg::BaseDirectories = { + xdg::BaseDirectories::with_prefix("gnome-podcasts").unwrap() }; /// XDG_DATA Directory `Pathbuf`. - pub static ref HAMMOND_DATA: PathBuf = { - HAMMOND_XDG.create_data_directory(HAMMOND_XDG.get_data_home()).unwrap() + pub static ref PODCASTS_DATA: PathBuf = { + PODCASTS_XDG.create_data_directory(PODCASTS_XDG.get_data_home()).unwrap() }; /// XDG_CONFIG Directory `Pathbuf`. - pub static ref HAMMOND_CONFIG: PathBuf = { - HAMMOND_XDG.create_config_directory(HAMMOND_XDG.get_config_home()).unwrap() + pub static ref PODCASTS_CONFIG: PathBuf = { + PODCASTS_XDG.create_config_directory(PODCASTS_XDG.get_config_home()).unwrap() }; /// XDG_CACHE Directory `Pathbuf`. - pub static ref HAMMOND_CACHE: PathBuf = { - HAMMOND_XDG.create_cache_directory(HAMMOND_XDG.get_cache_home()).unwrap() + pub static ref PODCASTS_CACHE: PathBuf = { + PODCASTS_XDG.create_cache_directory(PODCASTS_XDG.get_cache_home()).unwrap() }; - /// Hammond Download Direcotry `PathBuf`. + /// GNOME Podcasts Download Direcotry `PathBuf`. pub static ref DL_DIR: PathBuf = { - HAMMOND_XDG.create_data_directory("Downloads").unwrap() + PODCASTS_XDG.create_data_directory("Downloads").unwrap() }; } } diff --git a/hammond-data/src/models/episode.rs b/podcasts-data/src/models/episode.rs similarity index 100% rename from hammond-data/src/models/episode.rs rename to podcasts-data/src/models/episode.rs diff --git a/hammond-data/src/models/mod.rs b/podcasts-data/src/models/mod.rs similarity index 100% rename from hammond-data/src/models/mod.rs rename to podcasts-data/src/models/mod.rs diff --git a/hammond-data/src/models/new_episode.rs b/podcasts-data/src/models/new_episode.rs similarity index 100% rename from hammond-data/src/models/new_episode.rs rename to podcasts-data/src/models/new_episode.rs diff --git a/hammond-data/src/models/new_show.rs b/podcasts-data/src/models/new_show.rs similarity index 100% rename from hammond-data/src/models/new_show.rs rename to podcasts-data/src/models/new_show.rs diff --git a/hammond-data/src/models/new_source.rs b/podcasts-data/src/models/new_source.rs similarity index 100% rename from hammond-data/src/models/new_source.rs rename to podcasts-data/src/models/new_source.rs diff --git a/hammond-data/src/models/show.rs b/podcasts-data/src/models/show.rs similarity index 100% rename from hammond-data/src/models/show.rs rename to podcasts-data/src/models/show.rs diff --git a/hammond-data/src/models/source.rs b/podcasts-data/src/models/source.rs similarity index 100% rename from hammond-data/src/models/source.rs rename to podcasts-data/src/models/source.rs diff --git a/hammond-data/src/opml.rs b/podcasts-data/src/opml.rs similarity index 100% rename from hammond-data/src/opml.rs rename to podcasts-data/src/opml.rs diff --git a/hammond-data/src/parser.rs b/podcasts-data/src/parser.rs similarity index 100% rename from hammond-data/src/parser.rs rename to podcasts-data/src/parser.rs diff --git a/hammond-data/src/pipeline.rs b/podcasts-data/src/pipeline.rs similarity index 100% rename from hammond-data/src/pipeline.rs rename to podcasts-data/src/pipeline.rs diff --git a/hammond-data/src/schema.patch b/podcasts-data/src/schema.patch similarity index 81% rename from hammond-data/src/schema.patch rename to podcasts-data/src/schema.patch index d961594..9a554ef 100644 --- a/hammond-data/src/schema.patch +++ b/podcasts-data/src/schema.patch @@ -1,7 +1,7 @@ -diff --git a/hammond-data/src/schema.rs b/hammond-data/src/schema.rs +diff --git a/podcasts-data/src/schema.rs b/podcasts-data/src/schema.rs index 03cbed0..88f1622 100644 ---- a/hammond-data/src/schema.rs -+++ b/hammond-data/src/schema.rs +--- a/podcasts-data/src/schema.rs ++++ b/podcasts-data/src/schema.rs @@ -1,8 +1,11 @@ +#![allow(warnings)] + diff --git a/hammond-data/src/schema.rs b/podcasts-data/src/schema.rs similarity index 100% rename from hammond-data/src/schema.rs rename to podcasts-data/src/schema.rs diff --git a/hammond-data/src/utils.rs b/podcasts-data/src/utils.rs similarity index 99% rename from hammond-data/src/utils.rs rename to podcasts-data/src/utils.rs index aeccd4c..5e13d0e 100644 --- a/hammond-data/src/utils.rs +++ b/podcasts-data/src/utils.rs @@ -174,7 +174,7 @@ mod tests { // Clean the db truncate_db().unwrap(); // Setup tmp file stuff - let tmp_dir = TempDir::new("hammond_test").unwrap(); + let tmp_dir = TempDir::new("podcasts_test").unwrap(); let valid_path = tmp_dir.path().join("virtual_dl.mp3"); let bad_path = tmp_dir.path().join("invalid_thing.mp3"); let mut tmp_file = File::create(&valid_path).unwrap(); diff --git a/hammond-data/tests/feeds/2018-01-20-GreaterThanCode.xml b/podcasts-data/tests/feeds/2018-01-20-GreaterThanCode.xml similarity index 100% rename from hammond-data/tests/feeds/2018-01-20-GreaterThanCode.xml rename to podcasts-data/tests/feeds/2018-01-20-GreaterThanCode.xml diff --git a/hammond-data/tests/feeds/2018-01-20-Intercepted.xml b/podcasts-data/tests/feeds/2018-01-20-Intercepted.xml similarity index 100% rename from hammond-data/tests/feeds/2018-01-20-Intercepted.xml rename to podcasts-data/tests/feeds/2018-01-20-Intercepted.xml diff --git a/hammond-data/tests/feeds/2018-01-20-LinuxUnplugged.xml b/podcasts-data/tests/feeds/2018-01-20-LinuxUnplugged.xml similarity index 100% rename from hammond-data/tests/feeds/2018-01-20-LinuxUnplugged.xml rename to podcasts-data/tests/feeds/2018-01-20-LinuxUnplugged.xml diff --git a/hammond-data/tests/feeds/2018-01-20-StealTheStars.xml b/podcasts-data/tests/feeds/2018-01-20-StealTheStars.xml similarity index 100% rename from hammond-data/tests/feeds/2018-01-20-StealTheStars.xml rename to podcasts-data/tests/feeds/2018-01-20-StealTheStars.xml diff --git a/hammond-data/tests/feeds/2018-01-20-TheTipOff.xml b/podcasts-data/tests/feeds/2018-01-20-TheTipOff.xml similarity index 100% rename from hammond-data/tests/feeds/2018-01-20-TheTipOff.xml rename to podcasts-data/tests/feeds/2018-01-20-TheTipOff.xml diff --git a/hammond-data/tests/feeds/2018-02-03-Intercepted.xml b/podcasts-data/tests/feeds/2018-02-03-Intercepted.xml similarity index 100% rename from hammond-data/tests/feeds/2018-02-03-Intercepted.xml rename to podcasts-data/tests/feeds/2018-02-03-Intercepted.xml diff --git a/hammond-data/tests/feeds/2018-03-28-Ellinofreneia.xml b/podcasts-data/tests/feeds/2018-03-28-Ellinofreneia.xml similarity index 100% rename from hammond-data/tests/feeds/2018-03-28-Ellinofreneia.xml rename to podcasts-data/tests/feeds/2018-03-28-Ellinofreneia.xml diff --git a/hammond-data/tests/feeds/notes.md b/podcasts-data/tests/feeds/notes.md similarity index 100% rename from hammond-data/tests/feeds/notes.md rename to podcasts-data/tests/feeds/notes.md diff --git a/hammond-downloader/Cargo.toml b/podcasts-downloader/Cargo.toml similarity index 80% rename from hammond-downloader/Cargo.toml rename to podcasts-downloader/Cargo.toml index f826b13..40c17d5 100644 --- a/hammond-downloader/Cargo.toml +++ b/podcasts-downloader/Cargo.toml @@ -1,6 +1,6 @@ [package] authors = ["Jordan Petridis "] -name = "hammond-downloader" +name = "podcasts-downloader" version = "0.1.0" workspace = "../" @@ -15,8 +15,8 @@ glob = "0.2.11" failure = "0.1.1" failure_derive = "0.1.1" -[dependencies.hammond-data] -path = "../hammond-data" +[dependencies.podcasts-data] +path = "../podcasts-data" [dev-dependencies] pretty_assertions = "0.5.1" \ No newline at end of file diff --git a/hammond-downloader/src/downloader.rs b/podcasts-downloader/src/downloader.rs similarity index 94% rename from hammond-downloader/src/downloader.rs rename to podcasts-downloader/src/downloader.rs index be0bd48..8dce05b 100644 --- a/hammond-downloader/src/downloader.rs +++ b/podcasts-downloader/src/downloader.rs @@ -11,8 +11,8 @@ use std::io::{BufWriter, Read, Write}; use std::path::Path; use std::sync::{Arc, Mutex}; -use hammond_data::xdg_dirs::HAMMOND_CACHE; -use hammond_data::{EpisodeWidgetModel, Save, ShowCoverModel}; +use podcasts_data::xdg_dirs::PODCASTS_CACHE; +use podcasts_data::{EpisodeWidgetModel, Save, ShowCoverModel}; // use failure::Error; use errors::DownloadError; @@ -78,7 +78,7 @@ fn download_into( // Construct a temp file to save desired content. // It has to be a `new_in` instead of new cause rename can't move cross // filesystems. - let tempdir = TempDir::new_in(HAMMOND_CACHE.to_str().unwrap(), "temp_download")?; + let tempdir = TempDir::new_in(PODCASTS_CACHE.to_str().unwrap(), "temp_download")?; let out_file = format!("{}/temp.part", tempdir.path().to_str().unwrap(),); ct_len.map(|x| { @@ -206,7 +206,7 @@ pub fn cache_image(pd: &ShowCoverModel) -> Result { return Err(DownloadError::NoImageLocation); } - let cache_path = HAMMOND_CACHE + let cache_path = PODCASTS_CACHE .to_str() .ok_or_else(|| DownloadError::InvalidCacheLocation)?; let cache_download_fold = format!("{}{}", cache_path, pd.title().to_owned()); @@ -236,14 +236,14 @@ pub fn cache_image(pd: &ShowCoverModel) -> Result { #[cfg(test)] mod tests { use super::*; - use hammond_data::dbqueries; - use hammond_data::pipeline; - use hammond_data::Source; + use podcasts_data::dbqueries; + use podcasts_data::pipeline; + use podcasts_data::Source; use std::fs; #[test] - // This test inserts an rss feed to your `XDG_DATA/hammond/hammond.db` so we make it explicit + // This test inserts an rss feed to your `XDG_DATA/podcasts/podcasts.db` so we make it explicit // to run it. #[ignore] fn test_cache_image() { @@ -261,7 +261,7 @@ mod tests { let img_path = cache_image(&pd); let foo_ = format!( "{}{}/cover.jpeg", - HAMMOND_CACHE.to_str().unwrap(), + PODCASTS_CACHE.to_str().unwrap(), pd.title() ); assert_eq!(img_path.unwrap(), foo_); diff --git a/hammond-downloader/src/errors.rs b/podcasts-downloader/src/errors.rs similarity index 96% rename from hammond-downloader/src/errors.rs rename to podcasts-downloader/src/errors.rs index 43d9400..b8dc4e7 100644 --- a/hammond-downloader/src/errors.rs +++ b/podcasts-downloader/src/errors.rs @@ -1,4 +1,4 @@ -use hammond_data::errors::DataError; +use podcasts_data::errors::DataError; use reqwest; use std::io; diff --git a/hammond-downloader/src/lib.rs b/podcasts-downloader/src/lib.rs similarity index 97% rename from hammond-downloader/src/lib.rs rename to podcasts-downloader/src/lib.rs index 5487ad3..3d67084 100644 --- a/hammond-downloader/src/lib.rs +++ b/podcasts-downloader/src/lib.rs @@ -44,9 +44,9 @@ extern crate log; extern crate pretty_assertions; extern crate glob; -extern crate hammond_data; extern crate hyper; extern crate mime_guess; +extern crate podcasts_data; extern crate reqwest; extern crate tempdir; diff --git a/hammond-gtk/Cargo.toml b/podcasts-gtk/Cargo.toml similarity index 83% rename from hammond-gtk/Cargo.toml rename to podcasts-gtk/Cargo.toml index 79ecbb0..ec55ea1 100644 --- a/hammond-gtk/Cargo.toml +++ b/podcasts-gtk/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["Jordan Petridis "] build = "build.rs" -name = "hammond-gtk" +name = "podcasts-gtk" version = "0.1.0" workspace = "../" @@ -36,11 +36,11 @@ version = "0.4.1" features = ["v2_50"] version = "0.4.1" -[dependencies.hammond-data] -path = "../hammond-data" +[dependencies.podcasts-data] +path = "../podcasts-data" -[dependencies.hammond-downloader] -path = "../hammond-downloader" +[dependencies.podcasts-downloader] +path = "../podcasts-downloader" [dev-dependencies] pretty_assertions = "0.5.1" diff --git a/hammond-gtk/build.rs b/podcasts-gtk/build.rs similarity index 100% rename from hammond-gtk/build.rs rename to podcasts-gtk/build.rs diff --git a/hammond-gtk/resources/gtk/empty_show.ui b/podcasts-gtk/resources/gtk/empty_show.ui similarity index 100% rename from hammond-gtk/resources/gtk/empty_show.ui rename to podcasts-gtk/resources/gtk/empty_show.ui diff --git a/hammond-gtk/resources/gtk/empty_view.ui b/podcasts-gtk/resources/gtk/empty_view.ui similarity index 100% rename from hammond-gtk/resources/gtk/empty_view.ui rename to podcasts-gtk/resources/gtk/empty_view.ui diff --git a/hammond-gtk/resources/gtk/episode_widget.ui b/podcasts-gtk/resources/gtk/episode_widget.ui similarity index 100% rename from hammond-gtk/resources/gtk/episode_widget.ui rename to podcasts-gtk/resources/gtk/episode_widget.ui diff --git a/hammond-gtk/resources/gtk/episodes_view.ui b/podcasts-gtk/resources/gtk/episodes_view.ui similarity index 100% rename from hammond-gtk/resources/gtk/episodes_view.ui rename to podcasts-gtk/resources/gtk/episodes_view.ui diff --git a/hammond-gtk/resources/gtk/episodes_view_widget.ui b/podcasts-gtk/resources/gtk/episodes_view_widget.ui similarity index 100% rename from hammond-gtk/resources/gtk/episodes_view_widget.ui rename to podcasts-gtk/resources/gtk/episodes_view_widget.ui diff --git a/hammond-gtk/resources/gtk/hamburger.ui b/podcasts-gtk/resources/gtk/hamburger.ui similarity index 100% rename from hammond-gtk/resources/gtk/hamburger.ui rename to podcasts-gtk/resources/gtk/hamburger.ui diff --git a/hammond-gtk/resources/gtk/headerbar.ui b/podcasts-gtk/resources/gtk/headerbar.ui similarity index 100% rename from hammond-gtk/resources/gtk/headerbar.ui rename to podcasts-gtk/resources/gtk/headerbar.ui diff --git a/hammond-gtk/resources/gtk/help-overlay.ui b/podcasts-gtk/resources/gtk/help-overlay.ui similarity index 100% rename from hammond-gtk/resources/gtk/help-overlay.ui rename to podcasts-gtk/resources/gtk/help-overlay.ui diff --git a/hammond-gtk/resources/gtk/inapp_notif.ui b/podcasts-gtk/resources/gtk/inapp_notif.ui similarity index 100% rename from hammond-gtk/resources/gtk/inapp_notif.ui rename to podcasts-gtk/resources/gtk/inapp_notif.ui diff --git a/hammond-gtk/resources/gtk/player_toolbar.ui b/podcasts-gtk/resources/gtk/player_toolbar.ui similarity index 100% rename from hammond-gtk/resources/gtk/player_toolbar.ui rename to podcasts-gtk/resources/gtk/player_toolbar.ui diff --git a/hammond-gtk/resources/gtk/prefs.ui b/podcasts-gtk/resources/gtk/prefs.ui similarity index 100% rename from hammond-gtk/resources/gtk/prefs.ui rename to podcasts-gtk/resources/gtk/prefs.ui diff --git a/hammond-gtk/resources/gtk/secondary_menu.ui b/podcasts-gtk/resources/gtk/secondary_menu.ui similarity index 100% rename from hammond-gtk/resources/gtk/secondary_menu.ui rename to podcasts-gtk/resources/gtk/secondary_menu.ui diff --git a/hammond-gtk/resources/gtk/show_menu.ui b/podcasts-gtk/resources/gtk/show_menu.ui similarity index 100% rename from hammond-gtk/resources/gtk/show_menu.ui rename to podcasts-gtk/resources/gtk/show_menu.ui diff --git a/hammond-gtk/resources/gtk/show_widget.ui b/podcasts-gtk/resources/gtk/show_widget.ui similarity index 100% rename from hammond-gtk/resources/gtk/show_widget.ui rename to podcasts-gtk/resources/gtk/show_widget.ui diff --git a/hammond-gtk/resources/gtk/shows_child.ui b/podcasts-gtk/resources/gtk/shows_child.ui similarity index 100% rename from hammond-gtk/resources/gtk/shows_child.ui rename to podcasts-gtk/resources/gtk/shows_child.ui diff --git a/hammond-gtk/resources/gtk/shows_view.ui b/podcasts-gtk/resources/gtk/shows_view.ui similarity index 100% rename from hammond-gtk/resources/gtk/shows_view.ui rename to podcasts-gtk/resources/gtk/shows_view.ui diff --git a/hammond-gtk/resources/gtk/style.css b/podcasts-gtk/resources/gtk/style.css similarity index 100% rename from hammond-gtk/resources/gtk/style.css rename to podcasts-gtk/resources/gtk/style.css diff --git a/hammond-gtk/resources/icons/hicolor/scalable/apps/org.gnome.Hammond.svg b/podcasts-gtk/resources/icons/hicolor/scalable/apps/org.gnome.Podcasts.svg similarity index 99% rename from hammond-gtk/resources/icons/hicolor/scalable/apps/org.gnome.Hammond.svg rename to podcasts-gtk/resources/icons/hicolor/scalable/apps/org.gnome.Podcasts.svg index 665df36..9ac1d5b 100644 --- a/hammond-gtk/resources/icons/hicolor/scalable/apps/org.gnome.Hammond.svg +++ b/podcasts-gtk/resources/icons/hicolor/scalable/apps/org.gnome.Podcasts.svg @@ -18,7 +18,7 @@ id="svg11300" sodipodi:version="0.32" inkscape:version="0.92.3 (2405546, 2018-03-11)" - sodipodi:docname="org.gnome.Hammond.svg" + sodipodi:docname="org.gnome.Podcasts.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" version="1.0" style="display:inline;enable-background:new" @@ -471,7 +471,7 @@ x="7.7533054" id="tspan3023" sodipodi:role="line" - style="stroke-width:0.33264872">org.gnome.Hammond + style="stroke-width:0.33264872">org.gnome.Podcasts - org.gnome.Hammond - Hammond + org.gnome.Podcasts + Podcasts GPL-3.0 CC0-1.0 Jordan Petridis Modern Podcast application for the GNOME desktop

- Hammond is a modern, reliable, and fast Podcast application for the GNOME + Podcasts is a modern, reliable, and fast Podcast application for the GNOME desktop written in Rust.

diff --git a/podcasts-gtk/resources/org.gnome.Podcasts.desktop b/podcasts-gtk/resources/org.gnome.Podcasts.desktop new file mode 100644 index 0000000..3d2809a --- /dev/null +++ b/podcasts-gtk/resources/org.gnome.Podcasts.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=Podcasts +Comment=Listen to your favorite podcasts, right from your desktop. +Icon=org.gnome.Podcasts +Exec=gnome-podcasts +Terminal=false +Type=Application +StartupNotify=true +Categories=GNOME;GTK;AudioVideo;Audio; +Keywords=Podcast;RSS; +DBusActivatable=true \ No newline at end of file diff --git a/hammond-gtk/resources/org.gnome.Hammond.gschema.xml b/podcasts-gtk/resources/org.gnome.Podcasts.gschema.xml similarity index 90% rename from hammond-gtk/resources/org.gnome.Hammond.gschema.xml rename to podcasts-gtk/resources/org.gnome.Podcasts.gschema.xml index 9979d5e..d0abe85 100644 --- a/hammond-gtk/resources/org.gnome.Hammond.gschema.xml +++ b/podcasts-gtk/resources/org.gnome.Podcasts.gschema.xml @@ -1,6 +1,6 @@ - + @@ -9,7 +9,7 @@ - + -1 Top position of the last open main window @@ -45,7 +45,7 @@ 1 How many periods of time to wait between automatic refreshes - + 'hours' What period of time to wait between automatic refreshes @@ -59,7 +59,7 @@ 2 How many periods of time to wait between automatic cleanups - + 'days' What period of time to wait between automatic cleanups diff --git a/podcasts-gtk/resources/org.gnome.Podcasts.service.in b/podcasts-gtk/resources/org.gnome.Podcasts.service.in new file mode 100644 index 0000000..a9a24cb --- /dev/null +++ b/podcasts-gtk/resources/org.gnome.Podcasts.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.gnome.Podcasts +Exec=@BINDIR@/gnome-podcasts --gapplication-service \ No newline at end of file diff --git a/hammond-gtk/resources/resources.xml b/podcasts-gtk/resources/resources.xml similarity index 97% rename from hammond-gtk/resources/resources.xml rename to podcasts-gtk/resources/resources.xml index ad41e44..2a22da4 100644 --- a/hammond-gtk/resources/resources.xml +++ b/podcasts-gtk/resources/resources.xml @@ -1,6 +1,6 @@ - + gtk/episode_widget.ui gtk/show_widget.ui gtk/empty_view.ui diff --git a/hammond-gtk/src/app.rs b/podcasts-gtk/src/app.rs similarity index 96% rename from hammond-gtk/src/app.rs rename to podcasts-gtk/src/app.rs index c531a1e..02bc993 100644 --- a/hammond-gtk/src/app.rs +++ b/podcasts-gtk/src/app.rs @@ -6,7 +6,7 @@ use gtk; use gtk::prelude::*; use crossbeam_channel::{unbounded, Receiver, Sender}; -use hammond_data::Show; +use podcasts_data::Show; use send_cell::SendCell; use headerbar::Header; @@ -23,6 +23,8 @@ use std::env; use std::rc::Rc; use std::sync::Arc; +pub const APP_ID: &str = "org.gnome.Podcasts"; + /// Creates an action named $called in the action map $on with the handler $handle macro_rules! action { ($on:expr, $called:expr, $handle:expr) => {{ @@ -73,12 +75,12 @@ pub struct App { impl App { pub fn new(application: >k::Application) -> Rc { - let settings = gio::Settings::new("org.gnome.Hammond"); + let settings = gio::Settings::new(APP_ID); let (sender, receiver) = unbounded(); let window = gtk::ApplicationWindow::new(application); - window.set_title("Hammond"); + window.set_title("Podcasts"); window.connect_delete_event(clone!(settings => move |window, _| { WindowGeometry::from_window(&window).write(&settings); Inhibit(false) @@ -293,7 +295,7 @@ impl App { } pub fn run() { - let application = gtk::Application::new("org.gnome.Hammond", ApplicationFlags::empty()) + let application = gtk::Application::new(APP_ID, ApplicationFlags::empty()) .expect("Application Initialization failed..."); application.connect_startup(clone!(application => move |_| { @@ -309,9 +311,9 @@ impl App { })); // Weird magic I copy-pasted that sets the Application Name in the Shell. - glib::set_application_name("Hammond"); - glib::set_prgname(Some("Hammond")); - gtk::Window::set_default_icon_name("org.gnome.Hammond"); + glib::set_application_name("Podcasts"); + glib::set_prgname(Some("gnome-podcasts")); + gtk::Window::set_default_icon_name(APP_ID); let args: Vec = env::args().collect(); ApplicationExtManual::run(&application, &args); } diff --git a/hammond-gtk/src/headerbar.rs b/podcasts-gtk/src/headerbar.rs similarity index 98% rename from hammond-gtk/src/headerbar.rs rename to podcasts-gtk/src/headerbar.rs index f6461b0..eb937c8 100644 --- a/hammond-gtk/src/headerbar.rs +++ b/podcasts-gtk/src/headerbar.rs @@ -7,7 +7,7 @@ use failure::Error; use rayon; use url::Url; -use hammond_data::{dbqueries, Source}; +use podcasts_data::{dbqueries, Source}; use app::Action; use stacks::Content; @@ -140,8 +140,8 @@ impl AddPopover { impl Default for Header { fn default() -> Header { - let builder = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/headerbar.ui"); - let menus = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/hamburger.ui"); + let builder = gtk::Builder::new_from_resource("/org/gnome/Podcasts/gtk/headerbar.ui"); + let menus = gtk::Builder::new_from_resource("/org/gnome/Podcasts/gtk/hamburger.ui"); let header = builder.get_object("headerbar").unwrap(); let switch = builder.get_object("switch").unwrap(); diff --git a/hammond-gtk/src/main.rs b/podcasts-gtk/src/main.rs similarity index 96% rename from hammond-gtk/src/main.rs rename to podcasts-gtk/src/main.rs index cf97e85..36e6be6 100644 --- a/hammond-gtk/src/main.rs +++ b/podcasts-gtk/src/main.rs @@ -60,12 +60,12 @@ extern crate pretty_assertions; extern crate chrono; extern crate crossbeam_channel; -extern crate hammond_data; -extern crate hammond_downloader; extern crate html2text; extern crate humansize; extern crate loggerv; extern crate open; +extern crate podcasts_data; +extern crate podcasts_downloader; extern crate rayon; extern crate regex; extern crate reqwest; @@ -119,7 +119,7 @@ fn main() { // Add custom style let provider = gtk::CssProvider::new(); - gtk::CssProvider::load_from_resource(&provider, "/org/gnome/Hammond/gtk/style.css"); + gtk::CssProvider::load_from_resource(&provider, "/org/gnome/Podcasts/gtk/style.css"); gtk::StyleContext::add_provider_for_screen( &gdk::Screen::get_default().expect("Error initializing gtk css provider."), &provider, diff --git a/hammond-gtk/src/manager.rs b/podcasts-gtk/src/manager.rs similarity index 91% rename from hammond-gtk/src/manager.rs rename to podcasts-gtk/src/manager.rs index 985c301..fb8f7c5 100644 --- a/hammond-gtk/src/manager.rs +++ b/podcasts-gtk/src/manager.rs @@ -1,9 +1,9 @@ use failure::Error; use rayon; -// use hammond_data::Episode; -use hammond_data::dbqueries; -use hammond_downloader::downloader::{get_episode, DownloadProgress}; +// use podcasts_data::Episode; +use podcasts_data::dbqueries; +use podcasts_downloader::downloader::{get_episode, DownloadProgress}; use std::collections::HashMap; use std::sync::{Arc, Mutex, RwLock}; @@ -110,19 +110,19 @@ pub fn add(id: i32, directory: String) -> Result<(), Error> { mod tests { use super::*; - use hammond_data::dbqueries; - use hammond_data::pipeline; - use hammond_data::utils::get_download_folder; - use hammond_data::{Episode, Source}; + use podcasts_data::dbqueries; + use podcasts_data::pipeline; + use podcasts_data::utils::get_download_folder; + use podcasts_data::{Episode, Source}; - use hammond_downloader::downloader::get_episode; + use podcasts_downloader::downloader::get_episode; use std::fs; use std::path::Path; use std::{thread, time}; #[test] - // This test inserts an rss feed to your `XDG_DATA/hammond/hammond.db` so we make it explicit + // This test inserts an rss feed to your `XDG_DATA/podcasts/podcasts.db` so we make it explicit // to run it. #[ignore] // THIS IS NOT A RELIABLE TEST diff --git a/hammond-gtk/src/prefs.rs b/podcasts-gtk/src/prefs.rs similarity index 99% rename from hammond-gtk/src/prefs.rs rename to podcasts-gtk/src/prefs.rs index 2ef17f3..2535f5b 100644 --- a/hammond-gtk/src/prefs.rs +++ b/podcasts-gtk/src/prefs.rs @@ -13,7 +13,7 @@ pub struct Prefs { impl Default for Prefs { fn default() -> Prefs { - let builder = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/prefs.ui"); + let builder = gtk::Builder::new_from_resource("/org/gnome/Podcasts/gtk/prefs.ui"); let dialog = builder.get_object("prefs").unwrap(); let dark_toggle = builder.get_object("dark_toggle").unwrap(); diff --git a/hammond-gtk/src/settings.rs b/podcasts-gtk/src/settings.rs similarity index 100% rename from hammond-gtk/src/settings.rs rename to podcasts-gtk/src/settings.rs diff --git a/hammond-gtk/src/stacks/content.rs b/podcasts-gtk/src/stacks/content.rs similarity index 100% rename from hammond-gtk/src/stacks/content.rs rename to podcasts-gtk/src/stacks/content.rs diff --git a/hammond-gtk/src/stacks/home.rs b/podcasts-gtk/src/stacks/home.rs similarity index 97% rename from hammond-gtk/src/stacks/home.rs rename to podcasts-gtk/src/stacks/home.rs index 25eabdf..df73b86 100644 --- a/hammond-gtk/src/stacks/home.rs +++ b/podcasts-gtk/src/stacks/home.rs @@ -4,8 +4,8 @@ use gtk::StackTransitionType; use crossbeam_channel::Sender; use failure::Error; -use hammond_data::dbqueries::is_episodes_populated; -use hammond_data::errors::DataError; +use podcasts_data::dbqueries::is_episodes_populated; +use podcasts_data::errors::DataError; use app::Action; use widgets::{EmptyView, HomeView}; diff --git a/hammond-gtk/src/stacks/mod.rs b/podcasts-gtk/src/stacks/mod.rs similarity index 100% rename from hammond-gtk/src/stacks/mod.rs rename to podcasts-gtk/src/stacks/mod.rs diff --git a/hammond-gtk/src/stacks/populated.rs b/podcasts-gtk/src/stacks/populated.rs similarity index 98% rename from hammond-gtk/src/stacks/populated.rs rename to podcasts-gtk/src/stacks/populated.rs index 0ae2670..1ebeb93 100644 --- a/hammond-gtk/src/stacks/populated.rs +++ b/podcasts-gtk/src/stacks/populated.rs @@ -5,8 +5,8 @@ use gtk::StackTransitionType; use crossbeam_channel::Sender; use failure::Error; -use hammond_data::dbqueries; -use hammond_data::Show; +use podcasts_data::dbqueries; +use podcasts_data::Show; use app::Action; use widgets::{ShowWidget, ShowsView}; diff --git a/hammond-gtk/src/stacks/show.rs b/podcasts-gtk/src/stacks/show.rs similarity index 97% rename from hammond-gtk/src/stacks/show.rs rename to podcasts-gtk/src/stacks/show.rs index ff89330..040afb6 100644 --- a/hammond-gtk/src/stacks/show.rs +++ b/podcasts-gtk/src/stacks/show.rs @@ -3,7 +3,7 @@ use gtk::prelude::*; use crossbeam_channel::Sender; use failure::Error; -use hammond_data::dbqueries::is_podcasts_populated; +use podcasts_data::dbqueries::is_podcasts_populated; use app::Action; use stacks::PopulatedStack; diff --git a/hammond-gtk/src/static_resource.rs b/podcasts-gtk/src/static_resource.rs similarity index 100% rename from hammond-gtk/src/static_resource.rs rename to podcasts-gtk/src/static_resource.rs diff --git a/hammond-gtk/src/utils.rs b/podcasts-gtk/src/utils.rs similarity index 97% rename from hammond-gtk/src/utils.rs rename to podcasts-gtk/src/utils.rs index 1985418..1bd3200 100644 --- a/hammond-gtk/src/utils.rs +++ b/podcasts-gtk/src/utils.rs @@ -16,13 +16,13 @@ use reqwest; use send_cell::SendCell; use serde_json::Value; -// use hammond_data::feed; -use hammond_data::dbqueries; -use hammond_data::opml; -use hammond_data::pipeline; -use hammond_data::utils::checkup; -use hammond_data::Source; -use hammond_downloader::downloader; +// use podcasts_data::feed; +use podcasts_data::dbqueries; +use podcasts_data::opml; +use podcasts_data::pipeline; +use podcasts_data::utils::checkup; +use podcasts_data::Source; +use podcasts_downloader::downloader; use std::collections::{HashMap, HashSet}; use std::sync::{Arc, Mutex, RwLock}; @@ -374,11 +374,11 @@ pub fn on_import_clicked(window: >k::ApplicationWindow, sender: &Sender Self { - let builder = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/inapp_notif.ui"); + let builder = gtk::Builder::new_from_resource("/org/gnome/Podcasts/gtk/inapp_notif.ui"); let revealer: gtk::Revealer = builder.get_object("revealer").unwrap(); let text: gtk::Label = builder.get_object("text").unwrap(); diff --git a/hammond-gtk/src/widgets/empty.rs b/podcasts-gtk/src/widgets/empty.rs similarity index 92% rename from hammond-gtk/src/widgets/empty.rs rename to podcasts-gtk/src/widgets/empty.rs index 444de79..9a19e1c 100644 --- a/hammond-gtk/src/widgets/empty.rs +++ b/podcasts-gtk/src/widgets/empty.rs @@ -7,7 +7,7 @@ pub struct EmptyView { impl Default for EmptyView { fn default() -> Self { - let builder = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/empty_view.ui"); + let builder = gtk::Builder::new_from_resource("/org/gnome/Podcasts/gtk/empty_view.ui"); let view: gtk::Box = builder.get_object("empty_view").unwrap(); EmptyView { container: view } diff --git a/hammond-gtk/src/widgets/episode.rs b/podcasts-gtk/src/widgets/episode.rs similarity index 99% rename from hammond-gtk/src/widgets/episode.rs rename to podcasts-gtk/src/widgets/episode.rs index 754ad3e..59be06c 100644 --- a/hammond-gtk/src/widgets/episode.rs +++ b/podcasts-gtk/src/widgets/episode.rs @@ -10,9 +10,9 @@ use humansize::{file_size_opts as size_opts, FileSize}; #[allow(unused_imports)] use open; -use hammond_data::dbqueries; -use hammond_data::utils::get_download_folder; -use hammond_data::EpisodeWidgetModel; +use podcasts_data::dbqueries; +use podcasts_data::utils::get_download_folder; +use podcasts_data::EpisodeWidgetModel; use app::Action; use manager; @@ -160,7 +160,7 @@ impl InfoLabels { impl Default for EpisodeWidget { fn default() -> Self { - let builder = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/episode_widget.ui"); + let builder = gtk::Builder::new_from_resource("/org/gnome/Podcasts/gtk/episode_widget.ui"); let container = builder.get_object("episode_container").unwrap(); let progressbar = builder.get_object("progress_bar").unwrap(); diff --git a/hammond-gtk/src/widgets/home_view.rs b/podcasts-gtk/src/widgets/home_view.rs similarity index 96% rename from hammond-gtk/src/widgets/home_view.rs rename to podcasts-gtk/src/widgets/home_view.rs index b40bb51..d63dc0e 100644 --- a/hammond-gtk/src/widgets/home_view.rs +++ b/podcasts-gtk/src/widgets/home_view.rs @@ -5,8 +5,8 @@ use gtk; use gtk::prelude::*; use crossbeam_channel::Sender; -use hammond_data::dbqueries; -use hammond_data::EpisodeWidgetModel; +use podcasts_data::dbqueries; +use podcasts_data::EpisodeWidgetModel; use send_cell::SendCell; use app::Action; @@ -50,7 +50,7 @@ pub struct HomeView { impl Default for HomeView { fn default() -> Self { - let builder = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/episodes_view.ui"); + let builder = gtk::Builder::new_from_resource("/org/gnome/Podcasts/gtk/episodes_view.ui"); let container: gtk::Box = builder.get_object("container").unwrap(); let scrolled_window: gtk::ScrolledWindow = builder.get_object("scrolled_window").unwrap(); let frame_parent: gtk::Box = builder.get_object("frame_parent").unwrap(); @@ -183,7 +183,7 @@ struct HomeEpisode { impl Default for HomeEpisode { fn default() -> Self { let builder = - gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/episodes_view_widget.ui"); + gtk::Builder::new_from_resource("/org/gnome/Podcasts/gtk/episodes_view_widget.ui"); let container: gtk::Box = builder.get_object("container").unwrap(); let image: gtk::Image = builder.get_object("cover").unwrap(); let ep = EpisodeWidget::default(); @@ -200,7 +200,7 @@ impl Default for HomeEpisode { impl HomeEpisode { fn new(episode: EpisodeWidgetModel, sender: &Sender) -> HomeEpisode { let builder = - gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/episodes_view_widget.ui"); + gtk::Builder::new_from_resource("/org/gnome/Podcasts/gtk/episodes_view_widget.ui"); let container: gtk::Box = builder.get_object("container").unwrap(); let image: gtk::Image = builder.get_object("cover").unwrap(); let pid = episode.show_id(); diff --git a/hammond-gtk/src/widgets/mod.rs b/podcasts-gtk/src/widgets/mod.rs similarity index 100% rename from hammond-gtk/src/widgets/mod.rs rename to podcasts-gtk/src/widgets/mod.rs diff --git a/hammond-gtk/src/widgets/player.rs b/podcasts-gtk/src/widgets/player.rs similarity index 99% rename from hammond-gtk/src/widgets/player.rs rename to podcasts-gtk/src/widgets/player.rs index 817e21b..a5deb43 100644 --- a/hammond-gtk/src/widgets/player.rs +++ b/podcasts-gtk/src/widgets/player.rs @@ -13,8 +13,8 @@ use crossbeam_channel::Sender; use failure::Error; use send_cell::SendCell; -use hammond_data::{dbqueries, USER_AGENT}; -use hammond_data::{EpisodeWidgetModel, ShowCoverModel}; +use podcasts_data::{dbqueries, USER_AGENT}; +use podcasts_data::{EpisodeWidgetModel, ShowCoverModel}; use app::Action; use utils::set_image_from_path; @@ -179,7 +179,7 @@ impl Default for PlayerWidget { config.set_position_update_interval(250); player.set_config(config).unwrap(); - let builder = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/player_toolbar.ui"); + let builder = gtk::Builder::new_from_resource("/org/gnome/Podcasts/gtk/player_toolbar.ui"); let action_bar = builder.get_object("action_bar").unwrap(); let buttons = builder.get_object("buttons").unwrap(); diff --git a/hammond-gtk/src/widgets/show.rs b/podcasts-gtk/src/widgets/show.rs similarity index 97% rename from hammond-gtk/src/widgets/show.rs rename to podcasts-gtk/src/widgets/show.rs index 4fbe6dc..bba8996 100644 --- a/hammond-gtk/src/widgets/show.rs +++ b/podcasts-gtk/src/widgets/show.rs @@ -8,8 +8,8 @@ use html2text; use rayon; use send_cell::SendCell; -use hammond_data::dbqueries; -use hammond_data::Show; +use podcasts_data::dbqueries; +use podcasts_data::Show; use app::Action; use utils::{self, lazy_load}; @@ -35,7 +35,7 @@ pub struct ShowWidget { impl Default for ShowWidget { fn default() -> Self { - let builder = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/show_widget.ui"); + let builder = gtk::Builder::new_from_resource("/org/gnome/Podcasts/gtk/show_widget.ui"); let container: gtk::Box = builder.get_object("container").unwrap(); let scrolled_window: gtk::ScrolledWindow = builder.get_object("scrolled_window").unwrap(); let episodes = builder.get_object("episodes").unwrap(); @@ -151,7 +151,7 @@ fn populate_listbox( })); if count == 0 { - let builder = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/empty_show.ui"); + let builder = gtk::Builder::new_from_resource("/org/gnome/Podcasts/gtk/empty_show.ui"); let container: gtk::Box = builder .get_object("empty_show") .ok_or_else(|| format_err!("FOO"))?; diff --git a/hammond-gtk/src/widgets/show_menu.rs b/podcasts-gtk/src/widgets/show_menu.rs similarity index 97% rename from hammond-gtk/src/widgets/show_menu.rs rename to podcasts-gtk/src/widgets/show_menu.rs index 0c0ae90..87eec4d 100644 --- a/hammond-gtk/src/widgets/show_menu.rs +++ b/podcasts-gtk/src/widgets/show_menu.rs @@ -7,9 +7,9 @@ use failure::Error; use open; use rayon; -use hammond_data::dbqueries; -use hammond_data::utils::delete_show; -use hammond_data::Show; +use podcasts_data::dbqueries; +use podcasts_data::utils::delete_show; +use podcasts_data::Show; use app::Action; use utils; @@ -27,7 +27,7 @@ pub struct ShowMenu { impl Default for ShowMenu { fn default() -> Self { - let builder = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/show_menu.ui"); + let builder = gtk::Builder::new_from_resource("/org/gnome/Podcasts/gtk/show_menu.ui"); let container = builder.get_object("menu").unwrap(); let website = builder.get_object("website").unwrap(); let played = builder.get_object("played").unwrap(); diff --git a/hammond-gtk/src/widgets/shows_view.rs b/podcasts-gtk/src/widgets/shows_view.rs similarity index 97% rename from hammond-gtk/src/widgets/shows_view.rs rename to podcasts-gtk/src/widgets/shows_view.rs index 35f2c51..b19db6e 100644 --- a/hammond-gtk/src/widgets/shows_view.rs +++ b/podcasts-gtk/src/widgets/shows_view.rs @@ -5,8 +5,8 @@ use crossbeam_channel::Sender; use failure::Error; use send_cell::SendCell; -use hammond_data::dbqueries; -use hammond_data::Show; +use podcasts_data::dbqueries; +use podcasts_data::Show; use app::Action; use utils::{self, get_ignored_shows, lazy_load, set_image_from_path}; @@ -29,7 +29,7 @@ pub struct ShowsView { impl Default for ShowsView { fn default() -> Self { - let builder = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/shows_view.ui"); + let builder = gtk::Builder::new_from_resource("/org/gnome/Podcasts/gtk/shows_view.ui"); let container: gtk::Box = builder.get_object("fb_parent").unwrap(); let scrolled_window: gtk::ScrolledWindow = builder.get_object("scrolled_window").unwrap(); let flowbox: gtk::FlowBox = builder.get_object("flowbox").unwrap(); @@ -130,7 +130,7 @@ struct ShowsChild { impl Default for ShowsChild { fn default() -> Self { - let builder = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/shows_child.ui"); + let builder = gtk::Builder::new_from_resource("/org/gnome/Podcasts/gtk/shows_child.ui"); let container: gtk::Box = builder.get_object("fb_child").unwrap(); let cover: gtk::Image = builder.get_object("pd_cover").unwrap(); diff --git a/scripts/cargo.sh b/scripts/cargo.sh index 2f1295b..73c7923 100755 --- a/scripts/cargo.sh +++ b/scripts/cargo.sh @@ -6,8 +6,8 @@ export RUSTFLAGS="--cfg rayon_unstable" if [[ $DEBUG = true ]] then echo "DEBUG MODE" - cargo build -p hammond-gtk && cp $1/target/debug/hammond-gtk $2 + cargo build -p podcasts-gtk && cp $1/target/debug/podcasts-gtk $2 else echo "RELEASE MODE" - cargo build --release -p hammond-gtk && cp $1/target/release/hammond-gtk $2 + cargo build --release -p podcasts-gtk && cp $1/target/release/podcasts-gtk $2 fi \ No newline at end of file diff --git a/scripts/release.sh b/scripts/release.sh index f8ab7cf..351ccc0 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -9,9 +9,9 @@ cd "${MESON_SOURCE_ROOT}" mkdir -p $DIST # copying files -cp -rf hammond-data $DIST -cp -rf hammond-gtk $DIST -cp -rf hammond-downloader $DIST +cp -rf podcasts-data $DIST +cp -rf podcasts-gtk $DIST +cp -rf podcasts-downloader $DIST cp Cargo.toml $DIST cp Cargo.lock $DIST cp configure $DIST