Compare commits
169
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c8cc9e823 | ||
|
|
132c9bbdff | ||
|
|
cc0caff8d0 | ||
|
|
3496df24f8 | ||
|
|
e4e35e4c57 | ||
|
|
838320785e | ||
|
|
91bea85519 | ||
|
|
88ea081661 | ||
|
|
39c0a0dba5 | ||
|
|
9d64d3e30d | ||
|
|
39ff238716 | ||
|
|
7c96152f3f | ||
|
|
a2440c19e1 | ||
|
|
24dff5ce85 | ||
|
|
1ca8e15d19 | ||
|
|
f77a8f09bb | ||
|
|
48a7c8140f | ||
|
|
b03ff46767 | ||
|
|
e66e6364c3 | ||
|
|
89ef7ac4f6 | ||
|
|
27e74ee064 | ||
|
|
83c44aa12c | ||
|
|
17da62d53b | ||
|
|
d43fc268f4 | ||
|
|
5a7ab9795d | ||
|
|
cfcdba5aea | ||
|
|
aaca6a6704 | ||
|
|
5f7c822deb | ||
|
|
53be091a31 | ||
|
|
04c68ba013 | ||
|
|
518ea9c8b5 | ||
|
|
6bb2142f35 | ||
|
|
6aa931c866 | ||
|
|
67ab54f820 | ||
|
|
cc9fc80328 | ||
|
|
3e8a8a6b85 | ||
|
|
70a2d0e5f3 | ||
|
|
09e8d7e1da | ||
|
|
3c3d6c1e7f | ||
|
|
0dcc95cd34 | ||
|
|
edae1b0480 | ||
|
|
5fb2cb7e76 | ||
|
|
403bb71c5d | ||
|
|
9e23b16ae7 | ||
|
|
60a93a2433 | ||
|
|
14dfafcb7c | ||
|
|
dcc06cf8c6 | ||
|
|
54c084040c | ||
|
|
a9c38f5a03 | ||
|
|
bce80cca0b | ||
|
|
f56fac6877 | ||
|
|
ef2286dca4 | ||
|
|
a4a012368e | ||
|
|
1b623ef346 | ||
|
|
f661d24544 | ||
|
|
cfe10553b2 | ||
|
|
cf1042f40d | ||
|
|
e77000076b | ||
|
|
49241664dc | ||
|
|
ffa3e9ec9a | ||
|
|
fbbe0d9ca9 | ||
|
|
001eeecc09 | ||
|
|
454a9c7076 | ||
|
|
fc934ce8e1 | ||
|
|
b9bcc28e0f | ||
|
|
b5ddca65f5 | ||
|
|
536805791e | ||
|
|
5a6c73c4c1 | ||
|
|
d50f5a0488 | ||
|
|
671a31a95a | ||
|
|
5e38f41530 | ||
|
|
7569465a61 | ||
|
|
5913166a13 | ||
|
|
6036562af2 | ||
|
|
39e6c258d5 | ||
|
|
1ab0291483 | ||
|
|
fe024502d4 | ||
|
|
9a76c6428a | ||
|
|
2d4053c792 | ||
|
|
a69254612c | ||
|
|
09a14c1270 | ||
|
|
b343068805 | ||
|
|
ecf50dde2b | ||
|
|
008404ffb3 | ||
|
|
2b6cca6bab | ||
|
|
fe968e19c0 | ||
|
|
479498d8be | ||
|
|
af9669acd0 | ||
|
|
d2eb98f859 | ||
|
|
ae11084f48 | ||
|
|
b02b554105 | ||
|
|
2d66ba918a | ||
|
|
400c0f35f0 | ||
|
|
5b8b265371 | ||
|
|
f3fb27005a | ||
|
|
79bb9bdde8 | ||
|
|
4b983e401d | ||
|
|
5f2f0a9a57 | ||
|
|
8b2ae6d464 | ||
|
|
91aae6a9f5 | ||
|
|
b0fc9ef05e | ||
|
|
5d6fbb6f04 | ||
|
|
301ebdbcd8 | ||
|
|
49bcf46b4f | ||
|
|
f7263c8ab8 | ||
|
|
c69772131a | ||
|
|
e8c025b898 | ||
|
|
8fb5c16bce | ||
|
|
f4551ddf3a | ||
|
|
f337488951 | ||
|
|
f104f11613 | ||
|
|
32e8f952fd | ||
|
|
c7cfc81c6f | ||
|
|
faeafc329c | ||
|
|
eeef0d13ff | ||
|
|
0686fca3b0 | ||
|
|
79b425326b | ||
|
|
2d879b9604 | ||
|
|
38eb14b013 | ||
|
|
ff2f43766e | ||
|
|
593d66ea54 | ||
|
|
ee8cbbf7ef | ||
|
|
474cb49d2c | ||
|
|
590f815dc0 | ||
|
|
a93d5246d2 | ||
|
|
3e2ab8e7ee | ||
|
|
a83270699f | ||
|
|
745afb32a3 | ||
|
|
2fcb8d915d | ||
|
|
a596b62a5f | ||
|
|
55b1504aab | ||
|
|
c42822669b | ||
|
|
b58d28c723 | ||
|
|
a6a34d8246 | ||
|
|
0080399db2 | ||
|
|
50b480ee23 | ||
|
|
da467b7837 | ||
|
|
70914b6c3e | ||
|
|
6c3fbfe0ca | ||
|
|
8e4b705e60 | ||
|
|
48d80d3194 | ||
|
|
38768c777d | ||
|
|
1daa841f31 | ||
|
|
a9f81d0ad3 | ||
|
|
76720424ab | ||
|
|
a7b639a66b | ||
|
|
1b78d221b6 | ||
|
|
ac7b1a3c66 | ||
|
|
039c3182aa | ||
|
|
55d94b1844 | ||
|
|
3baa69b43b | ||
|
|
5f92df97e6 | ||
|
|
47f297c495 | ||
|
|
58f09ba150 | ||
|
|
1142948945 | ||
|
|
9528160b03 | ||
|
|
4afdc54914 | ||
|
|
09973a6a56 | ||
|
|
f56bf3afef | ||
|
|
c4c7bbf46b | ||
|
|
7fdd374911 | ||
|
|
fb9ad9870d | ||
|
|
bbabc6f5e9 | ||
|
|
2060579bb4 | ||
|
|
b0f0940605 | ||
|
|
ee23df176d | ||
|
|
d53865d81b | ||
|
|
7becfd8adb | ||
|
|
a9feed56fe |
+4
-3
@@ -1,9 +1,10 @@
|
||||
target/
|
||||
**/*.rs.bk
|
||||
Cargo.lock
|
||||
.vscode
|
||||
*.ui~
|
||||
resources.gresource
|
||||
_build
|
||||
_build/
|
||||
build/
|
||||
vendor/
|
||||
.criterion
|
||||
.criterion/
|
||||
org.gnome.*.json~
|
||||
|
||||
+18
-18
@@ -4,7 +4,7 @@ stages:
|
||||
- review
|
||||
|
||||
variables:
|
||||
BUNDLE: "hammond-dev.flatpak"
|
||||
BUNDLE: "gnome-podcasts-dev.flatpak"
|
||||
|
||||
.cargo_cache_template: &cargo_cache
|
||||
cache:
|
||||
@@ -25,7 +25,7 @@ variables:
|
||||
|
||||
before_script:
|
||||
- apt-get update -yqq
|
||||
- apt-get install -yqq --no-install-recommends build-essential libgtk-3-dev meson
|
||||
- apt-get install -yqq --no-install-recommends build-essential libgtk-3-dev meson libgstreamer1.0-dev
|
||||
|
||||
- mkdir -p .cargo_cache
|
||||
# Only stuff inside the repo directory can be cached
|
||||
@@ -34,19 +34,19 @@ 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
|
||||
- cargo test -- --test-threads=1 --ignored
|
||||
<<: *cargo_cache
|
||||
|
||||
rust:stable:
|
||||
.rust:stable:
|
||||
# https://hub.docker.com/_/rust/
|
||||
image: "rust"
|
||||
<<: *cargo_test
|
||||
|
||||
rust:nightly:
|
||||
.rust:nightly:
|
||||
# https://hub.docker.com/r/rustlang/rust/
|
||||
image: "rustlang/rust:nightly"
|
||||
<<: *cargo_test
|
||||
@@ -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
|
||||
# https://gitlab.gnome.org/World/hammond/issues/55
|
||||
- flatpak-builder --stop-at=gnome-podcasts app org.gnome.Podcasts.json
|
||||
# https://gitlab.gnome.org/World/podcasts/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:
|
||||
@@ -104,7 +104,7 @@ review:
|
||||
url: https://gitlab.gnome.org/$CI_PROJECT_PATH/-/jobs/$CI_JOB_ID/artifacts/raw/${BUNDLE}
|
||||
on_stop: stop_review
|
||||
except:
|
||||
- master@World/hammond
|
||||
- master@World/podcasts
|
||||
|
||||
stop_review:
|
||||
stage: review
|
||||
@@ -115,7 +115,7 @@ stop_review:
|
||||
name: review/$CI_COMMIT_REF_NAME
|
||||
action: stop
|
||||
except:
|
||||
- master@World/hammond
|
||||
- master@World/podcasts
|
||||
|
||||
# Configure and run rustfmt on nightly
|
||||
# Exits and builds fails if on bad format
|
||||
@@ -129,7 +129,7 @@ rustfmt:
|
||||
|
||||
# Configure and run clippy on nightly
|
||||
# Only fails on errors atm.
|
||||
clippy:
|
||||
.clippy:
|
||||
image: "registry.gitlab.gnome.org/alatiera/hammond-container-images/clippy:nightly"
|
||||
stage: lint
|
||||
variables:
|
||||
@@ -139,6 +139,6 @@ clippy:
|
||||
- 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
|
||||
|
||||
@@ -18,7 +18,7 @@ Some common cases might be:
|
||||
|
||||
Steps to reproduce:
|
||||
|
||||
1. Open Hammond
|
||||
1. Open GNOME Podcasts
|
||||
2. Do an action
|
||||
3. ...
|
||||
|
||||
|
||||
@@ -1,9 +1,42 @@
|
||||
Detailed description of the issue. Put as much information as you can, potentially
|
||||
with images showing the issue.
|
||||
# Steps to reproduce
|
||||
<!--
|
||||
Explain in detail the steps on how the issue can be reproduced.
|
||||
-->
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
Steps to reproduce:
|
||||
Reproducible in:
|
||||
<!--
|
||||
Please test if the issue was already fixed in the unstable version of the app.
|
||||
For that, follow these steps:
|
||||
1. Make sure Flatpak is installed or install it following these steps https://flatpak.org/setup
|
||||
2. Install the unstable version of the app following this link
|
||||
https://gitlab.gnome.org/GNOME/gnome-apps-nightly/raw/master/nautilus.flatpakref and save
|
||||
it as a ".flatpakref" file
|
||||
|
||||
1. Open Hammond
|
||||
2. Do an action
|
||||
3. ...
|
||||
If these steps failed, write in 'Other' the distribution you’re using and
|
||||
the version of the app.
|
||||
-->
|
||||
- Flatpak unstable: (yes or no) <!-- Write "yes" or "no" after the semicolon. -->
|
||||
- Other:
|
||||
|
||||
# Current behavior
|
||||
<!-- Describe the current behavior. -->
|
||||
|
||||
|
||||
# Expected behavior
|
||||
<!-- Describe the expected behavior. -->
|
||||
|
||||
|
||||
# Additional information
|
||||
<!--
|
||||
Provide more information that could be relevant.
|
||||
|
||||
If the issue is a crash, provide a stack trace following the steps in:
|
||||
https://wiki.gnome.org/Community/GettingInTouch/Bugzilla/GettingTraces
|
||||
-->
|
||||
|
||||
|
||||
<!-- Ignore the text under this line. -->
|
||||
/label ~"Bug"
|
||||
|
||||
@@ -1,42 +1,41 @@
|
||||
Current problems
|
||||
<!--
|
||||
What are the problems that the current project has?
|
||||
# Current problems
|
||||
<!--
|
||||
What are the problems that the current project has?
|
||||
|
||||
For example:
|
||||
* User cannot use the keyboard to perform most common actions
|
||||
or
|
||||
* User cannot see documents from cloud services
|
||||
-->
|
||||
For example:
|
||||
* User cannot use the keyboard to perform most common actions
|
||||
or
|
||||
* User cannot see documents from cloud services
|
||||
-->
|
||||
|
||||
# Goals & use cases
|
||||
<!--
|
||||
What are the use cases that this proposal will cover? What are the end goals?
|
||||
# Goals & use cases
|
||||
<!--
|
||||
What are the use cases that this proposal will cover? What are the end goals?
|
||||
|
||||
For example:
|
||||
* User needs to share a file with their friends.
|
||||
or
|
||||
* It should be easy to edit a picture within the app.
|
||||
-->
|
||||
For example:
|
||||
* User needs to share a file with their friends.
|
||||
or
|
||||
* It should be easy to edit a picture within the app.
|
||||
-->
|
||||
|
||||
# Requirements
|
||||
<!--
|
||||
What does the solution needs to ensure for being succesful?
|
||||
# Requirements
|
||||
<!--
|
||||
What does the solution needs to ensure for being succesful?
|
||||
|
||||
For example:
|
||||
* Work on small form factors and touch
|
||||
or
|
||||
* Use the Meson build system and integrate with it
|
||||
-->
|
||||
For example:
|
||||
* Work on small form factors and touch
|
||||
or
|
||||
* Use the Meson build system and integrate with it
|
||||
-->
|
||||
|
||||
# Relevant art
|
||||
<!--
|
||||
Is there any product that has implemented something similar? Put links to other
|
||||
projects, pictures, links to other code, etc.
|
||||
-->
|
||||
# Relevant art
|
||||
<!--
|
||||
Is there any product that has implemented something similar? Put links to other
|
||||
projects, pictures, links to other code, etc.
|
||||
-->
|
||||
|
||||
# Proposal & plan
|
||||
<!-- What's the solution and how should be achieved? It can be split in smaller
|
||||
tasks of minimum change, so they can be delivered across several releases. -->
|
||||
|
||||
/label ~"Epic"
|
||||
# Proposal & plan
|
||||
<!-- What's the solution and how should be achieved? It can be split in smaller
|
||||
tasks of minimum change, so they can be delivered across several releases. -->
|
||||
|
||||
/label ~"Epic"
|
||||
@@ -1,17 +1,24 @@
|
||||
Detailed description of the feature. Put as much information as you can.
|
||||
### Use cases
|
||||
<!--
|
||||
Describe what problem(s) the user is experiencing and that this request
|
||||
is trying to solve.
|
||||
-->
|
||||
|
||||
Proposed Mockups:
|
||||
|
||||
(Add mockups of the proposed feature)
|
||||
### Desired behavior
|
||||
<!-- Describe the desired functionality. -->
|
||||
|
||||
## Design Tasks
|
||||
|
||||
* [ ] design tasks
|
||||
### Benefits of the solution
|
||||
<!-- List the possible benefits of the solution and how it fits in the project. -->
|
||||
|
||||
## Development Tasks
|
||||
|
||||
* [ ] development tasks
|
||||
### Possible drawbacks
|
||||
<!--
|
||||
Describe possible drawbacks of the feature and list how it could affect
|
||||
the project i.e. UI discoverability, complexity, impact in more or less
|
||||
number of users, etc.
|
||||
-->
|
||||
|
||||
## QA Tasks
|
||||
|
||||
* [ ] qa (quality assurance) tasks
|
||||
<!-- Ignore the text under this line. -->
|
||||
/label ~"Feature"
|
||||
|
||||
+81
-17
@@ -6,18 +6,82 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
|
||||
## [Unreleased]
|
||||
### Added:
|
||||
- Keyboard Shortcuts and a Shortcuts dialog were implemented. (ZanderBrown) [!33](https://gitlab.gnome.org/World/hammond/merge_requests/33)
|
||||
|
||||
### Changed:
|
||||
- The `FileChooser` of the OPML import was changed to use the `FileChooserNative` widget/API. (ZanderBrown) [!33](https://gitlab.gnome.org/World/hammond/merge_requests/33)
|
||||
- The `EpisdeWidget` was refactored. [!38](https://gitlab.gnome.org/World/hammond/merge_requests/38)
|
||||
- `EpisdeWidget`'s progressbar was changed to be non-blocking and should feel way more responsive now. 9b0ac5b83dadecdff51cd398293afdf0d5276012
|
||||
|
||||
### Fixed:
|
||||
- Fixed a bug whre the about dialog would be unclosable. (ZanderBrown) [!37](https://gitlab.gnome.org/World/hammond/merge_requests/37)
|
||||
|
||||
### Removed:
|
||||
|
||||
|
||||
## [0.4.4] - 2018-07-31
|
||||
|
||||
### Changed:
|
||||
- `SendCell` crate was replaced with `Fragile`. (Jorda Petridis) 838320785ebbea94e009698b473495cfec076f54
|
||||
- Update dependancies (Jorda Petridis) 91bea8551998b16e44e5358fdd43c53422bcc6f3
|
||||
|
||||
### Fixed:
|
||||
- Fix more refference cycles. (Jorda Petridis) 3496df24f8d8bfa8c8a53d8f00262d42ee39b41c
|
||||
- Actually fix cargo-vendor (Jorda Petridis)
|
||||
|
||||
## [0.4.3] - 2018-07-27
|
||||
|
||||
### Fixed:
|
||||
|
||||
- Fix the cargo vendor config for the tarball releash script. (Jorda Petridis) a2440c19e11ca4dcdbcb67cd85259a41fe3754d6
|
||||
|
||||
## [0.4.2] - 2018-07-27
|
||||
|
||||
### Changed:
|
||||
|
||||
- Minimum size requested by the Views. (Jorda Petridis) 7c96152f3f53f271247230dccf1c9cd5947b685f
|
||||
|
||||
### Fixed:
|
||||
|
||||
- Screenshot metadata in appstream data. (Jorda Petridis) a2440c19e11ca4dcdbcb67cd85259a41fe3754d6
|
||||
|
||||
## [0.4.1] - 2018-07-26
|
||||
### Added:
|
||||
|
||||
- Custom icons for the fast-forward and rewind actions in the Player were added. (Tobias Bernard) e77000076b3d78b8625f4c7ef367376d0130ece6
|
||||
- Hicolor and symbolic icons for the Application. (Tobias Bernard and Sam Hewitt) edae1b04801dba9d91d5d4145db79b287f0eec2c
|
||||
- Basic prefferences dialog (Zander Brown). [34](https://gitlab.gnome.org/World/podcasts/merge_requests/34)
|
||||
- Dbus service preperation. Not used till the MPRIS2 integration has landed. (Zander Brown) [42](https://gitlab.gnome.org/World/podcasts/merge_requests/42)
|
||||
- Episodes and Images will only get drawn when needed. Big Performance impact. (Jordan Petridis) [43](https://gitlab.gnome.org/World/podcasts/merge_requests/43)
|
||||
|
||||
### Changed:
|
||||
|
||||
- The `ShowWidget` control button were moved to a secondary menu in the Headerbar. (Jordan Petridis) 536805791e336a3e112799be554706bb804d2bef
|
||||
- EmptyView layout improvements. (Jorda Petridis) 3c3d6c1e7f15b88308a9054b15a6ca0d8fa233ce 518ea9c8b57885c44bda9c418b19fef26ae0e55d
|
||||
- Improved the `AddButton` behavior. (Jorda Petridis) 67ab54f8203f19aad198dc49e935127d25432b41
|
||||
|
||||
### Fixed:
|
||||
|
||||
- A couple reffence cycles where fixed. (Jorda Petridis)
|
||||
|
||||
### Removed:
|
||||
|
||||
- The delay between the application startup and the `update_on_startup` action. (Jorda Petridis) 7569465a612ee5ef84d0e58f4e1010c8d14080d4
|
||||
|
||||
## [0.4.0] - 2018-07-04
|
||||
### Added:
|
||||
- Keyboard Shortcuts and a Shortcuts dialog were implemented. (ZanderBrown)
|
||||
[!33](https://gitlab.gnome.org/World/podcasts/merge_requests/33)
|
||||
|
||||
### Changed:
|
||||
- The `FileChooser` of the OPML import was changed to use the `FileChooserNative` widget/API. (ZanderBrown)
|
||||
[!33](https://gitlab.gnome.org/World/podcasts/merge_requests/33)
|
||||
- The `EpisdeWidget` was refactored.
|
||||
[!38](https://gitlab.gnome.org/World/podcasts/merge_requests/38)
|
||||
- `EpisdeWidget`'s progressbar was changed to be non-blocking and should feel way more responsive now. 9b0ac5b83dadecdff51cd398293afdf0d5276012
|
||||
- An embeded audio player was implemented!
|
||||
[!40](https://gitlab.gnome.org/World/podcasts/merge_requests/40)
|
||||
- Various Database changes.
|
||||
[!41](https://gitlab.gnome.org/World/podcasts/merge_requests/41)
|
||||
|
||||
### Fixed:
|
||||
- Fixed a bug whre the about dialog would be unclosable. (ZanderBrown) [!37](https://gitlab.gnome.org/World/podcasts/merge_requests/37)
|
||||
|
||||
## [0.3.4] - 2018-05-20
|
||||
### Fixed:
|
||||
- Flatpak can now access the Home folder. This fixes the OPML import feature from
|
||||
@@ -42,9 +106,9 @@ not being able to access any file.
|
||||
|
||||
### Changed:
|
||||
- Downlaoding and loading images now is done asynchronously and is not blocking programs execution.
|
||||
[#7](https://gitlab.gnome.org/World/hammond/issues/7)
|
||||
[#7](https://gitlab.gnome.org/World/podcasts/issues/7)
|
||||
- Bold, italics links and some other `html` tags can now be rendered in the Show Description.
|
||||
[#25](https://gitlab.gnome.org/World/hammond/issues/25)
|
||||
[#25](https://gitlab.gnome.org/World/podcasts/issues/25)
|
||||
- `Rayon` Threadpools are now used instead of unlimited one-off threads.
|
||||
- `EpisdeWidget`s are now loaded asynchronously accross views.
|
||||
- `EpisodeWidget`s no longer trigger a `View` refresh for trivial stuff 03bd95184808ccab3e0ea0e3713a52ee6b7c9ab4
|
||||
@@ -52,7 +116,7 @@ not being able to access any file.
|
||||
- `ShowWidget` Description is inside a scrolled window now
|
||||
|
||||
### Fixed:
|
||||
- `EpisodeWidget` Height now is consistent accros views [#57](https://gitlab.gnome.org/World/hammond/issues/57)
|
||||
- `EpisodeWidget` Height now is consistent accros views [#57](https://gitlab.gnome.org/World/podcasts/issues/57)
|
||||
- Implemented a tail-recursion loop to follow-up when a feed redirects to another url. c6a24e839a8ba77d09673f299cfc1e64ba7078f3
|
||||
|
||||
### Removed:
|
||||
@@ -61,27 +125,27 @@ not being able to access any file.
|
||||
## [0.3.1] - 2018-03-28
|
||||
### Added:
|
||||
- Ability to mark all episodes of a Show as watched.
|
||||
[#47](https://gitlab.gnome.org/World/hammond/issues/47)
|
||||
[#47](https://gitlab.gnome.org/World/podcasts/issues/47)
|
||||
- Now you are able to subscribe to itunes™ podcasts by using the itunes link of the show.
|
||||
[#49](https://gitlab.gnome.org/World/hammond/issues/49)
|
||||
[#49](https://gitlab.gnome.org/World/podcasts/issues/49)
|
||||
- Hammond now remembers the window size and position. (Rowan Lewis)
|
||||
[#50](https://gitlab.gnome.org/World/hammond/issues/50)
|
||||
[#50](https://gitlab.gnome.org/World/podcasts/issues/50)
|
||||
- Implemnted the initial work for integrating with GSettings and storing preferences. (Rowan Lewis)
|
||||
[!22](https://gitlab.gnome.org/World/hammond/merge_requests/22) [!23](https://gitlab.gnome.org/World/hammond/merge_requests/23)
|
||||
[!22](https://gitlab.gnome.org/World/podcasts/merge_requests/22) [!23](https://gitlab.gnome.org/World/podcasts/merge_requests/23)
|
||||
- Shows without episodes now display an empty message similar to EmptyView.
|
||||
[#44](https://gitlab.gnome.org/World/hammond/issues/44)
|
||||
[#44](https://gitlab.gnome.org/World/podcasts/issues/44)
|
||||
|
||||
### Changed:
|
||||
- EpisdeWidget has been reimplemented as a compile time state machine.
|
||||
[!18](https://gitlab.gnome.org/World/hammond/merge_requests/18)
|
||||
[!18](https://gitlab.gnome.org/World/podcasts/merge_requests/18)
|
||||
- Content Views no longer scroll horizontally when shrunk bellow their minimum size.
|
||||
[#35](https://gitlab.gnome.org/World/hammond/issues/35)
|
||||
[#35](https://gitlab.gnome.org/World/podcasts/issues/35)
|
||||
- Some requests now use the Tor Browser's user agent. (Rowan Lewis)
|
||||
[#53](https://gitlab.gnome.org/World/hammond/issues/53)
|
||||
[#53](https://gitlab.gnome.org/World/podcasts/issues/53)
|
||||
|
||||
### Fixed:
|
||||
- Double border aroun the main window was fixed. (Rowan Lewis)
|
||||
[#52](https://gitlab.gnome.org/World/hammond/issues/52)
|
||||
[#52](https://gitlab.gnome.org/World/podcasts/issues/52)
|
||||
|
||||
## [0.3.0] - 2018-02-11
|
||||
- Tobias Bernard Redesigned the whole Gtk+ client.
|
||||
|
||||
+8
-8
@@ -1,18 +1,18 @@
|
||||
## 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
|
||||
the web interface [here](https://gitlab.gnome.org/World/hammond)
|
||||
GNOME Podcasts's main source repository is at gitlab.gnome.org. You can view
|
||||
the web interface [here](https://gitlab.gnome.org/World/podcasts)
|
||||
|
||||
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/podcasts/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. ...
|
||||
|
||||
|
||||
Generated
+848
-542
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -1,8 +1,8 @@
|
||||
[workspace]
|
||||
members = [
|
||||
"hammond-data",
|
||||
"hammond-downloader",
|
||||
"hammond-gtk"
|
||||
"podcasts-data",
|
||||
"podcasts-downloader",
|
||||
"podcasts-gtk"
|
||||
]
|
||||
|
||||
[profile.release]
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
# Hammond
|
||||
# GNOME Podcasts
|
||||
|
||||
### A Podcast Client for GNOME written in Rust.
|
||||
### A Podcast application for GNOME.
|
||||
Listen to your favorite podcasts, right from your desktop.
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## 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?
|
||||
Please [open an issue](https://gitlab.gnome.org/World/hammond/issues/new) and choose the `BrokenFeed` template so we will know and fix it!
|
||||
Found a feed that does not work in GNOME Podcasts?
|
||||
Please [open an issue](https://gitlab.gnome.org/World/podcasts/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 +32,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 +47,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/
|
||||
git clone https://gitlab.gnome.org/World/podcasts.git
|
||||
cd gnome-podcasts/
|
||||
meson --prefix=/usr build
|
||||
ninja -C build
|
||||
sudo ninja -C build install
|
||||
@@ -68,8 +69,9 @@ sudo ninja -C build install
|
||||
|
||||
#### Dependencies
|
||||
|
||||
* Rust stable 1.26 or later along with cargo.
|
||||
* Rust stable 1.27 or later along with cargo.
|
||||
* Gtk+ 3.22 or later
|
||||
* Gstreamer 1.12 or later
|
||||
* Meson
|
||||
* A network connection
|
||||
|
||||
@@ -78,15 +80,23 @@ Offline build are possible too, but [`cargo-vendor`][vendor] would have to be se
|
||||
**Debian/Ubuntu**
|
||||
|
||||
```sh
|
||||
apt-get update -yqq
|
||||
apt-get install -yqq --no-install-recommends build-essential
|
||||
apt-get install -yqq --no-install-recommends rustc cargo libgtk-3-dev meson
|
||||
apt-get install -yqq cargo rustc libsqlite3-dev libssl-dev libgtk-3-dev meson \
|
||||
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
|
||||
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
|
||||
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
|
||||
gstreamer1.0-libav libgstrtspserver-1.0-dev ibgstreamer-plugins-bad1.0-dev
|
||||
```
|
||||
|
||||
**Fedora**
|
||||
|
||||
```sh
|
||||
dnf install -y rust cargo gtk3-devel glib2-devel openssl-devel sqlite-devel meson
|
||||
dnf install -y rust cargo gtk3-devel glib2-devel openssl-devel sqlite-devel meson \
|
||||
gstreamer1-devel gstreamer1-plugins-base-tools gstreamer1-devel-docs \
|
||||
gstreamer1-plugins-base-devel gstreamer1-plugins-base-devel-docs \
|
||||
gstreamer1-plugins-good gstreamer1-plugins-good-extras \
|
||||
gstreamer1-plugins-bad-free gstreamer1-plugins-bad-free-devel \
|
||||
gstreamer1-plugins-bad-free-extras
|
||||
|
||||
```
|
||||
|
||||
If you happen to build it on other distributions please let me know the names
|
||||
@@ -98,11 +108,11 @@ There alot of thins yet to be done.
|
||||
|
||||
If you want to contribute, please check the [Contributions Guidelines][contribution-guidelines].
|
||||
|
||||
You can start by taking a look at [Issues](https://gitlab.gnome.org/World/hammond/issues) or by opening a [New issue](https://gitlab.gnome.org/World/hammond/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=).
|
||||
You can start by taking a look at [Issues](https://gitlab.gnome.org/World/podcasts/issues) or by opening a [New issue](https://gitlab.gnome.org/World/podcasts/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=).
|
||||
|
||||
There are also some minor tasks tagged with `TODO:` and `FIXME:` in the source code.
|
||||
|
||||
[contribution-guidelines]: https://gitlab.gnome.org/World/hammond/blob/master/CONTRIBUTING.md
|
||||
[contribution-guidelines]: https://gitlab.gnome.org/World/podcasts/blob/master/CONTRIBUTING.md
|
||||
|
||||
|
||||
## Overview
|
||||
@@ -110,15 +120,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
|
||||
@@ -128,13 +138,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).
|
||||
|
||||
@@ -142,4 +151,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
|
||||
[matrix]: https://matrix.to/#/#gnome-podcasts:matrix.org
|
||||
@@ -1,117 +0,0 @@
|
||||
#![recursion_limit = "1024"]
|
||||
#![allow(unknown_lints)]
|
||||
#![cfg_attr(all(test, feature = "clippy"), allow(option_unwrap_used, result_unwrap_used))]
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(option_map_unit_fn))]
|
||||
#![cfg_attr(
|
||||
feature = "clippy",
|
||||
warn(
|
||||
option_unwrap_used, result_unwrap_used, print_stdout, wrong_pub_self_convention, mut_mut,
|
||||
non_ascii_literal, similar_names, unicode_not_nfc, enum_glob_use, if_not_else,
|
||||
items_after_statements, used_underscore_binding
|
||||
)
|
||||
)]
|
||||
#![warn(
|
||||
bad_style, const_err, dead_code, improper_ctypes, legacy_directory_ownership,
|
||||
non_shorthand_field_patterns, no_mangle_generic_items, overflowing_literals, path_statements,
|
||||
patterns_in_fns_without_body, plugin_as_library, private_in_public, private_no_mangle_fns,
|
||||
private_no_mangle_statics, safe_extern_statics, unconditional_recursion,
|
||||
unions_with_drop_fields, unused_allocation, unused_comparisons, unused_parens, while_true,
|
||||
missing_debug_implementations, missing_docs, trivial_casts, trivial_numeric_casts,
|
||||
unused_extern_crates, unused
|
||||
)]
|
||||
#![deny(warnings)]
|
||||
|
||||
//! FIXME: Docs
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate pretty_assertions;
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate maplit;
|
||||
|
||||
#[macro_use]
|
||||
extern crate derive_builder;
|
||||
#[macro_use]
|
||||
extern crate diesel;
|
||||
#[macro_use]
|
||||
extern crate diesel_migrations;
|
||||
// #[macro_use]
|
||||
extern crate failure;
|
||||
#[macro_use]
|
||||
extern crate failure_derive;
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
extern crate ammonia;
|
||||
extern crate chrono;
|
||||
extern crate futures;
|
||||
extern crate hyper;
|
||||
extern crate hyper_tls;
|
||||
extern crate native_tls;
|
||||
extern crate num_cpus;
|
||||
extern crate rayon;
|
||||
extern crate rayon_futures;
|
||||
extern crate rfc822_sanitizer;
|
||||
extern crate rss;
|
||||
extern crate tokio_core;
|
||||
extern crate url;
|
||||
extern crate xdg;
|
||||
extern crate xml;
|
||||
|
||||
pub mod database;
|
||||
#[allow(missing_docs)]
|
||||
pub mod dbqueries;
|
||||
#[allow(missing_docs)]
|
||||
pub mod errors;
|
||||
mod feed;
|
||||
pub(crate) mod models;
|
||||
pub mod opml;
|
||||
mod parser;
|
||||
pub mod pipeline;
|
||||
mod schema;
|
||||
pub mod utils;
|
||||
|
||||
pub use feed::{Feed, FeedBuilder};
|
||||
pub use models::Save;
|
||||
pub use models::{Episode, EpisodeWidgetQuery, Podcast, PodcastCoverQuery, Source};
|
||||
|
||||
// Set the user agent, See #53 for more
|
||||
// Keep this in sync with Tor-browser releases
|
||||
const USER_AGENT: &str = "Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0";
|
||||
|
||||
/// [XDG Base Direcotory](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) Paths.
|
||||
#[allow(missing_debug_implementations)]
|
||||
pub mod xdg_dirs {
|
||||
use std::path::PathBuf;
|
||||
use xdg;
|
||||
|
||||
lazy_static!{
|
||||
pub(crate) static ref HAMMOND_XDG: xdg::BaseDirectories = {
|
||||
xdg::BaseDirectories::with_prefix("hammond").unwrap()
|
||||
};
|
||||
|
||||
/// XDG_DATA Directory `Pathbuf`.
|
||||
pub static ref HAMMOND_DATA: PathBuf = {
|
||||
HAMMOND_XDG.create_data_directory(HAMMOND_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()
|
||||
};
|
||||
|
||||
/// XDG_CACHE Directory `Pathbuf`.
|
||||
pub static ref HAMMOND_CACHE: PathBuf = {
|
||||
HAMMOND_XDG.create_cache_directory(HAMMOND_XDG.get_cache_home()).unwrap()
|
||||
};
|
||||
|
||||
/// Hammond Download Direcotry `PathBuf`.
|
||||
pub static ref DL_DIR: PathBuf = {
|
||||
HAMMOND_XDG.create_data_directory("Downloads").unwrap()
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
use diesel::SaveChangesDsl;
|
||||
|
||||
use database::connection;
|
||||
use errors::DataError;
|
||||
use models::{Save, Source};
|
||||
use schema::podcast;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
#[derive(Queryable, Identifiable, AsChangeset, Associations, PartialEq)]
|
||||
#[belongs_to(Source, foreign_key = "source_id")]
|
||||
#[changeset_options(treat_none_as_null = "true")]
|
||||
#[table_name = "podcast"]
|
||||
#[derive(Debug, Clone)]
|
||||
/// Diesel Model of the podcast table.
|
||||
pub struct Podcast {
|
||||
id: i32,
|
||||
title: String,
|
||||
link: String,
|
||||
description: String,
|
||||
image_uri: Option<String>,
|
||||
favorite: bool,
|
||||
archive: bool,
|
||||
always_dl: bool,
|
||||
source_id: i32,
|
||||
}
|
||||
|
||||
impl Save<Podcast> for Podcast {
|
||||
type Error = DataError;
|
||||
|
||||
/// Helper method to easily save/"sync" current state of self to the
|
||||
/// Database.
|
||||
fn save(&self) -> Result<Podcast, Self::Error> {
|
||||
let db = connection();
|
||||
let tempdb = db.get()?;
|
||||
|
||||
self.save_changes::<Podcast>(&*tempdb).map_err(From::from)
|
||||
}
|
||||
}
|
||||
|
||||
impl Podcast {
|
||||
/// Get the Feed `id`.
|
||||
pub fn id(&self) -> i32 {
|
||||
self.id
|
||||
}
|
||||
|
||||
/// Get the Feed `title`.
|
||||
pub fn title(&self) -> &str {
|
||||
&self.title
|
||||
}
|
||||
|
||||
/// Get the Feed `link`.
|
||||
///
|
||||
/// Usually the website/homepage of the content creator.
|
||||
pub fn link(&self) -> &str {
|
||||
&self.link
|
||||
}
|
||||
|
||||
/// Set the Podcast/Feed `link`.
|
||||
pub fn set_link(&mut self, value: &str) {
|
||||
self.link = value.to_string();
|
||||
}
|
||||
|
||||
/// Get the `description`.
|
||||
pub fn description(&self) -> &str {
|
||||
&self.description
|
||||
}
|
||||
|
||||
/// Set the `description`.
|
||||
pub fn set_description(&mut self, value: &str) {
|
||||
self.description = value.to_string();
|
||||
}
|
||||
|
||||
/// Get the `image_uri`.
|
||||
///
|
||||
/// Represents the uri(url usually) that the Feed cover image is located at.
|
||||
pub fn image_uri(&self) -> Option<&str> {
|
||||
self.image_uri.as_ref().map(|s| s.as_str())
|
||||
}
|
||||
|
||||
/// Set the `image_uri`.
|
||||
pub fn set_image_uri(&mut self, value: Option<&str>) {
|
||||
self.image_uri = value.map(|x| x.to_string());
|
||||
}
|
||||
|
||||
/// Represents the archiving policy for the episode.
|
||||
pub fn archive(&self) -> bool {
|
||||
self.archive
|
||||
}
|
||||
|
||||
/// Set the `archive` policy.
|
||||
pub fn set_archive(&mut self, b: bool) {
|
||||
self.archive = b
|
||||
}
|
||||
|
||||
/// Get the `favorite` status of the `Podcast` Feed.
|
||||
pub fn favorite(&self) -> bool {
|
||||
self.favorite
|
||||
}
|
||||
|
||||
/// Set `favorite` status.
|
||||
pub fn set_favorite(&mut self, b: bool) {
|
||||
self.favorite = b
|
||||
}
|
||||
|
||||
/// Represents the download policy for the `Podcast` Feed.
|
||||
///
|
||||
/// Reserved for the use with a Download manager, yet to be implemented.
|
||||
///
|
||||
/// If true Podcast Episode should be downloaded automaticly/skipping
|
||||
/// the selection queue.
|
||||
pub fn always_download(&self) -> bool {
|
||||
self.always_dl
|
||||
}
|
||||
|
||||
/// Set the download policy.
|
||||
pub fn set_always_download(&mut self, b: bool) {
|
||||
self.always_dl = b
|
||||
}
|
||||
|
||||
/// `Source` table foreign key.
|
||||
pub fn source_id(&self) -> i32 {
|
||||
self.source_id
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Queryable, Debug, Clone)]
|
||||
/// Diesel Model of the podcast cover query.
|
||||
/// Used for fetching information about a Podcast's cover.
|
||||
pub struct PodcastCoverQuery {
|
||||
id: i32,
|
||||
title: String,
|
||||
image_uri: Option<String>,
|
||||
}
|
||||
|
||||
impl From<Podcast> for PodcastCoverQuery {
|
||||
fn from(p: Podcast) -> PodcastCoverQuery {
|
||||
PodcastCoverQuery {
|
||||
id: p.id(),
|
||||
title: p.title,
|
||||
image_uri: p.image_uri,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Arc<Podcast>> for PodcastCoverQuery {
|
||||
fn from(p: Arc<Podcast>) -> PodcastCoverQuery {
|
||||
PodcastCoverQuery {
|
||||
id: p.id(),
|
||||
title: p.title.clone(),
|
||||
image_uri: p.image_uri.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl PodcastCoverQuery {
|
||||
/// Get the Feed `id`.
|
||||
pub fn id(&self) -> i32 {
|
||||
self.id
|
||||
}
|
||||
|
||||
/// Get the Feed `title`.
|
||||
pub fn title(&self) -> &str {
|
||||
&self.title
|
||||
}
|
||||
|
||||
/// Get the `image_uri`.
|
||||
///
|
||||
/// Represents the uri(url usually) that the Feed cover image is located at.
|
||||
pub fn image_uri(&self) -> Option<&str> {
|
||||
self.image_uri.as_ref().map(|s| s.as_str())
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
#![recursion_limit = "1024"]
|
||||
#![warn(unused_extern_crates, unused)]
|
||||
#![allow(unknown_lints)]
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(blacklisted_name, option_map_unit_fn))]
|
||||
#![deny(warnings)]
|
||||
|
||||
extern crate failure;
|
||||
#[macro_use]
|
||||
extern crate failure_derive;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate pretty_assertions;
|
||||
|
||||
extern crate glob;
|
||||
extern crate hammond_data;
|
||||
extern crate hyper;
|
||||
extern crate mime_guess;
|
||||
extern crate reqwest;
|
||||
extern crate tempdir;
|
||||
|
||||
pub mod downloader;
|
||||
pub mod errors;
|
||||
@@ -1,44 +0,0 @@
|
||||
[package]
|
||||
authors = ["Jordan Petridis <jordanpetridis@protonmail.com>"]
|
||||
build = "build.rs"
|
||||
name = "hammond-gtk"
|
||||
version = "0.1.0"
|
||||
workspace = "../"
|
||||
|
||||
[dependencies]
|
||||
chrono = "0.4.2"
|
||||
crossbeam-channel = "0.1.2"
|
||||
gdk = "0.8.0"
|
||||
gdk-pixbuf = "0.4.0"
|
||||
glib = "0.5.0"
|
||||
humansize = "1.1.0"
|
||||
lazy_static = "1.0.0"
|
||||
log = "0.4.1"
|
||||
loggerv = "0.7.1"
|
||||
open = "1.2.1"
|
||||
rayon = "1.0.1"
|
||||
send-cell = "0.1.3"
|
||||
url = "1.7.0"
|
||||
failure = "0.1.1"
|
||||
failure_derive = "0.1.1"
|
||||
regex = "1.0.0"
|
||||
reqwest = "0.8.5"
|
||||
serde_json = "1.0.17"
|
||||
html2pango = { git = "https://gitlab.gnome.org/World/html2pango" }
|
||||
|
||||
[dependencies.gtk]
|
||||
features = ["v3_22"]
|
||||
version = "0.4.1"
|
||||
|
||||
[dependencies.gio]
|
||||
features = ["v2_50"]
|
||||
version = "0.4.0"
|
||||
|
||||
[dependencies.hammond-data]
|
||||
path = "../hammond-data"
|
||||
|
||||
[dependencies.hammond-downloader]
|
||||
path = "../hammond-downloader"
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_assertions = "0.5.1"
|
||||
@@ -1,91 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.21.0
|
||||
|
||||
Copyright (C) 2017 - 2018
|
||||
|
||||
This file is part of Hammond.
|
||||
|
||||
Hammond is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Hammond is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Hammond. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Authors:
|
||||
Jordan Petridis
|
||||
Tobias Bernard
|
||||
|
||||
-->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<!-- interface-license-type gplv3 -->
|
||||
<!-- interface-name Hammond -->
|
||||
<!-- interface-description A podcast client for the GNOME Desktop -->
|
||||
<!-- interface-copyright 2017 - 2018 -->
|
||||
<!-- interface-authors Jordan Petridis\nTobias Bernard -->
|
||||
<object class="GtkBox" id="empty_view">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="pixel_size">128</property>
|
||||
<property name="icon_name">application-rss+xml-symbolic</property>
|
||||
<property name="use_fallback">True</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">No Feed Subscription Found</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="scale" value="1.4399999999999999"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">You can subscribe to feeds using the "+" button</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -1,6 +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'))
|
||||
meson.add_install_script('../../scripts/compile-gschema.py')
|
||||
@@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop">
|
||||
<id>org.gnome.Hammond</id>
|
||||
<name>Hammond</name>
|
||||
<project_license>GPL-3.0</project_license>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<developer_name>Jordan Petridis</developer_name>
|
||||
<summary>Modern Podcast Client for the GNOME desktop</summary>
|
||||
<description xml:lang="en">
|
||||
<p>
|
||||
Hammond is a modern, reliable, and fast Podcast Client for the GNOME
|
||||
desktop written in Rust.
|
||||
</p>
|
||||
</description>
|
||||
<url type="homepage">https://gitlab.gnome.org/World/hammond</url>
|
||||
<screenshots>
|
||||
<screenshot>
|
||||
<image>https://gitlab.gnome.org/World/hammond/raw/master/screenshots/episodes_view.png</image>
|
||||
<caption>Page 1</caption>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image>https://gitlab.gnome.org/World/hammond/raw/master/screenshots/shows_view.png</image>
|
||||
<caption>Page 2</caption>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image>https://gitlab.gnome.org/World/hammond/raw/master/screenshots/show_widget.png</image>
|
||||
<caption>Page 3</caption>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<releases>
|
||||
<release version="0.3.4" date="2018-05-20"/>
|
||||
</releases>
|
||||
<url type="homepage">https://gitlab.gnome.org/World/hammond</url>
|
||||
<update_contact>jpetridis@gnome.org</update_contact>
|
||||
<developer_name>Jordan Petridis and others</developer_name>
|
||||
</component>
|
||||
@@ -1,11 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=Hammond
|
||||
GenericName=Podcast Client
|
||||
Comment=Play, Subscribe and Manage Podcast Feeds.
|
||||
Icon=multimedia-player
|
||||
Exec=hammond
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Categories=AudioVideo;Audio;Video;
|
||||
Keywords=Podcast
|
||||
@@ -1,299 +0,0 @@
|
||||
#![allow(new_without_default)]
|
||||
|
||||
use gio::{
|
||||
ActionMapExt, ApplicationExt, ApplicationExtManual, ApplicationFlags, Settings, SettingsExt,
|
||||
SimpleAction, SimpleActionExt,
|
||||
};
|
||||
use glib;
|
||||
use gtk;
|
||||
use gtk::prelude::*;
|
||||
use gtk::SettingsExt as GtkSettingsExt;
|
||||
|
||||
use crossbeam_channel::{unbounded, Sender};
|
||||
use hammond_data::{Podcast, dbqueries};
|
||||
|
||||
use headerbar::Header;
|
||||
use settings::{self, WindowGeometry};
|
||||
use stacks::{Content, PopulatedState};
|
||||
use utils;
|
||||
use widgets::appnotif::{InAppNotification, UndoState};
|
||||
use widgets::{about_dialog, mark_all_notif, remove_show_notif};
|
||||
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
|
||||
/// Creates an action named $called in the action map $on with the handler $handle
|
||||
macro_rules! action {
|
||||
($on:expr, $called:expr, $handle:expr) => {{
|
||||
// Create a stateless, parameterless action
|
||||
let act = SimpleAction::new($called, None);
|
||||
// Connect the handler
|
||||
act.connect_activate($handle);
|
||||
// Add it to the map
|
||||
$on.add_action(&act);
|
||||
// Return the action
|
||||
act
|
||||
}};
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum Action {
|
||||
RefreshAllViews,
|
||||
RefreshEpisodesView,
|
||||
RefreshEpisodesViewBGR,
|
||||
RefreshShowsView,
|
||||
ReplaceWidget(Arc<Podcast>),
|
||||
RefreshWidgetIfSame(i32),
|
||||
ShowWidgetAnimated,
|
||||
ShowShowsAnimated,
|
||||
HeaderBarShowTile(String),
|
||||
HeaderBarNormal,
|
||||
HeaderBarShowUpdateIndicator,
|
||||
HeaderBarHideUpdateIndicator,
|
||||
MarkAllPlayerNotification(Arc<Podcast>),
|
||||
RemoveShow(Arc<Podcast>),
|
||||
ErrorNotification(String),
|
||||
AboutWidget(i32),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct App {
|
||||
app_instance: gtk::Application,
|
||||
settings: Settings,
|
||||
}
|
||||
|
||||
impl App {
|
||||
pub fn new() -> App {
|
||||
let settings = Settings::new("org.gnome.Hammond");
|
||||
let application = gtk::Application::new("org.gnome.Hammond", ApplicationFlags::empty())
|
||||
.expect("Application Initialization failed...");
|
||||
|
||||
// Weird magic I copy-pasted that sets the Application Name in the Shell.
|
||||
glib::set_application_name("Hammond");
|
||||
glib::set_prgname(Some("Hammond"));
|
||||
|
||||
let cleanup_date = settings::get_cleanup_date(&settings);
|
||||
utils::cleanup(cleanup_date);
|
||||
|
||||
application.connect_startup(clone!(settings => move |app| {
|
||||
let (sender, receiver) = unbounded();
|
||||
|
||||
App::setup_gactions(&app, &sender);
|
||||
|
||||
app.connect_activate(clone!(sender, settings => move |app| {
|
||||
// Get the current window (if any)
|
||||
if let Some(window) = app.get_active_window() {
|
||||
// Already open, just raise the window
|
||||
window.present();
|
||||
} else {
|
||||
// Time to open one!
|
||||
// Create the main window
|
||||
let window = gtk::ApplicationWindow::new(&app);
|
||||
window.set_title("Hammond");
|
||||
|
||||
window.connect_delete_event(clone!(app, settings => move |window, _| {
|
||||
WindowGeometry::from_window(&window).write(&settings);
|
||||
app.quit();
|
||||
Inhibit(false)
|
||||
}));
|
||||
|
||||
// Create a content instance
|
||||
let content =
|
||||
Rc::new(Content::new(sender.clone()).expect(
|
||||
"Content Initialization failed."));
|
||||
|
||||
// Create the headerbar
|
||||
let header = Rc::new(Header::new(&content, &window, &sender));
|
||||
|
||||
action!(window, "menu", clone!(header => move |_, _| {
|
||||
header.open_menu();
|
||||
}));
|
||||
|
||||
// Add the content main stack to the overlay.
|
||||
let overlay = gtk::Overlay::new();
|
||||
overlay.add(&content.get_stack());
|
||||
|
||||
// Add the overlay to the main window
|
||||
window.add(&overlay);
|
||||
|
||||
WindowGeometry::from_settings(&settings).apply(&window);
|
||||
|
||||
App::setup_timed_callbacks(&sender, &settings);
|
||||
|
||||
window.show_all();
|
||||
window.activate();
|
||||
|
||||
gtk::timeout_add(50, clone!(sender, receiver => move || {
|
||||
// Uses receiver, content, header, sender, overlay
|
||||
match receiver.try_recv() {
|
||||
Ok(Action::RefreshAllViews) => content.update(),
|
||||
Ok(Action::RefreshShowsView) => content.update_shows_view(),
|
||||
Ok(Action::RefreshWidgetIfSame(id)) =>
|
||||
content.update_widget_if_same(id),
|
||||
Ok(Action::RefreshEpisodesView) => content.update_home(),
|
||||
Ok(Action::RefreshEpisodesViewBGR) =>
|
||||
content.update_home_if_background(),
|
||||
Ok(Action::ReplaceWidget(pd)) => {
|
||||
let shows = content.get_shows();
|
||||
let mut pop = shows.borrow().populated();
|
||||
pop.borrow_mut()
|
||||
.replace_widget(pd.clone())
|
||||
.map_err(|err| error!("Failed to update ShowWidget: {}", err))
|
||||
.map_err(|_|
|
||||
error!("Failed ot update ShowWidget {}", pd.title()))
|
||||
.ok();
|
||||
}
|
||||
Ok(Action::ShowWidgetAnimated) => {
|
||||
let shows = content.get_shows();
|
||||
let mut pop = shows.borrow().populated();
|
||||
pop.borrow_mut().switch_visible(
|
||||
PopulatedState::Widget,
|
||||
gtk::StackTransitionType::SlideLeft,
|
||||
);
|
||||
}
|
||||
Ok(Action::ShowShowsAnimated) => {
|
||||
let shows = content.get_shows();
|
||||
let mut pop = shows.borrow().populated();
|
||||
pop.borrow_mut()
|
||||
.switch_visible(PopulatedState::View,
|
||||
gtk::StackTransitionType::SlideRight);
|
||||
}
|
||||
Ok(Action::HeaderBarShowTile(title)) =>
|
||||
header.switch_to_back(&title),
|
||||
Ok(Action::HeaderBarNormal) => header.switch_to_normal(),
|
||||
Ok(Action::HeaderBarShowUpdateIndicator) =>
|
||||
header.show_update_notification(),
|
||||
Ok(Action::HeaderBarHideUpdateIndicator) =>
|
||||
header.hide_update_notification(),
|
||||
Ok(Action::MarkAllPlayerNotification(pd)) => {
|
||||
let notif = mark_all_notif(pd, &sender);
|
||||
notif.show(&overlay);
|
||||
}
|
||||
Ok(Action::RemoveShow(pd)) => {
|
||||
let notif = remove_show_notif(pd, sender.clone());
|
||||
notif.show(&overlay);
|
||||
}
|
||||
Ok(Action::ErrorNotification(err)) => {
|
||||
error!("An error notification was triggered: {}", err);
|
||||
let callback = || glib::Continue(false);
|
||||
let notif = InAppNotification::new(&err, callback,
|
||||
|| {}, UndoState::Hidden);
|
||||
notif.show(&overlay);
|
||||
}
|
||||
Ok(Action::AboutWidget(rowid)) => {
|
||||
if let Ok(d) = dbqueries::get_episode_description(rowid) {
|
||||
if let Some(_desc) = d {
|
||||
let _stack = content.get_visible_stack();
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(_) => (),
|
||||
}
|
||||
|
||||
Continue(true)
|
||||
}));
|
||||
}
|
||||
}));
|
||||
}));
|
||||
|
||||
App {
|
||||
app_instance: application,
|
||||
settings,
|
||||
}
|
||||
}
|
||||
|
||||
fn setup_timed_callbacks(sender: &Sender<Action>, settings: &Settings) {
|
||||
App::setup_dark_theme(settings);
|
||||
App::setup_refresh_on_startup(&sender, settings);
|
||||
App::setup_auto_refresh(&sender, settings);
|
||||
}
|
||||
|
||||
fn setup_dark_theme(settings: &Settings) {
|
||||
let gtk_settings = gtk::Settings::get_default().unwrap();
|
||||
let enabled = settings.get_boolean("dark-theme");
|
||||
|
||||
gtk_settings.set_property_gtk_application_prefer_dark_theme(enabled);
|
||||
}
|
||||
|
||||
fn setup_refresh_on_startup(sender: &Sender<Action>, settings: &Settings) {
|
||||
// Update the feeds right after the Application is initialized.
|
||||
let sender = sender.clone();
|
||||
if settings.get_boolean("refresh-on-startup") {
|
||||
info!("Refresh on startup.");
|
||||
// The ui loads async, after initialization
|
||||
// so we need to delay this a bit so it won't block
|
||||
// requests that will come from loading the gui on startup.
|
||||
gtk::timeout_add(1500, move || {
|
||||
let s: Option<Vec<_>> = None;
|
||||
utils::refresh(s, sender.clone());
|
||||
glib::Continue(false)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
fn setup_auto_refresh(sender: &Sender<Action>, settings: &Settings) {
|
||||
let refresh_interval = settings::get_refresh_interval(&settings).num_seconds() as u32;
|
||||
|
||||
info!("Auto-refresh every {:?} seconds.", refresh_interval);
|
||||
|
||||
let sender = sender.clone();
|
||||
gtk::timeout_add_seconds(refresh_interval, move || {
|
||||
let s: Option<Vec<_>> = None;
|
||||
utils::refresh(s, sender.clone());
|
||||
|
||||
glib::Continue(true)
|
||||
});
|
||||
}
|
||||
|
||||
/// Define the `GAction`s.
|
||||
///
|
||||
/// Used in menus and the keyboard shortcuts dialog.
|
||||
fn setup_gactions(app: >k::Application, sender: &Sender<Action>) {
|
||||
// Create the `refresh` action.
|
||||
//
|
||||
// This will trigger a refresh of all the shows in the database.
|
||||
action!(
|
||||
app,
|
||||
"refresh",
|
||||
clone!(sender => move |_, _| {
|
||||
gtk::idle_add(clone!(sender => move || {
|
||||
let s: Option<Vec<_>> = None;
|
||||
utils::refresh(s, sender.clone());
|
||||
glib::Continue(false)
|
||||
}));
|
||||
})
|
||||
);
|
||||
app.set_accels_for_action("app.refresh", &["<primary>r"]);
|
||||
|
||||
// Create the `OPML` import action
|
||||
action!(
|
||||
app,
|
||||
"import",
|
||||
clone!(sender, app => move |_, _| {
|
||||
let window = app.get_active_window().expect("Failed to get active window");
|
||||
utils::on_import_clicked(&window, &sender);
|
||||
})
|
||||
);
|
||||
|
||||
// Create the action that shows a `gtk::AboutDialog`
|
||||
action!(
|
||||
app,
|
||||
"about",
|
||||
clone!(app => move |_, _| {
|
||||
let window = app.get_active_window().expect("Failed to get active window");
|
||||
about_dialog(&window);
|
||||
})
|
||||
);
|
||||
|
||||
// Create the quit action
|
||||
action!(app, "quit", clone!(app => move |_, _| app.quit()));
|
||||
app.set_accels_for_action("app.quit", &["<primary>q"]);
|
||||
|
||||
// Bind the hamburger menu button to `F10`
|
||||
app.set_accels_for_action("win.menu", &["F10"]);
|
||||
}
|
||||
|
||||
pub fn run(self) {
|
||||
ApplicationExtManual::run(&self.app_instance, &[]);
|
||||
}
|
||||
}
|
||||
@@ -1,223 +0,0 @@
|
||||
use gio::MenuModel;
|
||||
use glib;
|
||||
use gtk;
|
||||
use gtk::prelude::*;
|
||||
|
||||
use failure::Error;
|
||||
use failure::ResultExt;
|
||||
use url::Url;
|
||||
|
||||
use crossbeam_channel::Sender;
|
||||
use hammond_data::{dbqueries, Source};
|
||||
|
||||
use app::Action;
|
||||
use stacks::Content;
|
||||
use utils::{itunes_to_rss, refresh};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
// TODO: split this into smaller
|
||||
pub struct Header {
|
||||
container: gtk::HeaderBar,
|
||||
add_toggle: gtk::MenuButton,
|
||||
switch: gtk::StackSwitcher,
|
||||
back: gtk::Button,
|
||||
show_title: gtk::Label,
|
||||
update_box: gtk::Box,
|
||||
update_label: gtk::Label,
|
||||
update_spinner: gtk::Spinner,
|
||||
menu_button: gtk::MenuButton,
|
||||
app_menu: MenuModel,
|
||||
}
|
||||
|
||||
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/menus.ui");
|
||||
|
||||
let header = builder.get_object("headerbar").unwrap();
|
||||
let add_toggle = builder.get_object("add_toggle").unwrap();
|
||||
let switch = builder.get_object("switch").unwrap();
|
||||
let back = builder.get_object("back").unwrap();
|
||||
let show_title = builder.get_object("show_title").unwrap();
|
||||
let update_box = builder.get_object("update_notification").unwrap();
|
||||
let update_label = builder.get_object("update_label").unwrap();
|
||||
let update_spinner = builder.get_object("update_spinner").unwrap();
|
||||
let menu_button = builder.get_object("menu_button").unwrap();
|
||||
let app_menu = menus.get_object("menu").unwrap();
|
||||
|
||||
Header {
|
||||
container: header,
|
||||
add_toggle,
|
||||
switch,
|
||||
back,
|
||||
show_title,
|
||||
update_box,
|
||||
update_label,
|
||||
update_spinner,
|
||||
menu_button,
|
||||
app_menu,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Refactor components into smaller state machines
|
||||
impl Header {
|
||||
pub fn new(
|
||||
content: &Content,
|
||||
window: >k::ApplicationWindow,
|
||||
sender: &Sender<Action>,
|
||||
) -> Header {
|
||||
let h = Header::default();
|
||||
h.init(content, window, &sender);
|
||||
h
|
||||
}
|
||||
|
||||
pub fn init(
|
||||
&self,
|
||||
content: &Content,
|
||||
window: >k::ApplicationWindow,
|
||||
sender: &Sender<Action>,
|
||||
) {
|
||||
let builder = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/headerbar.ui");
|
||||
|
||||
let add_popover: gtk::Popover = builder.get_object("add_popover").unwrap();
|
||||
let new_url: gtk::Entry = builder.get_object("new_url").unwrap();
|
||||
let add_button: gtk::Button = builder.get_object("add_button").unwrap();
|
||||
let result_label: gtk::Label = builder.get_object("result_label").unwrap();
|
||||
self.switch.set_stack(&content.get_stack());
|
||||
|
||||
new_url.connect_changed(clone!(add_button => move |url| {
|
||||
on_url_change(url, &result_label, &add_button)
|
||||
.map_err(|err| error!("Error: {}", err))
|
||||
.ok();
|
||||
}));
|
||||
|
||||
add_button.connect_clicked(clone!(add_popover, new_url, sender => move |_| {
|
||||
on_add_bttn_clicked(&new_url, sender.clone())
|
||||
.map_err(|err| error!("Error: {}", err))
|
||||
.ok();
|
||||
add_popover.hide();
|
||||
}));
|
||||
|
||||
self.add_toggle.set_popover(&add_popover);
|
||||
|
||||
// Add the Headerbar to the window.
|
||||
window.set_titlebar(&self.container);
|
||||
|
||||
let switch = &self.switch;
|
||||
let add_toggle = &self.add_toggle;
|
||||
let show_title = &self.show_title;
|
||||
self.back.connect_clicked(
|
||||
clone!(switch, add_toggle, show_title, sender => move |back| {
|
||||
switch.show();
|
||||
add_toggle.show();
|
||||
back.hide();
|
||||
show_title.hide();
|
||||
sender.send(Action::ShowShowsAnimated)
|
||||
.map_err(|err| error!("Action Sender: {}", err))
|
||||
.ok();
|
||||
}),
|
||||
);
|
||||
|
||||
self.menu_button.set_menu_model(Some(&self.app_menu));
|
||||
}
|
||||
|
||||
pub fn switch_to_back(&self, title: &str) {
|
||||
self.switch.hide();
|
||||
self.add_toggle.hide();
|
||||
self.back.show();
|
||||
self.set_show_title(title);
|
||||
self.show_title.show();
|
||||
}
|
||||
|
||||
pub fn switch_to_normal(&self) {
|
||||
self.switch.show();
|
||||
self.add_toggle.show();
|
||||
self.back.hide();
|
||||
self.show_title.hide();
|
||||
}
|
||||
|
||||
pub fn set_show_title(&self, title: &str) {
|
||||
self.show_title.set_text(title)
|
||||
}
|
||||
|
||||
pub fn show_update_notification(&self) {
|
||||
self.update_spinner.start();
|
||||
self.update_box.show();
|
||||
self.update_spinner.show();
|
||||
self.update_label.show();
|
||||
}
|
||||
|
||||
pub fn hide_update_notification(&self) {
|
||||
self.update_spinner.stop();
|
||||
self.update_box.hide();
|
||||
self.update_spinner.hide();
|
||||
self.update_label.hide();
|
||||
}
|
||||
|
||||
pub fn open_menu(&self) {
|
||||
self.menu_button.clicked();
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: THIS ALSO SUCKS!
|
||||
fn on_add_bttn_clicked(entry: >k::Entry, sender: Sender<Action>) -> Result<(), Error> {
|
||||
let url = entry.get_text().unwrap_or_default();
|
||||
let url = if url.contains("itunes.com") || url.contains("apple.com") {
|
||||
info!("Detected itunes url.");
|
||||
let foo = itunes_to_rss(&url)?;
|
||||
info!("Resolved to {}", foo);
|
||||
foo
|
||||
} else {
|
||||
url.to_owned()
|
||||
};
|
||||
|
||||
let source = Source::from_url(&url).context("Failed to convert url to a Source entry.")?;
|
||||
entry.set_text("");
|
||||
|
||||
gtk::idle_add(move || {
|
||||
refresh(Some(vec![source.clone()]), sender.clone());
|
||||
glib::Continue(false)
|
||||
});
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// FIXME: THIS SUCKS!
|
||||
fn on_url_change(
|
||||
entry: >k::Entry,
|
||||
result: >k::Label,
|
||||
add_button: >k::Button,
|
||||
) -> Result<(), Error> {
|
||||
let uri = entry
|
||||
.get_text()
|
||||
.ok_or_else(|| format_err!("GtkEntry blew up somehow."))?;
|
||||
debug!("Url: {}", uri);
|
||||
|
||||
let url = Url::parse(&uri);
|
||||
// TODO: refactor to avoid duplication
|
||||
match url {
|
||||
Ok(u) => {
|
||||
if !dbqueries::source_exists(u.as_str())? {
|
||||
add_button.set_sensitive(true);
|
||||
result.hide();
|
||||
result.set_label("");
|
||||
} else {
|
||||
add_button.set_sensitive(false);
|
||||
result.set_label("Show already exists.");
|
||||
result.show();
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
Err(err) => {
|
||||
add_button.set_sensitive(false);
|
||||
if !uri.is_empty() {
|
||||
result.set_label("Invalid url.");
|
||||
result.show();
|
||||
error!("Error: {}", err);
|
||||
} else {
|
||||
result.hide();
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,347 +0,0 @@
|
||||
use glib;
|
||||
use gtk;
|
||||
use gtk::prelude::*;
|
||||
|
||||
use crossbeam_channel::{SendError, Sender};
|
||||
use failure::Error;
|
||||
use html2pango::markup_from_raw;
|
||||
use open;
|
||||
use rayon;
|
||||
use send_cell::SendCell;
|
||||
|
||||
use hammond_data::dbqueries;
|
||||
use hammond_data::utils::delete_show;
|
||||
use hammond_data::Podcast;
|
||||
|
||||
use app::Action;
|
||||
use utils::{self, lazy_load};
|
||||
use widgets::appnotif::{InAppNotification, UndoState};
|
||||
use widgets::EpisodeWidget;
|
||||
|
||||
use std::rc::Rc;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
lazy_static! {
|
||||
static ref SHOW_WIDGET_VALIGNMENT: Mutex<Option<(i32, SendCell<gtk::Adjustment>)>> =
|
||||
Mutex::new(None);
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ShowWidget {
|
||||
pub container: gtk::Box,
|
||||
scrolled_window: gtk::ScrolledWindow,
|
||||
cover: gtk::Image,
|
||||
description: gtk::Label,
|
||||
link: gtk::Button,
|
||||
settings: gtk::MenuButton,
|
||||
unsub: gtk::Button,
|
||||
episodes: gtk::ListBox,
|
||||
podcast_id: Option<i32>,
|
||||
}
|
||||
|
||||
impl Default for ShowWidget {
|
||||
fn default() -> Self {
|
||||
let builder = gtk::Builder::new_from_resource("/org/gnome/Hammond/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();
|
||||
|
||||
let cover: gtk::Image = builder.get_object("cover").unwrap();
|
||||
let description: gtk::Label = builder.get_object("description").unwrap();
|
||||
let unsub: gtk::Button = builder.get_object("unsub_button").unwrap();
|
||||
let link: gtk::Button = builder.get_object("link_button").unwrap();
|
||||
let settings: gtk::MenuButton = builder.get_object("settings_button").unwrap();
|
||||
|
||||
ShowWidget {
|
||||
container,
|
||||
scrolled_window,
|
||||
cover,
|
||||
description,
|
||||
unsub,
|
||||
link,
|
||||
settings,
|
||||
episodes,
|
||||
podcast_id: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ShowWidget {
|
||||
pub fn new(pd: Arc<Podcast>, sender: Sender<Action>) -> Rc<ShowWidget> {
|
||||
let mut pdw = ShowWidget::default();
|
||||
pdw.init(&pd, &sender);
|
||||
let pdw = Rc::new(pdw);
|
||||
populate_listbox(&pdw, pd, sender)
|
||||
.map_err(|err| error!("Failed to populate the listbox: {}", err))
|
||||
.ok();
|
||||
|
||||
pdw
|
||||
}
|
||||
|
||||
pub fn init(&mut self, pd: &Arc<Podcast>, sender: &Sender<Action>) {
|
||||
let builder = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/show_widget.ui");
|
||||
|
||||
self.unsub
|
||||
.connect_clicked(clone!(pd, sender => move |bttn| {
|
||||
on_unsub_button_clicked(pd.clone(), bttn, &sender);
|
||||
}));
|
||||
|
||||
self.set_description(pd.description());
|
||||
self.podcast_id = Some(pd.id());
|
||||
|
||||
self.set_cover(&pd)
|
||||
.map_err(|err| error!("Failed to set a cover: {}", err))
|
||||
.ok();
|
||||
|
||||
let link = pd.link().to_owned();
|
||||
self.link.set_tooltip_text(Some(link.as_str()));
|
||||
self.link.connect_clicked(move |_| {
|
||||
info!("Opening link: {}", &link);
|
||||
open::that(&link)
|
||||
.map_err(|err| error!("Error: {}", err))
|
||||
.map_err(|_| error!("Failed open link: {}", &link))
|
||||
.ok();
|
||||
});
|
||||
|
||||
let show_menu: gtk::Popover = builder.get_object("show_menu").unwrap();
|
||||
let mark_all: gtk::ModelButton = builder.get_object("mark_all_watched").unwrap();
|
||||
|
||||
let episodes = self.episodes.clone();
|
||||
mark_all.connect_clicked(clone!(pd, sender => move |_| {
|
||||
on_played_button_clicked(
|
||||
pd.clone(),
|
||||
&episodes,
|
||||
&sender
|
||||
)
|
||||
}));
|
||||
self.settings.set_popover(&show_menu);
|
||||
}
|
||||
|
||||
/// Set the show cover.
|
||||
fn set_cover(&self, pd: &Arc<Podcast>) -> Result<(), Error> {
|
||||
utils::set_image_from_path(&self.cover, pd.id(), 256)
|
||||
}
|
||||
|
||||
/// Set the descripton text.
|
||||
fn set_description(&self, text: &str) {
|
||||
self.description.set_markup(&markup_from_raw(text));
|
||||
}
|
||||
|
||||
/// Save the scrollabar vajustment to the cache.
|
||||
pub fn save_vadjustment(&self, oldid: i32) -> Result<(), Error> {
|
||||
if let Ok(mut guard) = SHOW_WIDGET_VALIGNMENT.lock() {
|
||||
let adj = self
|
||||
.scrolled_window
|
||||
.get_vadjustment()
|
||||
.ok_or_else(|| format_err!("Could not get the adjustment"))?;
|
||||
*guard = Some((oldid, SendCell::new(adj)));
|
||||
debug!("Widget Alignment was saved with ID: {}.", oldid);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Set scrolled window vertical adjustment.
|
||||
fn set_vadjustment(&self, pd: &Arc<Podcast>) -> Result<(), Error> {
|
||||
let guard = SHOW_WIDGET_VALIGNMENT
|
||||
.lock()
|
||||
.map_err(|err| format_err!("Failed to lock widget align mutex: {}", err))?;
|
||||
|
||||
if let Some((oldid, ref sendcell)) = *guard {
|
||||
// Only copy the old scrollbar if both widget's represent the same podcast.
|
||||
debug!("PID: {}", pd.id());
|
||||
debug!("OLDID: {}", oldid);
|
||||
if pd.id() != oldid {
|
||||
debug!("Early return");
|
||||
return Ok(());
|
||||
};
|
||||
|
||||
// Copy the vertical scrollbar adjustment from the old view into the new one.
|
||||
sendcell
|
||||
.try_get()
|
||||
.map(|x| utils::smooth_scroll_to(&self.scrolled_window, &x));
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn podcast_id(&self) -> Option<i32> {
|
||||
self.podcast_id
|
||||
}
|
||||
}
|
||||
|
||||
/// Populate the listbox with the shows episodes.
|
||||
fn populate_listbox(
|
||||
show: &Rc<ShowWidget>,
|
||||
pd: Arc<Podcast>,
|
||||
sender: Sender<Action>,
|
||||
) -> Result<(), Error> {
|
||||
use crossbeam_channel::bounded;
|
||||
use crossbeam_channel::TryRecvError::*;
|
||||
|
||||
let count = dbqueries::get_pd_episodes_count(&pd)?;
|
||||
|
||||
let (sender_, receiver) = bounded(1);
|
||||
rayon::spawn(clone!(pd => move || {
|
||||
let episodes = dbqueries::get_pd_episodeswidgets(&pd).unwrap();
|
||||
// The receiver can be dropped if there's an early return
|
||||
// like on show without episodes for example.
|
||||
sender_.send(episodes).ok();
|
||||
}));
|
||||
|
||||
if count == 0 {
|
||||
let builder = gtk::Builder::new_from_resource("/org/gnome/Hammond/gtk/empty_show.ui");
|
||||
let container: gtk::Box = builder.get_object("empty_show").unwrap();
|
||||
show.episodes.add(&container);
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let show_ = show.clone();
|
||||
gtk::idle_add(move || {
|
||||
let episodes = match receiver.try_recv() {
|
||||
Ok(e) => e,
|
||||
Err(Empty) => return glib::Continue(true),
|
||||
Err(Disconnected) => return glib::Continue(false),
|
||||
};
|
||||
|
||||
let list = show_.episodes.clone();
|
||||
|
||||
let constructor = clone!(sender => move |ep| {
|
||||
EpisodeWidget::new(&ep, &sender).container.clone()
|
||||
});
|
||||
|
||||
let callback = clone!(pd, show_ => move || {
|
||||
show_.set_vadjustment(&pd)
|
||||
.map_err(|err| error!("Failed to set ShowWidget Alignment: {}", err))
|
||||
.ok();
|
||||
});
|
||||
|
||||
lazy_load(episodes, list.clone(), constructor, callback);
|
||||
|
||||
glib::Continue(false)
|
||||
});
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn on_unsub_button_clicked(pd: Arc<Podcast>, unsub_button: >k::Button, sender: &Sender<Action>) {
|
||||
// hack to get away without properly checking for none.
|
||||
// if pressed twice would panic.
|
||||
unsub_button.set_sensitive(false);
|
||||
|
||||
let wrap = || -> Result<(), SendError<_>> {
|
||||
sender.send(Action::RemoveShow(pd))?;
|
||||
|
||||
sender.send(Action::HeaderBarNormal)?;
|
||||
sender.send(Action::ShowShowsAnimated)?;
|
||||
// Queue a refresh after the switch to avoid blocking the db.
|
||||
sender.send(Action::RefreshShowsView)?;
|
||||
sender.send(Action::RefreshEpisodesView)?;
|
||||
Ok(())
|
||||
};
|
||||
|
||||
wrap().map_err(|err| error!("Action Sender: {}", err)).ok();
|
||||
unsub_button.set_sensitive(true);
|
||||
}
|
||||
|
||||
fn on_played_button_clicked(pd: Arc<Podcast>, episodes: >k::ListBox, sender: &Sender<Action>) {
|
||||
if dim_titles(episodes).is_none() {
|
||||
error!("Something went horribly wrong when dimming the titles.");
|
||||
warn!("RUN WHILE YOU STILL CAN!");
|
||||
}
|
||||
|
||||
sender
|
||||
.send(Action::MarkAllPlayerNotification(pd))
|
||||
.map_err(|err| error!("Action Sender: {}", err))
|
||||
.ok();
|
||||
}
|
||||
|
||||
fn mark_all_watched(pd: &Podcast, sender: &Sender<Action>) -> Result<(), Error> {
|
||||
dbqueries::update_none_to_played_now(pd)?;
|
||||
// Not all widgets migth have been loaded when the mark_all is hit
|
||||
// So we will need to refresh again after it's done.
|
||||
sender.send(Action::RefreshWidgetIfSame(pd.id()))?;
|
||||
sender.send(Action::RefreshEpisodesView).map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn mark_all_notif(pd: Arc<Podcast>, sender: &Sender<Action>) -> InAppNotification {
|
||||
let id = pd.id();
|
||||
let callback = clone!(sender => move || {
|
||||
mark_all_watched(&pd, &sender)
|
||||
.map_err(|err| error!("Notif Callback Error: {}", err))
|
||||
.ok();
|
||||
glib::Continue(false)
|
||||
});
|
||||
|
||||
let undo_callback = clone!(sender => move || {
|
||||
sender.send(Action::RefreshWidgetIfSame(id))
|
||||
.map_err(|err| error!("Action Sender: {}", err))
|
||||
.ok();
|
||||
});
|
||||
|
||||
let text = "Marked all episodes as listened";
|
||||
InAppNotification::new(text, callback, undo_callback, UndoState::Shown)
|
||||
}
|
||||
|
||||
pub fn remove_show_notif(pd: Arc<Podcast>, sender: Sender<Action>) -> InAppNotification {
|
||||
let text = format!("Unsubscribed from {}", pd.title());
|
||||
|
||||
utils::ignore_show(pd.id())
|
||||
.map_err(|err| error!("Error: {}", err))
|
||||
.map_err(|_| error!("Could not insert {} to the ignore list.", pd.title()))
|
||||
.ok();
|
||||
|
||||
let callback = clone!(pd, sender => move || {
|
||||
utils::uningore_show(pd.id())
|
||||
.map_err(|err| error!("Error: {}", err))
|
||||
.map_err(|_| error!("Could not remove {} from the ignore list.", pd.title()))
|
||||
.ok();
|
||||
|
||||
// Spawn a thread so it won't block the ui.
|
||||
rayon::spawn(clone!(pd, sender => move || {
|
||||
delete_show(&pd)
|
||||
.map_err(|err| error!("Error: {}", err))
|
||||
.map_err(|_| error!("Failed to delete {}", pd.title()))
|
||||
.ok();
|
||||
|
||||
sender.send(Action::RefreshEpisodesView).ok();
|
||||
}));
|
||||
glib::Continue(false)
|
||||
});
|
||||
|
||||
let undo_wrap = move || -> Result<(), Error> {
|
||||
utils::uningore_show(pd.id())?;
|
||||
sender.send(Action::RefreshShowsView)?;
|
||||
sender.send(Action::RefreshEpisodesView)?;
|
||||
Ok(())
|
||||
};
|
||||
|
||||
let undo_callback = move || {
|
||||
undo_wrap().map_err(|err| error!("{}", err)).ok();
|
||||
};
|
||||
|
||||
InAppNotification::new(&text, callback, undo_callback, UndoState::Shown)
|
||||
}
|
||||
|
||||
// Ideally if we had a custom widget this would have been as simple as:
|
||||
// `for row in listbox { ep = row.get_episode(); ep.dim_title(); }`
|
||||
// But now I can't think of a better way to do it than hardcoding the title
|
||||
// position relative to the EpisodeWidget container gtk::Box.
|
||||
fn dim_titles(episodes: >k::ListBox) -> Option<()> {
|
||||
let children = episodes.get_children();
|
||||
|
||||
for row in children {
|
||||
let row = row.downcast::<gtk::ListBoxRow>().ok()?;
|
||||
let container = row.get_children().remove(0).downcast::<gtk::Box>().ok()?;
|
||||
let foo = container
|
||||
.get_children()
|
||||
.remove(0)
|
||||
.downcast::<gtk::Box>()
|
||||
.ok()?;
|
||||
let bar = foo.get_children().remove(0).downcast::<gtk::Box>().ok()?;
|
||||
let title = bar.get_children().remove(0).downcast::<gtk::Label>().ok()?;
|
||||
|
||||
title.get_style_context().map(|c| c.add_class("dim-label"));
|
||||
}
|
||||
Some(())
|
||||
}
|
||||
+16
-13
@@ -2,23 +2,26 @@
|
||||
# https://gitlab.gnome.org/danigm/fractal/blob/6e2911f9d2353c99a18a6c19fab7f903c4bbb431/meson.build
|
||||
|
||||
project(
|
||||
'hammond', 'rust',
|
||||
version: '0.3.4',
|
||||
'gnome-podcasts', 'rust',
|
||||
version: '0.4.4',
|
||||
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'))
|
||||
|
||||
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)
|
||||
@@ -28,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
|
||||
])
|
||||
@@ -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"
|
||||
],
|
||||
@@ -20,6 +20,7 @@
|
||||
"--share=ipc",
|
||||
"--socket=x11",
|
||||
"--socket=wayland",
|
||||
"--socket=pulseaudio",
|
||||
"--talk-name=org.freedesktop.Desktop"
|
||||
],
|
||||
"build-options" : {
|
||||
@@ -28,19 +29,19 @@
|
||||
"--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" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.gnome.org/World/hammond.git",
|
||||
"url" : "https://gitlab.gnome.org/World/podcasts.git",
|
||||
"branch" : "master"
|
||||
}
|
||||
]
|
||||
@@ -1,23 +1,23 @@
|
||||
[package]
|
||||
authors = ["Jordan Petridis <jordanpetridis@protonmail.com>"]
|
||||
name = "hammond-data"
|
||||
name = "podcasts-data"
|
||||
version = "0.1.0"
|
||||
workspace = "../"
|
||||
|
||||
[dependencies]
|
||||
ammonia = "1.1.0"
|
||||
chrono = "0.4.2"
|
||||
ammonia = "1.2.0"
|
||||
chrono = "0.4.4"
|
||||
derive_builder = "0.5.1"
|
||||
lazy_static = "1.0.0"
|
||||
log = "0.4.1"
|
||||
rayon = "1.0.1"
|
||||
lazy_static = "1.0.2"
|
||||
log = "0.4.3"
|
||||
rayon = "1.0.2"
|
||||
rayon-futures = "0.1.0"
|
||||
rfc822_sanitizer = "0.3.3"
|
||||
rss = "1.5.0"
|
||||
url = "1.7.0"
|
||||
url = "1.7.1"
|
||||
xdg = "2.1.0"
|
||||
xml-rs = "0.8.0"
|
||||
futures = "0.1.21"
|
||||
futures = "0.1.23"
|
||||
hyper = "0.11.27"
|
||||
tokio-core = "0.1.17"
|
||||
hyper-tls = "0.1.3"
|
||||
@@ -28,16 +28,16 @@ failure_derive = "0.1.1"
|
||||
|
||||
[dependencies.diesel]
|
||||
features = ["sqlite", "r2d2"]
|
||||
version = "= 1.2.2"
|
||||
version = "1.3.2"
|
||||
|
||||
[dependencies.diesel_migrations]
|
||||
features = ["sqlite"]
|
||||
version = "= 1.2.0"
|
||||
version = "1.3.0"
|
||||
|
||||
[dev-dependencies]
|
||||
rand = "0.5.0"
|
||||
rand = "0.5.4"
|
||||
tempdir = "0.3.7"
|
||||
criterion = "0.2.3"
|
||||
criterion = "0.2.4"
|
||||
pretty_assertions = "0.5.1"
|
||||
maplit = "1.0.1"
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# For documentation on how to configure this file,
|
||||
# see diesel.rs/guides/configuring-diesel-cli
|
||||
|
||||
[print_schema]
|
||||
file = "src/schema.rs"
|
||||
patch_file = "src/schema.patch"
|
||||
@@ -0,0 +1,53 @@
|
||||
ALTER TABLE episode RENAME TO old_table;
|
||||
|
||||
CREATE TABLE episode (
|
||||
title TEXT NOT NULL,
|
||||
uri TEXT,
|
||||
local_uri TEXT,
|
||||
description TEXT,
|
||||
epoch INTEGER NOT NULL DEFAULT 0,
|
||||
length INTEGER,
|
||||
duration INTEGER,
|
||||
guid TEXT,
|
||||
played INTEGER,
|
||||
podcast_id INTEGER NOT NULL,
|
||||
favorite INTEGER DEFAULT 0,
|
||||
archive INTEGER DEFAULT 0,
|
||||
PRIMARY KEY (title, podcast_id)
|
||||
);
|
||||
|
||||
INSERT INTO episode (title, uri, local_uri, description, epoch, length, duration, guid, played, podcast_id, favorite, archive)
|
||||
SELECT title, uri, local_uri, description, epoch, length, duration, guid, played, podcast_id, 0, 0
|
||||
FROM old_table;
|
||||
|
||||
Drop table old_table;
|
||||
|
||||
ALTER TABLE podcast RENAME TO old_table;
|
||||
CREATE TABLE `podcast` (
|
||||
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
|
||||
`title` TEXT NOT NULL,
|
||||
`link` TEXT NOT NULL,
|
||||
`description` TEXT NOT NULL,
|
||||
`image_uri` TEXT,
|
||||
`source_id` INTEGER NOT NULL UNIQUE,
|
||||
`favorite` INTEGER NOT NULL DEFAULT 0,
|
||||
`archive` INTEGER NOT NULL DEFAULT 0,
|
||||
`always_dl` INTEGER NOT NULL DEFAULT 0
|
||||
);
|
||||
|
||||
INSERT INTO podcast (
|
||||
id,
|
||||
title,
|
||||
link,
|
||||
description,
|
||||
image_uri,
|
||||
source_id
|
||||
) SELECT id,
|
||||
title,
|
||||
link,
|
||||
description,
|
||||
image_uri,
|
||||
source_id
|
||||
FROM old_table;
|
||||
|
||||
Drop table old_table;
|
||||
@@ -0,0 +1,66 @@
|
||||
ALTER TABLE episode RENAME TO old_table;
|
||||
|
||||
CREATE TABLE episode (
|
||||
title TEXT NOT NULL,
|
||||
uri TEXT,
|
||||
local_uri TEXT,
|
||||
description TEXT,
|
||||
epoch INTEGER NOT NULL DEFAULT 0,
|
||||
length INTEGER,
|
||||
duration INTEGER,
|
||||
guid TEXT,
|
||||
played INTEGER,
|
||||
podcast_id INTEGER NOT NULL,
|
||||
PRIMARY KEY (title, podcast_id)
|
||||
);
|
||||
|
||||
INSERT INTO episode (
|
||||
title,
|
||||
uri,
|
||||
local_uri,
|
||||
description,
|
||||
epoch,
|
||||
length,
|
||||
duration,
|
||||
guid,
|
||||
played,
|
||||
podcast_id
|
||||
) SELECT title,
|
||||
uri,
|
||||
local_uri,
|
||||
description,
|
||||
epoch, length,
|
||||
duration,
|
||||
guid,
|
||||
played,
|
||||
podcast_id
|
||||
FROM old_table;
|
||||
|
||||
Drop table old_table;
|
||||
|
||||
ALTER TABLE podcast RENAME TO old_table;
|
||||
CREATE TABLE `podcast` (
|
||||
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
|
||||
`title` TEXT NOT NULL,
|
||||
`link` TEXT NOT NULL,
|
||||
`description` TEXT NOT NULL,
|
||||
`image_uri` TEXT,
|
||||
`source_id` INTEGER NOT NULL UNIQUE
|
||||
);
|
||||
|
||||
INSERT INTO podcast (
|
||||
id,
|
||||
title,
|
||||
link,
|
||||
description,
|
||||
image_uri,
|
||||
source_id
|
||||
) SELECT id,
|
||||
title,
|
||||
link,
|
||||
description,
|
||||
image_uri,
|
||||
source_id
|
||||
FROM old_table;
|
||||
|
||||
Drop table old_table;
|
||||
@@ -0,0 +1,40 @@
|
||||
ALTER TABLE episodes RENAME TO old_table;
|
||||
ALTER TABLE shows RENAME TO podcast;
|
||||
|
||||
CREATE TABLE episode (
|
||||
title TEXT NOT NULL,
|
||||
uri TEXT,
|
||||
local_uri TEXT,
|
||||
description TEXT,
|
||||
epoch INTEGER NOT NULL DEFAULT 0,
|
||||
length INTEGER,
|
||||
duration INTEGER,
|
||||
guid TEXT,
|
||||
played INTEGER,
|
||||
podcast_id INTEGER NOT NULL,
|
||||
PRIMARY KEY (title, podcast_id)
|
||||
);
|
||||
|
||||
INSERT INTO episode (
|
||||
title,
|
||||
uri,
|
||||
local_uri,
|
||||
description,
|
||||
epoch,
|
||||
length,
|
||||
duration,
|
||||
guid,
|
||||
played,
|
||||
podcast_id
|
||||
) SELECT title,
|
||||
uri,
|
||||
local_uri,
|
||||
description,
|
||||
epoch, length,
|
||||
duration,
|
||||
guid,
|
||||
played,
|
||||
show_id
|
||||
FROM old_table;
|
||||
|
||||
Drop table old_table;
|
||||
@@ -0,0 +1,40 @@
|
||||
ALTER TABLE episode RENAME TO old_table;
|
||||
ALTER TABLE podcast RENAME TO shows;
|
||||
|
||||
CREATE TABLE episodes (
|
||||
title TEXT NOT NULL,
|
||||
uri TEXT,
|
||||
local_uri TEXT,
|
||||
description TEXT,
|
||||
epoch INTEGER NOT NULL DEFAULT 0,
|
||||
length INTEGER,
|
||||
duration INTEGER,
|
||||
guid TEXT,
|
||||
played INTEGER,
|
||||
show_id INTEGER NOT NULL,
|
||||
PRIMARY KEY (title, show_id)
|
||||
);
|
||||
|
||||
INSERT INTO episodes (
|
||||
title,
|
||||
uri,
|
||||
local_uri,
|
||||
description,
|
||||
epoch,
|
||||
length,
|
||||
duration,
|
||||
guid,
|
||||
played,
|
||||
show_id
|
||||
) SELECT title,
|
||||
uri,
|
||||
local_uri,
|
||||
description,
|
||||
epoch, length,
|
||||
duration,
|
||||
guid,
|
||||
played,
|
||||
podcast_id
|
||||
FROM old_table;
|
||||
|
||||
Drop table old_table;
|
||||
@@ -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`.
|
||||
@@ -68,8 +70,8 @@ fn run_migration_on(connection: &SqliteConnection) -> Result<(), DataError> {
|
||||
pub fn truncate_db() -> Result<(), DataError> {
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
con.execute("DELETE FROM episode")?;
|
||||
con.execute("DELETE FROM podcast")?;
|
||||
con.execute("DELETE FROM episodes")?;
|
||||
con.execute("DELETE FROM shows")?;
|
||||
con.execute("DELETE FROM source")?;
|
||||
Ok(())
|
||||
}
|
||||
@@ -23,169 +23,157 @@ pub fn get_sources() -> Result<Vec<Source>, DataError> {
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn get_podcasts() -> Result<Vec<Podcast>, DataError> {
|
||||
use schema::podcast::dsl::*;
|
||||
pub fn get_podcasts() -> Result<Vec<Show>, DataError> {
|
||||
use schema::shows::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
podcast
|
||||
shows
|
||||
.order(title.asc())
|
||||
.load::<Podcast>(&con)
|
||||
.load::<Show>(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn get_podcasts_filter(filter_ids: &[i32]) -> Result<Vec<Podcast>, DataError> {
|
||||
use schema::podcast::dsl::*;
|
||||
pub fn get_podcasts_filter(filter_ids: &[i32]) -> Result<Vec<Show>, DataError> {
|
||||
use schema::shows::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
podcast
|
||||
shows
|
||||
.order(title.asc())
|
||||
.filter(id.ne_all(filter_ids))
|
||||
.load::<Podcast>(&con)
|
||||
.load::<Show>(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn get_episodes() -> Result<Vec<Episode>, DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
use schema::episodes::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
episode
|
||||
episodes
|
||||
.order(epoch.desc())
|
||||
.load::<Episode>(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub(crate) fn get_downloaded_episodes() -> Result<Vec<EpisodeCleanerQuery>, DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
pub(crate) fn get_downloaded_episodes() -> Result<Vec<EpisodeCleanerModel>, DataError> {
|
||||
use schema::episodes::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
episode
|
||||
episodes
|
||||
.select((rowid, local_uri, played))
|
||||
.filter(local_uri.is_not_null())
|
||||
.load::<EpisodeCleanerQuery>(&con)
|
||||
.load::<EpisodeCleanerModel>(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
// pub(crate) fn get_played_episodes() -> Result<Vec<Episode>, DataError> {
|
||||
// use schema::episode::dsl::*;
|
||||
// use schema::episodes::dsl::*;
|
||||
|
||||
// let db = connection();
|
||||
// let con = db.get()?;
|
||||
// episode
|
||||
// episodes
|
||||
// .filter(played.is_not_null())
|
||||
// .load::<Episode>(&con)
|
||||
// .map_err(From::from)
|
||||
// }
|
||||
|
||||
pub(crate) fn get_played_cleaner_episodes() -> Result<Vec<EpisodeCleanerQuery>, DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
pub(crate) fn get_played_cleaner_episodes() -> Result<Vec<EpisodeCleanerModel>, DataError> {
|
||||
use schema::episodes::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
episode
|
||||
episodes
|
||||
.select((rowid, local_uri, played))
|
||||
.filter(played.is_not_null())
|
||||
.load::<EpisodeCleanerQuery>(&con)
|
||||
.load::<EpisodeCleanerModel>(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn get_episode_from_rowid(ep_id: i32) -> Result<Episode, DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
use schema::episodes::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
episode
|
||||
episodes
|
||||
.filter(rowid.eq(ep_id))
|
||||
.get_result::<Episode>(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn get_episode_widget_from_rowid(ep_id: i32) -> Result<EpisodeWidgetQuery, DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
pub fn get_episode_widget_from_rowid(ep_id: i32) -> Result<EpisodeWidgetModel, DataError> {
|
||||
use schema::episodes::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
episode
|
||||
episodes
|
||||
.select((
|
||||
rowid, title, uri, local_uri, epoch, length, duration, played, podcast_id,
|
||||
rowid, title, uri, local_uri, epoch, length, duration, played, show_id,
|
||||
))
|
||||
.filter(rowid.eq(ep_id))
|
||||
.get_result::<EpisodeWidgetQuery>(&con)
|
||||
.get_result::<EpisodeWidgetModel>(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn get_episode_local_uri_from_id(ep_id: i32) -> Result<Option<String>, DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
use schema::episodes::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
episode
|
||||
episodes
|
||||
.filter(rowid.eq(ep_id))
|
||||
.select(local_uri)
|
||||
.get_result::<Option<String>>(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn get_episode_description(rowid_: i32) -> Result<Option<String>, DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
episode
|
||||
.filter(rowid.eq(rowid_))
|
||||
.select(description)
|
||||
.get_result::<Option<String>>(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn get_episodes_widgets_filter_limit(
|
||||
filter_ids: &[i32],
|
||||
limit: u32,
|
||||
) -> Result<Vec<EpisodeWidgetQuery>, DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
) -> Result<Vec<EpisodeWidgetModel>, DataError> {
|
||||
use schema::episodes::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
let columns = (
|
||||
rowid, title, uri, local_uri, epoch, length, duration, played, podcast_id,
|
||||
rowid, title, uri, local_uri, epoch, length, duration, played, show_id,
|
||||
);
|
||||
|
||||
episode
|
||||
episodes
|
||||
.select(columns)
|
||||
.order(epoch.desc())
|
||||
.filter(podcast_id.ne_all(filter_ids))
|
||||
.filter(show_id.ne_all(filter_ids))
|
||||
.limit(i64::from(limit))
|
||||
.load::<EpisodeWidgetQuery>(&con)
|
||||
.load::<EpisodeWidgetModel>(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn get_podcast_from_id(pid: i32) -> Result<Podcast, DataError> {
|
||||
use schema::podcast::dsl::*;
|
||||
pub fn get_podcast_from_id(pid: i32) -> Result<Show, DataError> {
|
||||
use schema::shows::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
podcast
|
||||
shows
|
||||
.filter(id.eq(pid))
|
||||
.get_result::<Podcast>(&con)
|
||||
.get_result::<Show>(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn get_podcast_cover_from_id(pid: i32) -> Result<PodcastCoverQuery, DataError> {
|
||||
use schema::podcast::dsl::*;
|
||||
pub fn get_podcast_cover_from_id(pid: i32) -> Result<ShowCoverModel, DataError> {
|
||||
use schema::shows::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
podcast
|
||||
shows
|
||||
.select((id, title, image_uri))
|
||||
.filter(id.eq(pid))
|
||||
.get_result::<PodcastCoverQuery>(&con)
|
||||
.get_result::<ShowCoverModel>(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn get_pd_episodes(parent: &Podcast) -> Result<Vec<Episode>, DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
pub fn get_pd_episodes(parent: &Show) -> Result<Vec<Episode>, DataError> {
|
||||
use schema::episodes::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
@@ -195,7 +183,7 @@ pub fn get_pd_episodes(parent: &Podcast) -> Result<Vec<Episode>, DataError> {
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn get_pd_episodes_count(parent: &Podcast) -> Result<i64, DataError> {
|
||||
pub fn get_pd_episodes_count(parent: &Show) -> Result<i64, DataError> {
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
@@ -205,24 +193,24 @@ pub fn get_pd_episodes_count(parent: &Podcast) -> Result<i64, DataError> {
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn get_pd_episodeswidgets(parent: &Podcast) -> Result<Vec<EpisodeWidgetQuery>, DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
pub fn get_pd_episodeswidgets(parent: &Show) -> Result<Vec<EpisodeWidgetModel>, DataError> {
|
||||
use schema::episodes::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
let columns = (
|
||||
rowid, title, uri, local_uri, epoch, length, duration, played, podcast_id,
|
||||
rowid, title, uri, local_uri, epoch, length, duration, played, show_id,
|
||||
);
|
||||
|
||||
episode
|
||||
episodes
|
||||
.select(columns)
|
||||
.filter(podcast_id.eq(parent.id()))
|
||||
.filter(show_id.eq(parent.id()))
|
||||
.order(epoch.desc())
|
||||
.load::<EpisodeWidgetQuery>(&con)
|
||||
.load::<EpisodeWidgetModel>(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn get_pd_unplayed_episodes(parent: &Podcast) -> Result<Vec<Episode>, DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
pub fn get_pd_unplayed_episodes(parent: &Show) -> Result<Vec<Episode>, DataError> {
|
||||
use schema::episodes::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
@@ -233,8 +221,8 @@ pub fn get_pd_unplayed_episodes(parent: &Podcast) -> Result<Vec<Episode>, DataEr
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
// pub(crate) fn get_pd_episodes_limit(parent: &Podcast, limit: u32) ->
|
||||
// Result<Vec<Episode>, DataError> { use schema::episode::dsl::*;
|
||||
// pub(crate) fn get_pd_episodes_limit(parent: &Show, limit: u32) ->
|
||||
// Result<Vec<Episode>, DataError> { use schema::episodes::dsl::*;
|
||||
|
||||
// let db = connection();
|
||||
// let con = db.get()?;
|
||||
@@ -268,25 +256,25 @@ pub fn get_source_from_id(id_: i32) -> Result<Source, DataError> {
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn get_podcast_from_source_id(sid: i32) -> Result<Podcast, DataError> {
|
||||
use schema::podcast::dsl::*;
|
||||
pub fn get_podcast_from_source_id(sid: i32) -> Result<Show, DataError> {
|
||||
use schema::shows::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
podcast
|
||||
shows
|
||||
.filter(source_id.eq(sid))
|
||||
.get_result::<Podcast>(&con)
|
||||
.get_result::<Show>(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn get_episode_from_pk(title_: &str, pid: i32) -> Result<Episode, DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
use schema::episodes::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
episode
|
||||
episodes
|
||||
.filter(title.eq(title_))
|
||||
.filter(podcast_id.eq(pid))
|
||||
.filter(show_id.eq(pid))
|
||||
.get_result::<Episode>(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
@@ -295,19 +283,19 @@ pub(crate) fn get_episode_minimal_from_pk(
|
||||
title_: &str,
|
||||
pid: i32,
|
||||
) -> Result<EpisodeMinimal, DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
use schema::episodes::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
episode
|
||||
.select((rowid, title, uri, epoch, duration, guid, podcast_id))
|
||||
episodes
|
||||
.select((rowid, title, uri, epoch, length, duration, guid, show_id))
|
||||
.filter(title.eq(title_))
|
||||
.filter(podcast_id.eq(pid))
|
||||
.filter(show_id.eq(pid))
|
||||
.get_result::<EpisodeMinimal>(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub(crate) fn remove_feed(pd: &Podcast) -> Result<(), DataError> {
|
||||
pub(crate) fn remove_feed(pd: &Show) -> Result<(), DataError> {
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
@@ -326,16 +314,16 @@ fn delete_source(con: &SqliteConnection, source_id: i32) -> QueryResult<usize> {
|
||||
diesel::delete(source.filter(id.eq(source_id))).execute(con)
|
||||
}
|
||||
|
||||
fn delete_podcast(con: &SqliteConnection, podcast_id: i32) -> QueryResult<usize> {
|
||||
use schema::podcast::dsl::*;
|
||||
fn delete_podcast(con: &SqliteConnection, show_id: i32) -> QueryResult<usize> {
|
||||
use schema::shows::dsl::*;
|
||||
|
||||
diesel::delete(podcast.filter(id.eq(podcast_id))).execute(con)
|
||||
diesel::delete(shows.filter(id.eq(show_id))).execute(con)
|
||||
}
|
||||
|
||||
fn delete_podcast_episodes(con: &SqliteConnection, parent_id: i32) -> QueryResult<usize> {
|
||||
use schema::episode::dsl::*;
|
||||
use schema::episodes::dsl::*;
|
||||
|
||||
diesel::delete(episode.filter(podcast_id.eq(parent_id))).execute(con)
|
||||
diesel::delete(episodes.filter(show_id.eq(parent_id))).execute(con)
|
||||
}
|
||||
|
||||
pub fn source_exists(url: &str) -> Result<bool, DataError> {
|
||||
@@ -350,81 +338,70 @@ pub fn source_exists(url: &str) -> Result<bool, DataError> {
|
||||
}
|
||||
|
||||
pub(crate) fn podcast_exists(source_id_: i32) -> Result<bool, DataError> {
|
||||
use schema::podcast::dsl::*;
|
||||
use schema::shows::dsl::*;
|
||||
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
select(exists(podcast.filter(source_id.eq(source_id_))))
|
||||
select(exists(shows.filter(source_id.eq(source_id_))))
|
||||
.get_result(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
#[cfg_attr(rustfmt, rustfmt_skip)]
|
||||
pub(crate) fn episode_exists(title_: &str, podcast_id_: i32) -> Result<bool, DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
pub(crate) fn episode_exists(title_: &str, show_id_: i32) -> Result<bool, DataError> {
|
||||
use schema::episodes::dsl::*;
|
||||
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
select(exists(episode.filter(podcast_id.eq(podcast_id_)).filter(title.eq(title_))))
|
||||
select(exists(episodes.filter(show_id.eq(show_id_)).filter(title.eq(title_))))
|
||||
.get_result(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub fn episode_had_description(rowid_: i32) -> Result<bool, DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
select(exists(episode.filter(rowid.eq(rowid_))))
|
||||
.get_result(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
/// Check if the `episode` table contains any rows
|
||||
/// Check if the `episodes table contains any rows
|
||||
///
|
||||
/// Return true if `episode` table is populated.
|
||||
/// Return true if `episodes` table is populated.
|
||||
pub fn is_episodes_populated() -> Result<bool, DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
use schema::episodes::dsl::*;
|
||||
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
select(exists(episode.as_query()))
|
||||
select(exists(episodes.as_query()))
|
||||
.get_result(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
/// Check if the `podcast` table contains any rows
|
||||
/// Check if the `shows` table contains any rows
|
||||
///
|
||||
/// Return true if `podcast table is populated.
|
||||
/// Return true if `shows table is populated.
|
||||
pub fn is_podcasts_populated(filter_ids: &[i32]) -> Result<bool, DataError> {
|
||||
use schema::podcast::dsl::*;
|
||||
use schema::shows::dsl::*;
|
||||
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
select(exists(podcast.filter(id.ne_all(filter_ids))))
|
||||
select(exists(shows.filter(id.ne_all(filter_ids))))
|
||||
.get_result(&con)
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
pub(crate) fn index_new_episodes(eps: &[NewEpisode]) -> Result<(), DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
use schema::episodes::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
diesel::insert_into(episode)
|
||||
diesel::insert_into(episodes)
|
||||
.values(eps)
|
||||
.execute(&*con)
|
||||
.map_err(From::from)
|
||||
.map(|_| ())
|
||||
}
|
||||
|
||||
pub fn update_none_to_played_now(parent: &Podcast) -> Result<usize, DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
pub fn update_none_to_played_now(parent: &Show) -> Result<usize, DataError> {
|
||||
use schema::episodes::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
@@ -11,7 +11,12 @@ use std::io;
|
||||
|
||||
use models::Source;
|
||||
|
||||
#[fail(display = "Request to {} returned {}. Context: {}", url, status_code, context)]
|
||||
#[fail(
|
||||
display = "Request to {} returned {}. Context: {}",
|
||||
url,
|
||||
status_code,
|
||||
context
|
||||
)]
|
||||
#[derive(Fail, Debug)]
|
||||
pub struct HttpStatusError {
|
||||
url: String,
|
||||
@@ -58,7 +63,10 @@ pub enum DataError {
|
||||
HttpStatusGeneral(HttpStatusError),
|
||||
#[fail(display = "FIXME: This should be better")]
|
||||
F301(Source),
|
||||
#[fail(display = "Error occured while Parsing an Episode. Reason: {}", reason)]
|
||||
#[fail(
|
||||
display = "Error occured while Parsing an Episode. Reason: {}",
|
||||
reason
|
||||
)]
|
||||
ParseEpisodeError { reason: String, parent_id: i32 },
|
||||
#[fail(display = "Episode was not changed and thus skipped.")]
|
||||
EpisodeNotChanged,
|
||||
@@ -9,7 +9,7 @@ use rss;
|
||||
use dbqueries;
|
||||
use errors::DataError;
|
||||
use models::{Index, IndexState, Update};
|
||||
use models::{NewEpisode, NewEpisodeMinimal, NewPodcast, Podcast};
|
||||
use models::{NewEpisode, NewEpisodeMinimal, NewShow, Show};
|
||||
|
||||
/// Wrapper struct that hold a `Source` id and the `rss::Channel`
|
||||
/// that corresponds to the `Source.uri` field.
|
||||
@@ -31,15 +31,15 @@ impl Feed {
|
||||
.and_then(move |pd| self.index_channel_items(pd))
|
||||
}
|
||||
|
||||
fn parse_podcast(&self) -> NewPodcast {
|
||||
NewPodcast::new(&self.channel, self.source_id)
|
||||
fn parse_podcast(&self) -> NewShow {
|
||||
NewShow::new(&self.channel, self.source_id)
|
||||
}
|
||||
|
||||
fn parse_podcast_async(&self) -> impl Future<Item = NewPodcast, Error = DataError> + Send {
|
||||
fn parse_podcast_async(&self) -> impl Future<Item = NewShow, Error = DataError> + Send {
|
||||
ok(self.parse_podcast())
|
||||
}
|
||||
|
||||
fn index_channel_items(self, pd: Podcast) -> impl Future<Item = (), Error = DataError> + Send {
|
||||
fn index_channel_items(self, pd: Show) -> impl Future<Item = (), Error = DataError> + Send {
|
||||
let stream = stream::iter_ok::<_, DataError>(self.channel.into_items());
|
||||
|
||||
// Parse the episodes
|
||||
@@ -65,12 +65,12 @@ fn determine_ep_state(
|
||||
item: &rss::Item,
|
||||
) -> Result<IndexState<NewEpisode>, DataError> {
|
||||
// Check if feed exists
|
||||
let exists = dbqueries::episode_exists(ep.title(), ep.podcast_id())?;
|
||||
let exists = dbqueries::episode_exists(ep.title(), ep.show_id())?;
|
||||
|
||||
if !exists {
|
||||
Ok(IndexState::Index(ep.into_new_episode(item)))
|
||||
} else {
|
||||
let old = dbqueries::get_episode_minimal_from_pk(ep.title(), ep.podcast_id())?;
|
||||
let old = dbqueries::get_episode_minimal_from_pk(ep.title(), ep.show_id())?;
|
||||
let rowid = old.rowid();
|
||||
|
||||
if ep != old {
|
||||
@@ -204,7 +204,7 @@ mod tests {
|
||||
let file = fs::File::open(path).unwrap();
|
||||
let channel = Channel::read_from(BufReader::new(file)).unwrap();
|
||||
|
||||
let pd = NewPodcast::new(&channel, 42);
|
||||
let pd = NewShow::new(&channel, 42);
|
||||
assert_eq!(feed.parse_podcast(), pd);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
#![recursion_limit = "1024"]
|
||||
#![allow(unknown_lints)]
|
||||
#![cfg_attr(
|
||||
all(test, feature = "clippy"),
|
||||
allow(option_unwrap_used, result_unwrap_used)
|
||||
)]
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(option_map_unit_fn))]
|
||||
#![cfg_attr(
|
||||
feature = "clippy",
|
||||
warn(
|
||||
option_unwrap_used,
|
||||
result_unwrap_used,
|
||||
print_stdout,
|
||||
wrong_pub_self_convention,
|
||||
mut_mut,
|
||||
non_ascii_literal,
|
||||
similar_names,
|
||||
unicode_not_nfc,
|
||||
enum_glob_use,
|
||||
if_not_else,
|
||||
items_after_statements,
|
||||
used_underscore_binding
|
||||
)
|
||||
)]
|
||||
// Enable lint group collections
|
||||
#![warn(
|
||||
nonstandard_style,
|
||||
edition_2018,
|
||||
rust_2018_idioms,
|
||||
bad_style,
|
||||
unused
|
||||
)]
|
||||
// standalone lints
|
||||
#![warn(
|
||||
const_err,
|
||||
improper_ctypes,
|
||||
non_shorthand_field_patterns,
|
||||
no_mangle_generic_items,
|
||||
overflowing_literals,
|
||||
plugin_as_library,
|
||||
private_no_mangle_fns,
|
||||
private_no_mangle_statics,
|
||||
unconditional_recursion,
|
||||
unions_with_drop_fields,
|
||||
while_true,
|
||||
missing_debug_implementations,
|
||||
missing_docs,
|
||||
trivial_casts,
|
||||
trivial_numeric_casts,
|
||||
elided_lifetime_in_paths,
|
||||
missing_copy_implementations
|
||||
)]
|
||||
#![deny(warnings)]
|
||||
// warn when code is not using dyn Trait syntax. req rustc 1.27
|
||||
// #![deny(bare_trait_object)]
|
||||
|
||||
//! FIXME: Docs
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate pretty_assertions;
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate maplit;
|
||||
|
||||
#[macro_use]
|
||||
extern crate derive_builder;
|
||||
#[macro_use]
|
||||
extern crate diesel;
|
||||
#[macro_use]
|
||||
extern crate diesel_migrations;
|
||||
// #[macro_use]
|
||||
extern crate failure;
|
||||
#[macro_use]
|
||||
extern crate failure_derive;
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
extern crate ammonia;
|
||||
extern crate chrono;
|
||||
extern crate futures;
|
||||
extern crate hyper;
|
||||
extern crate hyper_tls;
|
||||
extern crate native_tls;
|
||||
extern crate num_cpus;
|
||||
extern crate rayon;
|
||||
extern crate rayon_futures;
|
||||
extern crate rfc822_sanitizer;
|
||||
extern crate rss;
|
||||
extern crate tokio_core;
|
||||
extern crate url;
|
||||
extern crate xdg;
|
||||
extern crate xml;
|
||||
|
||||
pub mod database;
|
||||
#[allow(missing_docs)]
|
||||
pub mod dbqueries;
|
||||
#[allow(missing_docs)]
|
||||
pub mod errors;
|
||||
mod feed;
|
||||
pub(crate) mod models;
|
||||
pub mod opml;
|
||||
mod parser;
|
||||
pub mod pipeline;
|
||||
mod schema;
|
||||
pub mod utils;
|
||||
|
||||
pub use feed::{Feed, FeedBuilder};
|
||||
pub use models::Save;
|
||||
pub use models::{Episode, EpisodeWidgetModel, Show, ShowCoverModel, Source};
|
||||
|
||||
// Set the user agent, See #53 for more
|
||||
// Keep this in sync with Tor-browser releases
|
||||
/// The user-agent to be used for all the requests.
|
||||
/// It originates from the Tor-browser UA.
|
||||
pub const USER_AGENT: &str = "Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0";
|
||||
|
||||
/// [XDG Base Direcotory](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) Paths.
|
||||
#[allow(missing_debug_implementations)]
|
||||
pub mod xdg_dirs {
|
||||
use std::path::PathBuf;
|
||||
use xdg;
|
||||
|
||||
lazy_static!{
|
||||
pub(crate) static ref PODCASTS_XDG: xdg::BaseDirectories = {
|
||||
xdg::BaseDirectories::with_prefix("gnome-podcasts").unwrap()
|
||||
};
|
||||
|
||||
/// XDG_DATA Directory `Pathbuf`.
|
||||
pub static ref PODCASTS_DATA: PathBuf = {
|
||||
PODCASTS_XDG.create_data_directory(PODCASTS_XDG.get_data_home()).unwrap()
|
||||
};
|
||||
|
||||
/// XDG_CONFIG Directory `Pathbuf`.
|
||||
pub static ref PODCASTS_CONFIG: PathBuf = {
|
||||
PODCASTS_XDG.create_config_directory(PODCASTS_XDG.get_config_home()).unwrap()
|
||||
};
|
||||
|
||||
/// XDG_CACHE Directory `Pathbuf`.
|
||||
pub static ref PODCASTS_CACHE: PathBuf = {
|
||||
PODCASTS_XDG.create_cache_directory(PODCASTS_XDG.get_cache_home()).unwrap()
|
||||
};
|
||||
|
||||
/// GNOME Podcasts Download Direcotry `PathBuf`.
|
||||
pub static ref DL_DIR: PathBuf = {
|
||||
PODCASTS_XDG.create_data_directory("Downloads").unwrap()
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -5,14 +5,14 @@ use diesel::SaveChangesDsl;
|
||||
|
||||
use database::connection;
|
||||
use errors::DataError;
|
||||
use models::{Podcast, Save};
|
||||
use schema::episode;
|
||||
use models::{Save, Show};
|
||||
use schema::episodes;
|
||||
|
||||
#[derive(Queryable, Identifiable, AsChangeset, Associations, PartialEq)]
|
||||
#[table_name = "episode"]
|
||||
#[table_name = "episodes"]
|
||||
#[changeset_options(treat_none_as_null = "true")]
|
||||
#[primary_key(title, podcast_id)]
|
||||
#[belongs_to(Podcast, foreign_key = "podcast_id")]
|
||||
#[primary_key(title, show_id)]
|
||||
#[belongs_to(Show, foreign_key = "show_id")]
|
||||
#[derive(Debug, Clone)]
|
||||
/// Diesel Model of the episode table.
|
||||
pub struct Episode {
|
||||
@@ -26,9 +26,7 @@ pub struct Episode {
|
||||
duration: Option<i32>,
|
||||
guid: Option<String>,
|
||||
played: Option<i32>,
|
||||
favorite: bool,
|
||||
archive: bool,
|
||||
podcast_id: i32,
|
||||
show_id: i32,
|
||||
}
|
||||
|
||||
impl Save<Episode> for Episode {
|
||||
@@ -55,11 +53,6 @@ impl Episode {
|
||||
&self.title
|
||||
}
|
||||
|
||||
/// Set the `title`.
|
||||
pub fn set_title(&mut self, value: &str) {
|
||||
self.title = value.to_string();
|
||||
}
|
||||
|
||||
/// Get the value of the `uri`.
|
||||
///
|
||||
/// Represents the url(usually) that the media file will be located at.
|
||||
@@ -67,11 +60,6 @@ impl Episode {
|
||||
self.uri.as_ref().map(|s| s.as_str())
|
||||
}
|
||||
|
||||
/// Set the `uri`.
|
||||
pub fn set_uri(&mut self, value: Option<&str>) {
|
||||
self.uri = value.map(|x| x.to_string());
|
||||
}
|
||||
|
||||
/// Get the value of the `local_uri`.
|
||||
///
|
||||
/// Represents the local uri,usually filesystem path,
|
||||
@@ -80,31 +68,16 @@ impl Episode {
|
||||
self.local_uri.as_ref().map(|s| s.as_str())
|
||||
}
|
||||
|
||||
/// Set the `local_uri`.
|
||||
pub fn set_local_uri(&mut self, value: Option<&str>) {
|
||||
self.local_uri = value.map(|x| x.to_string());
|
||||
}
|
||||
|
||||
/// Get the `description`.
|
||||
pub fn description(&self) -> Option<&str> {
|
||||
self.description.as_ref().map(|s| s.as_str())
|
||||
}
|
||||
|
||||
/// Set the `description`.
|
||||
pub fn set_description(&mut self, value: Option<&str>) {
|
||||
self.description = value.map(|x| x.to_string());
|
||||
}
|
||||
|
||||
/// Get the Episode's `guid`.
|
||||
pub fn guid(&self) -> Option<&str> {
|
||||
self.guid.as_ref().map(|s| s.as_str())
|
||||
}
|
||||
|
||||
/// Set the `guid`.
|
||||
pub fn set_guid(&mut self, value: Option<&str>) {
|
||||
self.guid = value.map(|x| x.to_string());
|
||||
}
|
||||
|
||||
/// Get the `epoch` value.
|
||||
///
|
||||
/// Retrieved from the rss Item publish date.
|
||||
@@ -113,11 +86,6 @@ impl Episode {
|
||||
self.epoch
|
||||
}
|
||||
|
||||
/// Set the `epoch`.
|
||||
pub fn set_epoch(&mut self, value: i32) {
|
||||
self.epoch = value;
|
||||
}
|
||||
|
||||
/// Get the `length`.
|
||||
///
|
||||
/// The number represents the size of the file in bytes.
|
||||
@@ -125,11 +93,6 @@ impl Episode {
|
||||
self.length
|
||||
}
|
||||
|
||||
/// Set the `length`.
|
||||
pub fn set_length(&mut self, value: Option<i32>) {
|
||||
self.length = value;
|
||||
}
|
||||
|
||||
/// Get the `duration` value.
|
||||
///
|
||||
/// The number represents the duration of the item/episode in seconds.
|
||||
@@ -137,11 +100,6 @@ impl Episode {
|
||||
self.duration
|
||||
}
|
||||
|
||||
/// Set the `duration`.
|
||||
pub fn set_duration(&mut self, value: Option<i32>) {
|
||||
self.duration = value;
|
||||
}
|
||||
|
||||
/// Epoch representation of the last time the episode was played.
|
||||
///
|
||||
/// None/Null for unplayed.
|
||||
@@ -149,54 +107,19 @@ impl Episode {
|
||||
self.played
|
||||
}
|
||||
|
||||
/// Set the `played` value.
|
||||
pub fn set_played(&mut self, value: Option<i32>) {
|
||||
self.played = value;
|
||||
}
|
||||
|
||||
/// Represents the archiving policy for the episode.
|
||||
pub fn archive(&self) -> bool {
|
||||
self.archive
|
||||
}
|
||||
|
||||
/// Set the `archive` policy.
|
||||
///
|
||||
/// If true, the download cleanr will ignore the episode
|
||||
/// and the corresponding media value will never be automaticly deleted.
|
||||
pub fn set_archive(&mut self, b: bool) {
|
||||
self.archive = b
|
||||
}
|
||||
|
||||
/// Get the `favorite` status of the `Episode`.
|
||||
pub fn favorite(&self) -> bool {
|
||||
self.favorite
|
||||
}
|
||||
|
||||
/// Set `favorite` status.
|
||||
pub fn set_favorite(&mut self, b: bool) {
|
||||
self.favorite = b
|
||||
}
|
||||
|
||||
/// `Podcast` table foreign key.
|
||||
pub fn podcast_id(&self) -> i32 {
|
||||
self.podcast_id
|
||||
}
|
||||
|
||||
/// Sets the `played` value with the current `epoch` timestap and save it.
|
||||
pub fn set_played_now(&mut self) -> Result<(), DataError> {
|
||||
let epoch = Utc::now().timestamp() as i32;
|
||||
self.set_played(Some(epoch));
|
||||
self.save().map(|_| ())
|
||||
/// `Show` table foreign key.
|
||||
pub fn show_id(&self) -> i32 {
|
||||
self.show_id
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Queryable, AsChangeset, PartialEq)]
|
||||
#[table_name = "episode"]
|
||||
#[table_name = "episodes"]
|
||||
#[changeset_options(treat_none_as_null = "true")]
|
||||
#[primary_key(title, podcast_id)]
|
||||
#[primary_key(title, show_id)]
|
||||
#[derive(Debug, Clone)]
|
||||
/// Diesel Model to be used for constructing `EpisodeWidgets`.
|
||||
pub struct EpisodeWidgetQuery {
|
||||
pub struct EpisodeWidgetModel {
|
||||
rowid: i32,
|
||||
title: String,
|
||||
uri: Option<String>,
|
||||
@@ -205,14 +128,12 @@ pub struct EpisodeWidgetQuery {
|
||||
length: Option<i32>,
|
||||
duration: Option<i32>,
|
||||
played: Option<i32>,
|
||||
// favorite: bool,
|
||||
// archive: bool,
|
||||
podcast_id: i32,
|
||||
show_id: i32,
|
||||
}
|
||||
|
||||
impl From<Episode> for EpisodeWidgetQuery {
|
||||
fn from(e: Episode) -> EpisodeWidgetQuery {
|
||||
EpisodeWidgetQuery {
|
||||
impl From<Episode> for EpisodeWidgetModel {
|
||||
fn from(e: Episode) -> EpisodeWidgetModel {
|
||||
EpisodeWidgetModel {
|
||||
rowid: e.rowid,
|
||||
title: e.title,
|
||||
uri: e.uri,
|
||||
@@ -221,30 +142,30 @@ impl From<Episode> for EpisodeWidgetQuery {
|
||||
length: e.length,
|
||||
duration: e.duration,
|
||||
played: e.played,
|
||||
podcast_id: e.podcast_id,
|
||||
show_id: e.show_id,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Save<usize> for EpisodeWidgetQuery {
|
||||
impl Save<usize> for EpisodeWidgetModel {
|
||||
type Error = DataError;
|
||||
|
||||
/// Helper method to easily save/"sync" current state of self to the
|
||||
/// Database.
|
||||
fn save(&self) -> Result<usize, Self::Error> {
|
||||
use schema::episode::dsl::*;
|
||||
use schema::episodes::dsl::*;
|
||||
|
||||
let db = connection();
|
||||
let tempdb = db.get()?;
|
||||
|
||||
diesel::update(episode.filter(rowid.eq(self.rowid)))
|
||||
diesel::update(episodes.filter(rowid.eq(self.rowid)))
|
||||
.set(self)
|
||||
.execute(&*tempdb)
|
||||
.map_err(From::from)
|
||||
}
|
||||
}
|
||||
|
||||
impl EpisodeWidgetQuery {
|
||||
impl EpisodeWidgetModel {
|
||||
/// Get the value of the sqlite's `ROW_ID`
|
||||
pub fn rowid(&self) -> i32 {
|
||||
self.rowid
|
||||
@@ -302,11 +223,6 @@ impl EpisodeWidgetQuery {
|
||||
self.duration
|
||||
}
|
||||
|
||||
/// Set the `duration`.
|
||||
pub fn set_duration(&mut self, value: Option<i32>) {
|
||||
self.duration = value;
|
||||
}
|
||||
|
||||
/// Epoch representation of the last time the episode was played.
|
||||
///
|
||||
/// None/Null for unplayed.
|
||||
@@ -315,36 +231,13 @@ impl EpisodeWidgetQuery {
|
||||
}
|
||||
|
||||
/// Set the `played` value.
|
||||
pub fn set_played(&mut self, value: Option<i32>) {
|
||||
fn set_played(&mut self, value: Option<i32>) {
|
||||
self.played = value;
|
||||
}
|
||||
|
||||
// /// Represents the archiving policy for the episode.
|
||||
// pub fn archive(&self) -> bool {
|
||||
// self.archive
|
||||
// }
|
||||
|
||||
// /// Set the `archive` policy.
|
||||
// ///
|
||||
// /// If true, the download cleanr will ignore the episode
|
||||
// /// and the corresponding media value will never be automaticly deleted.
|
||||
// pub fn set_archive(&mut self, b: bool) {
|
||||
// self.archive = b
|
||||
// }
|
||||
|
||||
// /// Get the `favorite` status of the `Episode`.
|
||||
// pub fn favorite(&self) -> bool {
|
||||
// self.favorite
|
||||
// }
|
||||
|
||||
// /// Set `favorite` status.
|
||||
// pub fn set_favorite(&mut self, b: bool) {
|
||||
// self.favorite = b
|
||||
// }
|
||||
|
||||
/// `Podcast` table foreign key.
|
||||
pub fn podcast_id(&self) -> i32 {
|
||||
self.podcast_id
|
||||
/// `Show` table foreign key.
|
||||
pub fn show_id(&self) -> i32 {
|
||||
self.show_id
|
||||
}
|
||||
|
||||
/// Sets the `played` value with the current `epoch` timestap and save it.
|
||||
@@ -356,38 +249,38 @@ impl EpisodeWidgetQuery {
|
||||
}
|
||||
|
||||
#[derive(Queryable, AsChangeset, PartialEq)]
|
||||
#[table_name = "episode"]
|
||||
#[table_name = "episodes"]
|
||||
#[changeset_options(treat_none_as_null = "true")]
|
||||
#[primary_key(title, podcast_id)]
|
||||
#[primary_key(title, show_id)]
|
||||
#[derive(Debug, Clone)]
|
||||
/// Diesel Model to be used internal with the `utils::checkup` function.
|
||||
pub struct EpisodeCleanerQuery {
|
||||
pub struct EpisodeCleanerModel {
|
||||
rowid: i32,
|
||||
local_uri: Option<String>,
|
||||
played: Option<i32>,
|
||||
}
|
||||
|
||||
impl Save<usize> for EpisodeCleanerQuery {
|
||||
impl Save<usize> for EpisodeCleanerModel {
|
||||
type Error = DataError;
|
||||
|
||||
/// Helper method to easily save/"sync" current state of self to the
|
||||
/// Database.
|
||||
fn save(&self) -> Result<usize, Self::Error> {
|
||||
use schema::episode::dsl::*;
|
||||
use schema::episodes::dsl::*;
|
||||
|
||||
let db = connection();
|
||||
let tempdb = db.get()?;
|
||||
|
||||
diesel::update(episode.filter(rowid.eq(self.rowid)))
|
||||
diesel::update(episodes.filter(rowid.eq(self.rowid)))
|
||||
.set(self)
|
||||
.execute(&*tempdb)
|
||||
.map_err(From::from)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Episode> for EpisodeCleanerQuery {
|
||||
fn from(e: Episode) -> EpisodeCleanerQuery {
|
||||
EpisodeCleanerQuery {
|
||||
impl From<Episode> for EpisodeCleanerModel {
|
||||
fn from(e: Episode) -> EpisodeCleanerModel {
|
||||
EpisodeCleanerModel {
|
||||
rowid: e.rowid(),
|
||||
local_uri: e.local_uri,
|
||||
played: e.played,
|
||||
@@ -395,7 +288,7 @@ impl From<Episode> for EpisodeCleanerQuery {
|
||||
}
|
||||
}
|
||||
|
||||
impl EpisodeCleanerQuery {
|
||||
impl EpisodeCleanerModel {
|
||||
/// Get the value of the sqlite's `ROW_ID`
|
||||
pub fn rowid(&self) -> i32 {
|
||||
self.rowid
|
||||
@@ -428,9 +321,9 @@ impl EpisodeCleanerQuery {
|
||||
}
|
||||
|
||||
#[derive(Queryable, AsChangeset, PartialEq)]
|
||||
#[table_name = "episode"]
|
||||
#[table_name = "episodes"]
|
||||
#[changeset_options(treat_none_as_null = "true")]
|
||||
#[primary_key(title, podcast_id)]
|
||||
#[primary_key(title, show_id)]
|
||||
#[derive(Debug, Clone)]
|
||||
/// Diesel Model to be used for FIXME.
|
||||
pub struct EpisodeMinimal {
|
||||
@@ -438,9 +331,10 @@ pub struct EpisodeMinimal {
|
||||
title: String,
|
||||
uri: Option<String>,
|
||||
epoch: i32,
|
||||
length: Option<i32>,
|
||||
duration: Option<i32>,
|
||||
guid: Option<String>,
|
||||
podcast_id: i32,
|
||||
show_id: i32,
|
||||
}
|
||||
|
||||
impl From<Episode> for EpisodeMinimal {
|
||||
@@ -449,10 +343,11 @@ impl From<Episode> for EpisodeMinimal {
|
||||
rowid: e.rowid,
|
||||
title: e.title,
|
||||
uri: e.uri,
|
||||
length: e.length,
|
||||
guid: e.guid,
|
||||
epoch: e.epoch,
|
||||
duration: e.duration,
|
||||
podcast_id: e.podcast_id,
|
||||
show_id: e.show_id,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -488,6 +383,13 @@ impl EpisodeMinimal {
|
||||
self.epoch
|
||||
}
|
||||
|
||||
/// Get the `length`.
|
||||
///
|
||||
/// The number represents the size of the file in bytes.
|
||||
pub fn length(&self) -> Option<i32> {
|
||||
self.length
|
||||
}
|
||||
|
||||
/// Get the `duration` value.
|
||||
///
|
||||
/// The number represents the duration of the item/episode in seconds.
|
||||
@@ -495,8 +397,8 @@ impl EpisodeMinimal {
|
||||
self.duration
|
||||
}
|
||||
|
||||
/// `Podcast` table foreign key.
|
||||
pub fn podcast_id(&self) -> i32 {
|
||||
self.podcast_id
|
||||
/// `Show` table foreign key.
|
||||
pub fn show_id(&self) -> i32 {
|
||||
self.show_id
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,26 @@
|
||||
mod new_episode;
|
||||
mod new_podcast;
|
||||
mod new_show;
|
||||
mod new_source;
|
||||
|
||||
mod episode;
|
||||
mod podcast;
|
||||
mod show;
|
||||
mod source;
|
||||
|
||||
// use futures::prelude::*;
|
||||
// use futures::future::*;
|
||||
|
||||
pub(crate) use self::episode::EpisodeCleanerQuery;
|
||||
pub(crate) use self::episode::EpisodeCleanerModel;
|
||||
pub(crate) use self::new_episode::{NewEpisode, NewEpisodeMinimal};
|
||||
pub(crate) use self::new_podcast::NewPodcast;
|
||||
pub(crate) use self::new_show::NewShow;
|
||||
pub(crate) use self::new_source::NewSource;
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) use self::new_episode::NewEpisodeBuilder;
|
||||
#[cfg(test)]
|
||||
pub(crate) use self::new_podcast::NewPodcastBuilder;
|
||||
pub(crate) use self::new_show::NewShowBuilder;
|
||||
|
||||
pub use self::episode::{Episode, EpisodeMinimal, EpisodeWidgetQuery};
|
||||
pub use self::podcast::{Podcast, PodcastCoverQuery};
|
||||
pub use self::episode::{Episode, EpisodeMinimal, EpisodeWidgetModel};
|
||||
pub use self::show::{Show, ShowCoverModel};
|
||||
pub use self::source::Source;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
@@ -9,11 +9,11 @@ use dbqueries;
|
||||
use errors::DataError;
|
||||
use models::{Episode, EpisodeMinimal, Index, Insert, Update};
|
||||
use parser;
|
||||
use schema::episode;
|
||||
use schema::episodes;
|
||||
use utils::url_cleaner;
|
||||
|
||||
#[derive(Insertable, AsChangeset)]
|
||||
#[table_name = "episode"]
|
||||
#[table_name = "episodes"]
|
||||
#[derive(Debug, Clone, Default, Builder, PartialEq)]
|
||||
#[builder(default)]
|
||||
#[builder(derive(Debug))]
|
||||
@@ -26,7 +26,7 @@ pub(crate) struct NewEpisode {
|
||||
duration: Option<i32>,
|
||||
guid: Option<String>,
|
||||
epoch: i32,
|
||||
podcast_id: i32,
|
||||
show_id: i32,
|
||||
}
|
||||
|
||||
impl From<NewEpisodeMinimal> for NewEpisode {
|
||||
@@ -36,7 +36,7 @@ impl From<NewEpisodeMinimal> for NewEpisode {
|
||||
.uri(e.uri)
|
||||
.duration(e.duration)
|
||||
.epoch(e.epoch)
|
||||
.podcast_id(e.podcast_id)
|
||||
.show_id(e.show_id)
|
||||
.guid(e.guid)
|
||||
.build()
|
||||
.unwrap()
|
||||
@@ -47,12 +47,12 @@ impl Insert<()> for NewEpisode {
|
||||
type Error = DataError;
|
||||
|
||||
fn insert(&self) -> Result<(), DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
use schema::episodes::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
info!("Inserting {:?}", self.title);
|
||||
diesel::insert_into(episode)
|
||||
diesel::insert_into(episodes)
|
||||
.values(self)
|
||||
.execute(&con)
|
||||
.map_err(From::from)
|
||||
@@ -64,12 +64,12 @@ impl Update<()> for NewEpisode {
|
||||
type Error = DataError;
|
||||
|
||||
fn update(&self, episode_id: i32) -> Result<(), DataError> {
|
||||
use schema::episode::dsl::*;
|
||||
use schema::episodes::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
info!("Updating {:?}", self.title);
|
||||
diesel::update(episode.filter(rowid.eq(episode_id)))
|
||||
diesel::update(episodes.filter(rowid.eq(episode_id)))
|
||||
.set(self)
|
||||
.execute(&con)
|
||||
.map_err(From::from)
|
||||
@@ -83,10 +83,10 @@ impl Index<()> for NewEpisode {
|
||||
// Does not update the episode description if it's the only thing that has
|
||||
// changed.
|
||||
fn index(&self) -> Result<(), DataError> {
|
||||
let exists = dbqueries::episode_exists(self.title(), self.podcast_id())?;
|
||||
let exists = dbqueries::episode_exists(self.title(), self.show_id())?;
|
||||
|
||||
if exists {
|
||||
let other = dbqueries::get_episode_minimal_from_pk(self.title(), self.podcast_id())?;
|
||||
let other = dbqueries::get_episode_minimal_from_pk(self.title(), self.show_id())?;
|
||||
|
||||
if self != &other {
|
||||
self.update(other.rowid())
|
||||
@@ -106,7 +106,7 @@ impl PartialEq<EpisodeMinimal> for NewEpisode {
|
||||
&& (self.duration() == other.duration())
|
||||
&& (self.epoch() == other.epoch())
|
||||
&& (self.guid() == other.guid())
|
||||
&& (self.podcast_id() == other.podcast_id())
|
||||
&& (self.show_id() == other.show_id())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ impl PartialEq<Episode> for NewEpisode {
|
||||
&& (self.duration() == other.duration())
|
||||
&& (self.epoch() == other.epoch())
|
||||
&& (self.guid() == other.guid())
|
||||
&& (self.podcast_id() == other.podcast_id())
|
||||
&& (self.show_id() == other.show_id())
|
||||
&& (self.description() == other.description())
|
||||
&& (self.length() == other.length())
|
||||
}
|
||||
@@ -126,14 +126,14 @@ impl PartialEq<Episode> for NewEpisode {
|
||||
impl NewEpisode {
|
||||
/// Parses an `rss::Item` into a `NewEpisode` Struct.
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn new(item: &rss::Item, podcast_id: i32) -> Result<Self, DataError> {
|
||||
NewEpisodeMinimal::new(item, podcast_id).map(|ep| ep.into_new_episode(item))
|
||||
pub(crate) fn new(item: &rss::Item, show_id: i32) -> Result<Self, DataError> {
|
||||
NewEpisodeMinimal::new(item, show_id).map(|ep| ep.into_new_episode(item))
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn to_episode(&self) -> Result<Episode, DataError> {
|
||||
self.index()?;
|
||||
dbqueries::get_episode_from_pk(&self.title, self.podcast_id).map_err(From::from)
|
||||
dbqueries::get_episode_from_pk(&self.title, self.show_id).map_err(From::from)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,23 +167,24 @@ impl NewEpisode {
|
||||
self.length
|
||||
}
|
||||
|
||||
pub(crate) fn podcast_id(&self) -> i32 {
|
||||
self.podcast_id
|
||||
pub(crate) fn show_id(&self) -> i32 {
|
||||
self.show_id
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Insertable, AsChangeset)]
|
||||
#[table_name = "episode"]
|
||||
#[table_name = "episodes"]
|
||||
#[derive(Debug, Clone, Builder, PartialEq)]
|
||||
#[builder(derive(Debug))]
|
||||
#[builder(setter(into))]
|
||||
pub(crate) struct NewEpisodeMinimal {
|
||||
title: String,
|
||||
uri: Option<String>,
|
||||
length: Option<i32>,
|
||||
duration: Option<i32>,
|
||||
epoch: i32,
|
||||
guid: Option<String>,
|
||||
podcast_id: i32,
|
||||
show_id: i32,
|
||||
}
|
||||
|
||||
impl PartialEq<EpisodeMinimal> for NewEpisodeMinimal {
|
||||
@@ -193,7 +194,7 @@ impl PartialEq<EpisodeMinimal> for NewEpisodeMinimal {
|
||||
&& (self.duration() == other.duration())
|
||||
&& (self.epoch() == other.epoch())
|
||||
&& (self.guid() == other.guid())
|
||||
&& (self.podcast_id() == other.podcast_id())
|
||||
&& (self.show_id() == other.show_id())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,12 +212,19 @@ impl NewEpisodeMinimal {
|
||||
let title = item.title().unwrap().trim().to_owned();
|
||||
let guid = item.guid().map(|s| s.value().trim().to_owned());
|
||||
|
||||
let uri = item.enclosure()
|
||||
.map(|s| url_cleaner(s.url().trim()))
|
||||
// Get the mime type, the `http` url and the length from the enclosure
|
||||
// http://www.rssboard.org/rss-specification#ltenclosuregtSubelementOfLtitemgt
|
||||
let enc = item.enclosure();
|
||||
|
||||
// Get the url
|
||||
let uri = enc.map(|s| url_cleaner(s.url().trim()))
|
||||
// Fallback to Rss.Item.link if enclosure is None.
|
||||
.or_else(|| item.link().map(|s| url_cleaner(s.trim())));
|
||||
|
||||
// If url is still None return an Error as this behaviour is
|
||||
// Get the size of the content, it should be in bytes
|
||||
let length = enc.and_then(|x| x.length().parse().ok());
|
||||
|
||||
// If url is still None return an Error as this behaviour is not
|
||||
// compliant with the RSS Spec.
|
||||
if uri.is_none() {
|
||||
let err = DataError::ParseEpisodeError {
|
||||
@@ -238,17 +246,18 @@ impl NewEpisodeMinimal {
|
||||
NewEpisodeMinimalBuilder::default()
|
||||
.title(title)
|
||||
.uri(uri)
|
||||
.length(length)
|
||||
.duration(duration)
|
||||
.epoch(epoch)
|
||||
.guid(guid)
|
||||
.podcast_id(parent_id)
|
||||
.show_id(parent_id)
|
||||
.build()
|
||||
.map_err(From::from)
|
||||
}
|
||||
|
||||
// TODO: TryInto is stabilizing in rustc v1.26!
|
||||
// ^ Jokes on you past self!
|
||||
pub(crate) fn into_new_episode(self, item: &rss::Item) -> NewEpisode {
|
||||
let length = item.enclosure().and_then(|x| x.length().parse().ok());
|
||||
let description = item.description().and_then(|s| {
|
||||
let sanitized_html = ammonia::Builder::new()
|
||||
// Remove `rel` attributes from `<a>` tags
|
||||
@@ -263,9 +272,9 @@ impl NewEpisodeMinimal {
|
||||
.uri(self.uri)
|
||||
.duration(self.duration)
|
||||
.epoch(self.epoch)
|
||||
.podcast_id(self.podcast_id)
|
||||
.show_id(self.show_id)
|
||||
.guid(self.guid)
|
||||
.length(length)
|
||||
.length(self.length)
|
||||
.description(description)
|
||||
.build()
|
||||
.unwrap()
|
||||
@@ -294,10 +303,11 @@ impl NewEpisodeMinimal {
|
||||
self.epoch
|
||||
}
|
||||
|
||||
pub(crate) fn podcast_id(&self) -> i32 {
|
||||
self.podcast_id
|
||||
pub(crate) fn show_id(&self) -> i32 {
|
||||
self.show_id
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use database::truncate_db;
|
||||
@@ -323,8 +333,9 @@ mod tests {
|
||||
)))
|
||||
.guid(Some(String::from("7df4070a-9832-11e7-adac-cb37b05d5e24")))
|
||||
.epoch(1505296800)
|
||||
.length(Some(66738886))
|
||||
.duration(Some(4171))
|
||||
.podcast_id(42)
|
||||
.show_id(42)
|
||||
.build()
|
||||
.unwrap()
|
||||
};
|
||||
@@ -336,8 +347,9 @@ mod tests {
|
||||
)))
|
||||
.guid(Some(String::from("7c207a24-e33f-11e6-9438-eb45dcf36a1d")))
|
||||
.epoch(1502272800)
|
||||
.length(Some(67527575))
|
||||
.duration(Some(4415))
|
||||
.podcast_id(42)
|
||||
.show_id(42)
|
||||
.build()
|
||||
.unwrap()
|
||||
};
|
||||
@@ -358,7 +370,7 @@ mod tests {
|
||||
.length(Some(66738886))
|
||||
.epoch(1505296800)
|
||||
.duration(Some(4171))
|
||||
.podcast_id(42)
|
||||
.show_id(42)
|
||||
.build()
|
||||
.unwrap()
|
||||
};
|
||||
@@ -382,7 +394,7 @@ mod tests {
|
||||
.length(Some(67527575))
|
||||
.epoch(1502272800)
|
||||
.duration(Some(4415))
|
||||
.podcast_id(42)
|
||||
.show_id(42)
|
||||
.build()
|
||||
.unwrap()
|
||||
};
|
||||
@@ -397,7 +409,7 @@ mod tests {
|
||||
.length(Some(66738886))
|
||||
.epoch(1505296800)
|
||||
.duration(Some(424242))
|
||||
.podcast_id(42)
|
||||
.show_id(42)
|
||||
.build()
|
||||
.unwrap()
|
||||
};
|
||||
@@ -408,9 +420,10 @@ mod tests {
|
||||
"http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/lup-0214.mp3",
|
||||
)))
|
||||
.guid(Some(String::from("78A682B4-73E8-47B8-88C0-1BE62DD4EF9D")))
|
||||
.length(Some(46479789))
|
||||
.epoch(1505280282)
|
||||
.duration(Some(5733))
|
||||
.podcast_id(42)
|
||||
.show_id(42)
|
||||
.build()
|
||||
.unwrap()
|
||||
};
|
||||
@@ -422,8 +435,9 @@ mod tests {
|
||||
)))
|
||||
.guid(Some(String::from("1CE57548-B36C-4F14-832A-5D5E0A24E35B")))
|
||||
.epoch(1504670247)
|
||||
.length(Some(36544272))
|
||||
.duration(Some(4491))
|
||||
.podcast_id(42)
|
||||
.show_id(42)
|
||||
.build()
|
||||
.unwrap()
|
||||
};
|
||||
@@ -443,7 +457,7 @@ mod tests {
|
||||
.length(Some(46479789))
|
||||
.epoch(1505280282)
|
||||
.duration(Some(5733))
|
||||
.podcast_id(42)
|
||||
.show_id(42)
|
||||
.build()
|
||||
.unwrap()
|
||||
};
|
||||
@@ -465,7 +479,7 @@ mod tests {
|
||||
.length(Some(36544272))
|
||||
.epoch(1504670247)
|
||||
.duration(Some(4491))
|
||||
.podcast_id(42)
|
||||
.show_id(42)
|
||||
.build()
|
||||
.unwrap()
|
||||
};
|
||||
@@ -539,6 +553,10 @@ mod tests {
|
||||
let ep = EXPECTED_MINIMAL_INTERCEPTED_1
|
||||
.clone()
|
||||
.into_new_episode(&item);
|
||||
println!(
|
||||
"EPISODE: {:#?}\nEXPECTED: {:#?}",
|
||||
ep, *EXPECTED_INTERCEPTED_1
|
||||
);
|
||||
assert_eq!(ep, *EXPECTED_INTERCEPTED_1);
|
||||
|
||||
let item = channel.items().iter().nth(15).unwrap();
|
||||
@@ -558,7 +576,7 @@ mod tests {
|
||||
let episode = channel.items().iter().nth(14).unwrap();
|
||||
let new_ep = NewEpisode::new(&episode, 42).unwrap();
|
||||
new_ep.insert().unwrap();
|
||||
let ep = dbqueries::get_episode_from_pk(new_ep.title(), new_ep.podcast_id()).unwrap();
|
||||
let ep = dbqueries::get_episode_from_pk(new_ep.title(), new_ep.show_id()).unwrap();
|
||||
|
||||
assert_eq!(new_ep, ep);
|
||||
assert_eq!(&new_ep, &*EXPECTED_INTERCEPTED_1);
|
||||
@@ -567,7 +585,7 @@ mod tests {
|
||||
let episode = channel.items().iter().nth(15).unwrap();
|
||||
let new_ep = NewEpisode::new(&episode, 42).unwrap();
|
||||
new_ep.insert().unwrap();
|
||||
let ep = dbqueries::get_episode_from_pk(new_ep.title(), new_ep.podcast_id()).unwrap();
|
||||
let ep = dbqueries::get_episode_from_pk(new_ep.title(), new_ep.show_id()).unwrap();
|
||||
|
||||
assert_eq!(new_ep, ep);
|
||||
assert_eq!(&new_ep, &*EXPECTED_INTERCEPTED_2);
|
||||
@@ -581,21 +599,15 @@ mod tests {
|
||||
|
||||
let updated = &*UPDATED_DURATION_INTERCEPTED_1;
|
||||
updated.update(old.rowid()).unwrap();
|
||||
let mut new = dbqueries::get_episode_from_pk(old.title(), old.podcast_id()).unwrap();
|
||||
let new = dbqueries::get_episode_from_pk(old.title(), old.show_id()).unwrap();
|
||||
|
||||
// Assert that updating does not change the rowid and podcast_id
|
||||
// Assert that updating does not change the rowid and show_id
|
||||
assert_ne!(old, new);
|
||||
assert_eq!(old.rowid(), new.rowid());
|
||||
assert_eq!(old.podcast_id(), new.podcast_id());
|
||||
assert_eq!(old.show_id(), new.show_id());
|
||||
|
||||
assert_eq!(updated, &new);
|
||||
assert_ne!(updated, &old);
|
||||
|
||||
new.set_archive(true);
|
||||
new.save().unwrap();
|
||||
|
||||
let new2 = dbqueries::get_episode_from_pk(old.title(), old.podcast_id()).unwrap();
|
||||
assert_eq!(true, new2.archive());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -608,7 +620,7 @@ mod tests {
|
||||
// Second identical, This should take the early return path
|
||||
assert!(expected.index().is_ok());
|
||||
// Get the episode
|
||||
let old = dbqueries::get_episode_from_pk(expected.title(), expected.podcast_id()).unwrap();
|
||||
let old = dbqueries::get_episode_from_pk(expected.title(), expected.show_id()).unwrap();
|
||||
// Assert that NewPodcast is equal to the Indexed one
|
||||
assert_eq!(*expected, old);
|
||||
|
||||
@@ -617,23 +629,22 @@ mod tests {
|
||||
// Update the podcast
|
||||
assert!(updated.index().is_ok());
|
||||
// Get the new Podcast
|
||||
let new = dbqueries::get_episode_from_pk(expected.title(), expected.podcast_id()).unwrap();
|
||||
let new = dbqueries::get_episode_from_pk(expected.title(), expected.show_id()).unwrap();
|
||||
// Assert it's diff from the old one.
|
||||
assert_ne!(new, old);
|
||||
assert_eq!(*updated, new);
|
||||
assert_eq!(new.rowid(), old.rowid());
|
||||
assert_eq!(new.podcast_id(), old.podcast_id());
|
||||
assert_eq!(new.show_id(), old.show_id());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_new_episode_to_episode() {
|
||||
let expected = &*EXPECTED_INTERCEPTED_1;
|
||||
let updated = &*UPDATED_DURATION_INTERCEPTED_1;
|
||||
|
||||
// Assert insert() produces the same result that you would get with to_podcast()
|
||||
truncate_db().unwrap();
|
||||
expected.insert().unwrap();
|
||||
let old = dbqueries::get_episode_from_pk(expected.title(), expected.podcast_id()).unwrap();
|
||||
let old = dbqueries::get_episode_from_pk(expected.title(), expected.show_id()).unwrap();
|
||||
let ep = expected.to_episode().unwrap();
|
||||
assert_eq!(old, ep);
|
||||
|
||||
@@ -642,17 +653,7 @@ mod tests {
|
||||
let ep = expected.to_episode().unwrap();
|
||||
// This should error as a unique constrain violation
|
||||
assert!(expected.insert().is_err());
|
||||
let mut old =
|
||||
dbqueries::get_episode_from_pk(expected.title(), expected.podcast_id()).unwrap();
|
||||
let old = dbqueries::get_episode_from_pk(expected.title(), expected.show_id()).unwrap();
|
||||
assert_eq!(old, ep);
|
||||
|
||||
old.set_archive(true);
|
||||
old.save().unwrap();
|
||||
|
||||
// Assert that it does not mess with user preferences
|
||||
let ep = updated.to_episode().unwrap();
|
||||
let old = dbqueries::get_episode_from_pk(expected.title(), expected.podcast_id()).unwrap();
|
||||
assert_eq!(old, ep);
|
||||
assert_eq!(old.archive(), true);
|
||||
}
|
||||
}
|
||||
@@ -4,21 +4,21 @@ use diesel::prelude::*;
|
||||
use rss;
|
||||
|
||||
use errors::DataError;
|
||||
use models::Podcast;
|
||||
use models::Show;
|
||||
use models::{Index, Insert, Update};
|
||||
use schema::podcast;
|
||||
use schema::shows;
|
||||
|
||||
use database::connection;
|
||||
use dbqueries;
|
||||
use utils::url_cleaner;
|
||||
|
||||
#[derive(Insertable, AsChangeset)]
|
||||
#[table_name = "podcast"]
|
||||
#[table_name = "shows"]
|
||||
#[derive(Debug, Clone, Default, Builder, PartialEq)]
|
||||
#[builder(default)]
|
||||
#[builder(derive(Debug))]
|
||||
#[builder(setter(into))]
|
||||
pub(crate) struct NewPodcast {
|
||||
pub(crate) struct NewShow {
|
||||
title: String,
|
||||
link: String,
|
||||
description: String,
|
||||
@@ -26,15 +26,15 @@ pub(crate) struct NewPodcast {
|
||||
source_id: i32,
|
||||
}
|
||||
|
||||
impl Insert<()> for NewPodcast {
|
||||
impl Insert<()> for NewShow {
|
||||
type Error = DataError;
|
||||
|
||||
fn insert(&self) -> Result<(), Self::Error> {
|
||||
use schema::podcast::dsl::*;
|
||||
use schema::shows::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
diesel::insert_into(podcast)
|
||||
diesel::insert_into(shows)
|
||||
.values(self)
|
||||
.execute(&con)
|
||||
.map(|_| ())
|
||||
@@ -42,16 +42,16 @@ impl Insert<()> for NewPodcast {
|
||||
}
|
||||
}
|
||||
|
||||
impl Update<()> for NewPodcast {
|
||||
impl Update<()> for NewShow {
|
||||
type Error = DataError;
|
||||
|
||||
fn update(&self, podcast_id: i32) -> Result<(), Self::Error> {
|
||||
use schema::podcast::dsl::*;
|
||||
fn update(&self, show_id: i32) -> Result<(), Self::Error> {
|
||||
use schema::shows::dsl::*;
|
||||
let db = connection();
|
||||
let con = db.get()?;
|
||||
|
||||
info!("Updating {}", self.title);
|
||||
diesel::update(podcast.filter(id.eq(podcast_id)))
|
||||
diesel::update(shows.filter(id.eq(show_id)))
|
||||
.set(self)
|
||||
.execute(&con)
|
||||
.map(|_| ())
|
||||
@@ -61,7 +61,7 @@ impl Update<()> for NewPodcast {
|
||||
|
||||
// TODO: Maybe return an Enum<Action(Resut)> Instead.
|
||||
// It would make unti testing better too.
|
||||
impl Index<()> for NewPodcast {
|
||||
impl Index<()> for NewShow {
|
||||
type Error = DataError;
|
||||
|
||||
fn index(&self) -> Result<(), DataError> {
|
||||
@@ -81,8 +81,8 @@ impl Index<()> for NewPodcast {
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq<Podcast> for NewPodcast {
|
||||
fn eq(&self, other: &Podcast) -> bool {
|
||||
impl PartialEq<Show> for NewShow {
|
||||
fn eq(&self, other: &Show) -> bool {
|
||||
(self.link() == other.link())
|
||||
&& (self.title() == other.title())
|
||||
&& (self.image_uri() == other.image_uri())
|
||||
@@ -91,9 +91,9 @@ impl PartialEq<Podcast> for NewPodcast {
|
||||
}
|
||||
}
|
||||
|
||||
impl NewPodcast {
|
||||
/// Parses a `rss::Channel` into a `NewPodcast` Struct.
|
||||
pub(crate) fn new(chan: &rss::Channel, source_id: i32) -> NewPodcast {
|
||||
impl NewShow {
|
||||
/// Parses a `rss::Channel` into a `NewShow` Struct.
|
||||
pub(crate) fn new(chan: &rss::Channel, source_id: i32) -> NewShow {
|
||||
let title = chan.title().trim();
|
||||
let link = url_cleaner(chan.link().trim());
|
||||
|
||||
@@ -111,7 +111,7 @@ impl NewPodcast {
|
||||
// If itunes is None, try to get the channel.image from the rss spec
|
||||
let image_uri = itunes_img.or_else(|| chan.image().map(|s| s.url().trim().to_owned()));
|
||||
|
||||
NewPodcastBuilder::default()
|
||||
NewShowBuilder::default()
|
||||
.title(title)
|
||||
.description(description)
|
||||
.link(link)
|
||||
@@ -122,14 +122,14 @@ impl NewPodcast {
|
||||
}
|
||||
|
||||
// Look out for when tryinto lands into stable.
|
||||
pub(crate) fn to_podcast(&self) -> Result<Podcast, DataError> {
|
||||
pub(crate) fn to_podcast(&self) -> Result<Show, DataError> {
|
||||
self.index()?;
|
||||
dbqueries::get_podcast_from_source_id(self.source_id).map_err(From::from)
|
||||
}
|
||||
}
|
||||
|
||||
// Ignore the following geters. They are used in unit tests mainly.
|
||||
impl NewPodcast {
|
||||
impl NewShow {
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn source_id(&self) -> i32 {
|
||||
self.source_id
|
||||
@@ -160,14 +160,14 @@ mod tests {
|
||||
use rss::Channel;
|
||||
|
||||
use database::truncate_db;
|
||||
use models::{NewPodcastBuilder, Save};
|
||||
use models::NewShowBuilder;
|
||||
|
||||
use std::fs::File;
|
||||
use std::io::BufReader;
|
||||
|
||||
// Pre-built expected NewPodcast structs.
|
||||
// Pre-built expected NewShow structs.
|
||||
lazy_static! {
|
||||
static ref EXPECTED_INTERCEPTED: NewPodcast = {
|
||||
static ref EXPECTED_INTERCEPTED: NewShow = {
|
||||
let descr = "The people behind The Intercept’s fearless reporting and incisive \
|
||||
commentary—Jeremy Scahill, Glenn Greenwald, Betsy Reed and \
|
||||
others—discuss the crucial issues of our time: national security, civil \
|
||||
@@ -175,7 +175,7 @@ mod tests {
|
||||
artists, thinkers, and newsmakers who challenge our preconceptions about \
|
||||
the world we live in.";
|
||||
|
||||
NewPodcastBuilder::default()
|
||||
NewShowBuilder::default()
|
||||
.title("Intercepted with Jeremy Scahill")
|
||||
.link("https://theintercept.com/podcasts")
|
||||
.description(descr)
|
||||
@@ -188,12 +188,12 @@ mod tests {
|
||||
.build()
|
||||
.unwrap()
|
||||
};
|
||||
static ref EXPECTED_LUP: NewPodcast = {
|
||||
static ref EXPECTED_LUP: NewShow = {
|
||||
let descr = "An open show powered by community LINUX Unplugged takes the best \
|
||||
attributes of open collaboration and focuses them into a weekly \
|
||||
lifestyle show about Linux.";
|
||||
|
||||
NewPodcastBuilder::default()
|
||||
NewShowBuilder::default()
|
||||
.title("LINUX Unplugged Podcast")
|
||||
.link("http://www.jupiterbroadcasting.com/")
|
||||
.description(descr)
|
||||
@@ -204,7 +204,7 @@ mod tests {
|
||||
.build()
|
||||
.unwrap()
|
||||
};
|
||||
static ref EXPECTED_TIPOFF: NewPodcast = {
|
||||
static ref EXPECTED_TIPOFF: NewShow = {
|
||||
let desc = "<p>Welcome to The Tip Off- the podcast where we take you behind the \
|
||||
scenes of some of the best investigative journalism from recent years. \
|
||||
Each episode we’ll be digging into an investigative scoop- hearing from \
|
||||
@@ -215,7 +215,7 @@ mod tests {
|
||||
complicated detective work that goes into doing great investigative \
|
||||
journalism- then this is the podcast for you.</p>";
|
||||
|
||||
NewPodcastBuilder::default()
|
||||
NewShowBuilder::default()
|
||||
.title("The Tip Off")
|
||||
.link("http://www.acast.com/thetipoff")
|
||||
.description(desc)
|
||||
@@ -227,7 +227,7 @@ mod tests {
|
||||
.build()
|
||||
.unwrap()
|
||||
};
|
||||
static ref EXPECTED_STARS: NewPodcast = {
|
||||
static ref EXPECTED_STARS: NewShow = {
|
||||
let descr = "<p>The first audio drama from Tor Labs and Gideon Media, Steal the Stars \
|
||||
is a gripping noir science fiction thriller in 14 episodes: Forbidden \
|
||||
love, a crashed UFO, an alien body, and an impossible heist unlike any \
|
||||
@@ -237,7 +237,7 @@ mod tests {
|
||||
b183-7311d2e436c3/b3a4aa57a576bb662191f2a6bc2a436c8c4ae256ecffaff5c4c54fd42e\
|
||||
923914941c264d01efb1833234b52c9530e67d28a8cebbe3d11a4bc0fbbdf13ecdf1c3.jpeg";
|
||||
|
||||
NewPodcastBuilder::default()
|
||||
NewShowBuilder::default()
|
||||
.title("Steal the Stars")
|
||||
.link("http://tor-labs.com/")
|
||||
.description(descr)
|
||||
@@ -246,12 +246,12 @@ mod tests {
|
||||
.build()
|
||||
.unwrap()
|
||||
};
|
||||
static ref EXPECTED_CODE: NewPodcast = {
|
||||
static ref EXPECTED_CODE: NewShow = {
|
||||
let descr = "A podcast about humans and technology. Panelists: Coraline Ada Ehmke, \
|
||||
David Brady, Jessica Kerr, Jay Bobo, Astrid Countee and Sam \
|
||||
Livingston-Gray. Brought to you by @therubyrep.";
|
||||
|
||||
NewPodcastBuilder::default()
|
||||
NewShowBuilder::default()
|
||||
.title("Greater Than Code")
|
||||
.link("https://www.greaterthancode.com/")
|
||||
.description(descr)
|
||||
@@ -262,8 +262,8 @@ mod tests {
|
||||
.build()
|
||||
.unwrap()
|
||||
};
|
||||
static ref EXPECTED_ELLINOFRENEIA: NewPodcast = {
|
||||
NewPodcastBuilder::default()
|
||||
static ref EXPECTED_ELLINOFRENEIA: NewShow = {
|
||||
NewShowBuilder::default()
|
||||
.title("Ελληνοφρένεια")
|
||||
.link("https://ellinofreneia.sealabs.net/feed.rss")
|
||||
.description("Ανεπίσημο feed της Ελληνοφρένειας")
|
||||
@@ -272,8 +272,8 @@ mod tests {
|
||||
.build()
|
||||
.unwrap()
|
||||
};
|
||||
static ref UPDATED_DESC_INTERCEPTED: NewPodcast = {
|
||||
NewPodcastBuilder::default()
|
||||
static ref UPDATED_DESC_INTERCEPTED: NewShow = {
|
||||
NewShowBuilder::default()
|
||||
.title("Intercepted with Jeremy Scahill")
|
||||
.link("https://theintercept.com/podcasts")
|
||||
.description("New Description")
|
||||
@@ -293,7 +293,7 @@ mod tests {
|
||||
let file = File::open("tests/feeds/2018-01-20-Intercepted.xml").unwrap();
|
||||
let channel = Channel::read_from(BufReader::new(file)).unwrap();
|
||||
|
||||
let pd = NewPodcast::new(&channel, 42);
|
||||
let pd = NewShow::new(&channel, 42);
|
||||
assert_eq!(*EXPECTED_INTERCEPTED, pd);
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ mod tests {
|
||||
let file = File::open("tests/feeds/2018-01-20-LinuxUnplugged.xml").unwrap();
|
||||
let channel = Channel::read_from(BufReader::new(file)).unwrap();
|
||||
|
||||
let pd = NewPodcast::new(&channel, 42);
|
||||
let pd = NewShow::new(&channel, 42);
|
||||
assert_eq!(*EXPECTED_LUP, pd);
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ mod tests {
|
||||
let file = File::open("tests/feeds/2018-01-20-TheTipOff.xml").unwrap();
|
||||
let channel = Channel::read_from(BufReader::new(file)).unwrap();
|
||||
|
||||
let pd = NewPodcast::new(&channel, 42);
|
||||
let pd = NewShow::new(&channel, 42);
|
||||
assert_eq!(*EXPECTED_TIPOFF, pd);
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ mod tests {
|
||||
let file = File::open("tests/feeds/2018-01-20-StealTheStars.xml").unwrap();
|
||||
let channel = Channel::read_from(BufReader::new(file)).unwrap();
|
||||
|
||||
let pd = NewPodcast::new(&channel, 42);
|
||||
let pd = NewShow::new(&channel, 42);
|
||||
assert_eq!(*EXPECTED_STARS, pd);
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ mod tests {
|
||||
let file = File::open("tests/feeds/2018-01-20-GreaterThanCode.xml").unwrap();
|
||||
let channel = Channel::read_from(BufReader::new(file)).unwrap();
|
||||
|
||||
let pd = NewPodcast::new(&channel, 42);
|
||||
let pd = NewShow::new(&channel, 42);
|
||||
assert_eq!(*EXPECTED_CODE, pd);
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ mod tests {
|
||||
let file = File::open("tests/feeds/2018-03-28-Ellinofreneia.xml").unwrap();
|
||||
let channel = Channel::read_from(BufReader::new(file)).unwrap();
|
||||
|
||||
let pd = NewPodcast::new(&channel, 42);
|
||||
let pd = NewShow::new(&channel, 42);
|
||||
assert_eq!(*EXPECTED_ELLINOFRENEIA, pd);
|
||||
}
|
||||
|
||||
@@ -349,7 +349,7 @@ mod tests {
|
||||
let file = File::open("tests/feeds/2018-01-20-Intercepted.xml").unwrap();
|
||||
let channel = Channel::read_from(BufReader::new(file)).unwrap();
|
||||
|
||||
let npd = NewPodcast::new(&channel, 42);
|
||||
let npd = NewShow::new(&channel, 42);
|
||||
npd.insert().unwrap();
|
||||
let pd = dbqueries::get_podcast_from_source_id(42).unwrap();
|
||||
|
||||
@@ -369,20 +369,13 @@ mod tests {
|
||||
|
||||
let updated = &*UPDATED_DESC_INTERCEPTED;
|
||||
updated.update(old.id()).unwrap();
|
||||
let mut new = dbqueries::get_podcast_from_source_id(42).unwrap();
|
||||
let new = dbqueries::get_podcast_from_source_id(42).unwrap();
|
||||
|
||||
assert_ne!(old, new);
|
||||
assert_eq!(old.id(), new.id());
|
||||
assert_eq!(old.source_id(), new.source_id());
|
||||
assert_eq!(updated, &new);
|
||||
assert_ne!(updated, &old);
|
||||
|
||||
// Chech that the update does not override user preferences.
|
||||
new.set_archive(true);
|
||||
new.save().unwrap();
|
||||
|
||||
let new2 = dbqueries::get_podcast_from_source_id(42).unwrap();
|
||||
assert_eq!(true, new2.archive());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -395,14 +388,14 @@ mod tests {
|
||||
assert!(EXPECTED_INTERCEPTED.index().is_ok());
|
||||
// Get the podcast
|
||||
let old = dbqueries::get_podcast_from_source_id(42).unwrap();
|
||||
// Assert that NewPodcast is equal to the Indexed one
|
||||
// Assert that NewShow is equal to the Indexed one
|
||||
assert_eq!(&*EXPECTED_INTERCEPTED, &old);
|
||||
|
||||
let updated = &*UPDATED_DESC_INTERCEPTED;
|
||||
|
||||
// Update the podcast
|
||||
assert!(updated.index().is_ok());
|
||||
// Get the new Podcast
|
||||
// Get the new Show
|
||||
let new = dbqueries::get_podcast_from_source_id(42).unwrap();
|
||||
// Assert it's diff from the old one.
|
||||
assert_ne!(new, old);
|
||||
@@ -424,16 +417,7 @@ mod tests {
|
||||
let pd = EXPECTED_INTERCEPTED.to_podcast().unwrap();
|
||||
// This should error as a unique constrain violation
|
||||
assert!(EXPECTED_INTERCEPTED.insert().is_err());
|
||||
let mut old = dbqueries::get_podcast_from_source_id(42).unwrap();
|
||||
assert_eq!(old, pd);
|
||||
|
||||
old.set_archive(true);
|
||||
old.save().unwrap();
|
||||
|
||||
// Assert that it does not mess with user preferences
|
||||
let pd = UPDATED_DESC_INTERCEPTED.to_podcast().unwrap();
|
||||
let old = dbqueries::get_podcast_from_source_id(42).unwrap();
|
||||
assert_eq!(old, pd);
|
||||
assert_eq!(old.archive(), true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
use models::Source;
|
||||
use schema::shows;
|
||||
|
||||
#[derive(Queryable, Identifiable, AsChangeset, Associations, PartialEq)]
|
||||
#[belongs_to(Source, foreign_key = "source_id")]
|
||||
#[changeset_options(treat_none_as_null = "true")]
|
||||
#[table_name = "shows"]
|
||||
#[derive(Debug, Clone)]
|
||||
/// Diesel Model of the shows table.
|
||||
pub struct Show {
|
||||
id: i32,
|
||||
title: String,
|
||||
link: String,
|
||||
description: String,
|
||||
image_uri: Option<String>,
|
||||
source_id: i32,
|
||||
}
|
||||
|
||||
impl Show {
|
||||
/// Get the Feed `id`.
|
||||
pub fn id(&self) -> i32 {
|
||||
self.id
|
||||
}
|
||||
|
||||
/// Get the Feed `title`.
|
||||
pub fn title(&self) -> &str {
|
||||
&self.title
|
||||
}
|
||||
|
||||
/// Get the Feed `link`.
|
||||
///
|
||||
/// Usually the website/homepage of the content creator.
|
||||
pub fn link(&self) -> &str {
|
||||
&self.link
|
||||
}
|
||||
|
||||
/// Get the `description`.
|
||||
pub fn description(&self) -> &str {
|
||||
&self.description
|
||||
}
|
||||
|
||||
/// Get the `image_uri`.
|
||||
///
|
||||
/// Represents the uri(url usually) that the Feed cover image is located at.
|
||||
pub fn image_uri(&self) -> Option<&str> {
|
||||
self.image_uri.as_ref().map(|s| s.as_str())
|
||||
}
|
||||
|
||||
/// `Source` table foreign key.
|
||||
pub fn source_id(&self) -> i32 {
|
||||
self.source_id
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Queryable, Debug, Clone)]
|
||||
/// Diesel Model of the Show cover query.
|
||||
/// Used for fetching information about a Show's cover.
|
||||
pub struct ShowCoverModel {
|
||||
id: i32,
|
||||
title: String,
|
||||
image_uri: Option<String>,
|
||||
}
|
||||
|
||||
impl From<Show> for ShowCoverModel {
|
||||
fn from(p: Show) -> ShowCoverModel {
|
||||
ShowCoverModel {
|
||||
id: p.id(),
|
||||
title: p.title,
|
||||
image_uri: p.image_uri,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ShowCoverModel {
|
||||
/// Get the Feed `id`.
|
||||
pub fn id(&self) -> i32 {
|
||||
self.id
|
||||
}
|
||||
|
||||
/// Get the Feed `title`.
|
||||
pub fn title(&self) -> &str {
|
||||
&self.title
|
||||
}
|
||||
|
||||
/// Get the `image_uri`.
|
||||
///
|
||||
/// Represents the uri(url usually) that the Feed cover image is located at.
|
||||
pub fn image_uri(&self) -> Option<&str> {
|
||||
self.image_uri.as_ref().map(|s| s.as_str())
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ pub fn import_to_db<R: Read>(reader: R) -> Result<Vec<Source>, reader::Error> {
|
||||
.filter_map(|s| {
|
||||
if let Err(ref err) = s {
|
||||
let txt = "If you think this might be a bug please consider filling a report over \
|
||||
at https://gitlab.gnome.org/World/hammond/issues/new";
|
||||
at https://gitlab.gnome.org/World/podcasts/issues/new";
|
||||
|
||||
error!("Failed to import a Show: {}", err);
|
||||
error!("{}", txt);
|
||||
@@ -103,7 +103,7 @@ mod tests {
|
||||
/// Insert feeds and update/index them.
|
||||
fn test_pipeline() {
|
||||
truncate_db().unwrap();
|
||||
let bad_url = "https://gitlab.gnome.org/World/hammond.atom";
|
||||
let bad_url = "https://gitlab.gnome.org/World/podcasts.atom";
|
||||
// if a stream returns error/None it stops
|
||||
// bad we want to parse all feeds regardless if one fails
|
||||
Source::from_url(bad_url).unwrap();
|
||||
@@ -0,0 +1,29 @@
|
||||
diff --git a/podcasts-data/src/schema.rs b/podcasts-data/src/schema.rs
|
||||
index 03cbed0..88f1622 100644
|
||||
--- a/podcasts-data/src/schema.rs
|
||||
+++ b/podcasts-data/src/schema.rs
|
||||
@@ -1,8 +1,11 @@
|
||||
+#![allow(warnings)]
|
||||
+
|
||||
table! {
|
||||
episodes (title, show_id) {
|
||||
+ rowid -> Integer,
|
||||
title -> Text,
|
||||
uri -> Nullable<Text>,
|
||||
local_uri -> Nullable<Text>,
|
||||
description -> Nullable<Text>,
|
||||
epoch -> Integer,
|
||||
length -> Nullable<Integer>,
|
||||
@@ -30,11 +33,7 @@ table! {
|
||||
uri -> Text,
|
||||
last_modified -> Nullable<Text>,
|
||||
http_etag -> Nullable<Text>,
|
||||
}
|
||||
}
|
||||
|
||||
-allow_tables_to_appear_in_same_query!(
|
||||
- episodes,
|
||||
- shows,
|
||||
- source,
|
||||
-);
|
||||
+allow_tables_to_appear_in_same_query!(episodes, shows, source);
|
||||
@@ -1,5 +1,7 @@
|
||||
#![allow(warnings)]
|
||||
|
||||
table! {
|
||||
episode (title, podcast_id) {
|
||||
episodes (title, show_id) {
|
||||
rowid -> Integer,
|
||||
title -> Text,
|
||||
uri -> Nullable<Text>,
|
||||
@@ -10,22 +12,17 @@ table! {
|
||||
duration -> Nullable<Integer>,
|
||||
guid -> Nullable<Text>,
|
||||
played -> Nullable<Integer>,
|
||||
favorite -> Bool,
|
||||
archive -> Bool,
|
||||
podcast_id -> Integer,
|
||||
show_id -> Integer,
|
||||
}
|
||||
}
|
||||
|
||||
table! {
|
||||
podcast (id) {
|
||||
shows (id) {
|
||||
id -> Integer,
|
||||
title -> Text,
|
||||
link -> Text,
|
||||
description -> Text,
|
||||
image_uri -> Nullable<Text>,
|
||||
favorite -> Bool,
|
||||
archive -> Bool,
|
||||
always_dl -> Bool,
|
||||
source_id -> Integer,
|
||||
}
|
||||
}
|
||||
@@ -39,4 +36,4 @@ table! {
|
||||
}
|
||||
}
|
||||
|
||||
allow_tables_to_appear_in_same_query!(episode, podcast, source,);
|
||||
allow_tables_to_appear_in_same_query!(episodes, shows, source);
|
||||
@@ -7,7 +7,7 @@ use url::{Position, Url};
|
||||
|
||||
use dbqueries;
|
||||
use errors::DataError;
|
||||
use models::{EpisodeCleanerQuery, Podcast, Save};
|
||||
use models::{EpisodeCleanerModel, Save, Show};
|
||||
use xdg_dirs::DL_DIR;
|
||||
|
||||
use std::fs;
|
||||
@@ -59,7 +59,7 @@ fn played_cleaner(cleanup_date: DateTime<Utc>) -> Result<(), DataError> {
|
||||
}
|
||||
|
||||
/// Check `ep.local_uri` field and delete the file it points to.
|
||||
fn delete_local_content(ep: &mut EpisodeCleanerQuery) -> Result<(), DataError> {
|
||||
fn delete_local_content(ep: &mut EpisodeCleanerModel) -> Result<(), DataError> {
|
||||
if ep.local_uri().is_some() {
|
||||
let uri = ep.local_uri().unwrap().to_owned();
|
||||
if Path::new(&uri).exists() {
|
||||
@@ -108,9 +108,9 @@ pub fn url_cleaner(s: &str) -> String {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the URI of a Podcast Downloads given it's title.
|
||||
/// Returns the URI of a Show Downloads given it's title.
|
||||
pub fn get_download_folder(pd_title: &str) -> Result<String, DataError> {
|
||||
// It might be better to make it a hash of the title or the podcast rowid
|
||||
// It might be better to make it a hash of the title or the Show rowid
|
||||
let download_fold = format!("{}/{}", DL_DIR.to_str().unwrap(), pd_title);
|
||||
|
||||
// Create the folder
|
||||
@@ -123,7 +123,7 @@ pub fn get_download_folder(pd_title: &str) -> Result<String, DataError> {
|
||||
/// Removes all the entries associated with the given show from the database,
|
||||
/// and deletes all of the downloaded content.
|
||||
// TODO: Write Tests
|
||||
pub fn delete_show(pd: &Podcast) -> Result<(), DataError> {
|
||||
pub fn delete_show(pd: &Show) -> Result<(), DataError> {
|
||||
dbqueries::remove_feed(pd)?;
|
||||
info!("{} was removed succesfully.", pd.title());
|
||||
|
||||
@@ -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();
|
||||
@@ -183,7 +183,7 @@ mod tests {
|
||||
// Setup episodes
|
||||
let n1 = NewEpisodeBuilder::default()
|
||||
.title("foo_bar".to_string())
|
||||
.podcast_id(0)
|
||||
.show_id(0)
|
||||
.build()
|
||||
.unwrap()
|
||||
.to_episode()
|
||||
@@ -191,14 +191,14 @@ mod tests {
|
||||
|
||||
let n2 = NewEpisodeBuilder::default()
|
||||
.title("bar_baz".to_string())
|
||||
.podcast_id(1)
|
||||
.show_id(1)
|
||||
.build()
|
||||
.unwrap()
|
||||
.to_episode()
|
||||
.unwrap();
|
||||
|
||||
let mut ep1 = dbqueries::get_episode_from_pk(n1.title(), n1.podcast_id()).unwrap();
|
||||
let mut ep2 = dbqueries::get_episode_from_pk(n2.title(), n2.podcast_id()).unwrap();
|
||||
let mut ep1 = dbqueries::get_episode_from_pk(n1.title(), n1.show_id()).unwrap();
|
||||
let mut ep2 = dbqueries::get_episode_from_pk(n2.title(), n2.show_id()).unwrap();
|
||||
ep1.set_local_uri(Some(valid_path.to_str().unwrap()));
|
||||
ep2.set_local_uri(Some(bad_path.to_str().unwrap()));
|
||||
|
||||
@@ -230,7 +230,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_download_cleaner() {
|
||||
let _tmp_dir = helper_db();
|
||||
let mut episode: EpisodeCleanerQuery =
|
||||
let mut episode: EpisodeCleanerModel =
|
||||
dbqueries::get_episode_from_pk("foo_bar", 0).unwrap().into();
|
||||
|
||||
let valid_path = episode.local_uri().unwrap().to_owned();
|
||||
@@ -1,22 +1,22 @@
|
||||
[package]
|
||||
authors = ["Jordan Petridis <jordanpetridis@protonmail.com>"]
|
||||
name = "hammond-downloader"
|
||||
name = "podcasts-downloader"
|
||||
version = "0.1.0"
|
||||
workspace = "../"
|
||||
|
||||
[dependencies]
|
||||
error-chain = "0.11.0"
|
||||
error-chain = "0.12.0"
|
||||
hyper = "0.11.27"
|
||||
log = "0.4.1"
|
||||
mime_guess = "1.8.4"
|
||||
reqwest = "0.8.5"
|
||||
log = "0.4.3"
|
||||
mime_guess = "1.8.6"
|
||||
reqwest = "0.8.6"
|
||||
tempdir = "0.3.7"
|
||||
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"
|
||||
pretty_assertions = "0.5.1"
|
||||
@@ -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::{EpisodeWidgetQuery, PodcastCoverQuery, Save};
|
||||
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| {
|
||||
@@ -127,7 +127,7 @@ fn save_io(
|
||||
info!("Downloading into: {}", file);
|
||||
let chunk_size = match content_lenght {
|
||||
Some(x) => x as usize / 99,
|
||||
None => 1024 as usize, // default chunk size
|
||||
None => 1024, // default chunk size
|
||||
};
|
||||
|
||||
let mut writer = BufWriter::new(File::create(&file)?);
|
||||
@@ -161,7 +161,7 @@ fn save_io(
|
||||
|
||||
// TODO: Refactor
|
||||
pub fn get_episode(
|
||||
ep: &mut EpisodeWidgetQuery,
|
||||
ep: &mut EpisodeWidgetModel,
|
||||
download_folder: &str,
|
||||
progress: Option<Arc<Mutex<DownloadProgress>>>,
|
||||
) -> Result<(), DownloadError> {
|
||||
@@ -196,7 +196,7 @@ pub fn get_episode(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn cache_image(pd: &PodcastCoverQuery) -> Result<String, DownloadError> {
|
||||
pub fn cache_image(pd: &ShowCoverModel) -> Result<String, DownloadError> {
|
||||
let url = pd
|
||||
.image_uri()
|
||||
.ok_or_else(|| DownloadError::NoImageLocation)?
|
||||
@@ -206,7 +206,7 @@ pub fn cache_image(pd: &PodcastCoverQuery) -> Result<String, DownloadError> {
|
||||
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: &PodcastCoverQuery) -> Result<String, DownloadError> {
|
||||
#[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_);
|
||||
@@ -1,4 +1,4 @@
|
||||
use hammond_data::errors::DataError;
|
||||
use podcasts_data::errors::DataError;
|
||||
use reqwest;
|
||||
use std::io;
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
#![recursion_limit = "1024"]
|
||||
#![allow(unknown_lints)]
|
||||
#![cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
allow(blacklisted_name, option_map_unit_fn)
|
||||
)]
|
||||
// Enable lint group collections
|
||||
#![warn(
|
||||
nonstandard_style,
|
||||
edition_2018,
|
||||
rust_2018_idioms,
|
||||
bad_style,
|
||||
unused
|
||||
)]
|
||||
// standalone lints
|
||||
#![warn(
|
||||
const_err,
|
||||
improper_ctypes,
|
||||
non_shorthand_field_patterns,
|
||||
no_mangle_generic_items,
|
||||
overflowing_literals,
|
||||
plugin_as_library,
|
||||
private_no_mangle_fns,
|
||||
private_no_mangle_statics,
|
||||
unconditional_recursion,
|
||||
unions_with_drop_fields,
|
||||
while_true,
|
||||
missing_debug_implementations,
|
||||
trivial_casts,
|
||||
trivial_numeric_casts,
|
||||
elided_lifetime_in_paths,
|
||||
missing_copy_implementations
|
||||
)]
|
||||
#![deny(warnings)]
|
||||
|
||||
extern crate failure;
|
||||
#[macro_use]
|
||||
extern crate failure_derive;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate pretty_assertions;
|
||||
|
||||
extern crate glob;
|
||||
extern crate hyper;
|
||||
extern crate mime_guess;
|
||||
extern crate podcasts_data;
|
||||
extern crate reqwest;
|
||||
extern crate tempdir;
|
||||
|
||||
pub mod downloader;
|
||||
pub mod errors;
|
||||
@@ -0,0 +1,47 @@
|
||||
[package]
|
||||
authors = ["Jordan Petridis <jordanpetridis@protonmail.com>"]
|
||||
build = "build.rs"
|
||||
name = "podcasts-gtk"
|
||||
version = "0.1.0"
|
||||
workspace = "../"
|
||||
|
||||
[dependencies]
|
||||
chrono = "0.4.4"
|
||||
crossbeam-channel = "0.2.3"
|
||||
gdk = "0.8.0"
|
||||
gdk-pixbuf = "0.4.0"
|
||||
glib = "0.5.0"
|
||||
gstreamer = "0.11.4"
|
||||
gstreamer-player = "0.11.3"
|
||||
humansize = "1.1.0"
|
||||
lazy_static = "1.0.2"
|
||||
log = "0.4.3"
|
||||
loggerv = "0.7.1"
|
||||
open = "1.2.1"
|
||||
rayon = "1.0.2"
|
||||
url = "1.7.1"
|
||||
failure = "0.1.1"
|
||||
failure_derive = "0.1.1"
|
||||
fragile = "0.2.1"
|
||||
regex = "1.0.2"
|
||||
reqwest = "0.8.6"
|
||||
serde_json = "1.0.24"
|
||||
# html2text = "0.1.8"
|
||||
html2text = { git = "https://github.com/alatiera/rust-html2text" }
|
||||
|
||||
[dependencies.gtk]
|
||||
features = ["v3_22"]
|
||||
version = "0.4.1"
|
||||
|
||||
[dependencies.gio]
|
||||
features = ["v2_50"]
|
||||
version = "0.4.1"
|
||||
|
||||
[dependencies.podcasts-data]
|
||||
path = "../podcasts-data"
|
||||
|
||||
[dependencies.podcasts-downloader]
|
||||
path = "../podcasts-downloader"
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_assertions = "0.5.1"
|
||||
@@ -1,6 +1,10 @@
|
||||
use std::process::Command;
|
||||
|
||||
fn main() {
|
||||
// Rerun the build script when files in the resources folder are changed.
|
||||
println!("cargo:rerun-if-changed=resources");
|
||||
println!("cargo:rerun-if-changed=resources/*");
|
||||
|
||||
Command::new("glib-compile-resources")
|
||||
.args(&["--generate", "resources.xml"])
|
||||
.current_dir("resources")
|
||||
@@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.0
|
||||
|
||||
Copyright (C) 2017 - 2018
|
||||
|
||||
This file is part of Hammond.
|
||||
|
||||
Hammond is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Hammond is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Hammond. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Authors:
|
||||
Jordan Petridis
|
||||
Tobias Bernard
|
||||
|
||||
-->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<!-- interface-license-type gplv3 -->
|
||||
<!-- interface-name Hammond -->
|
||||
<!-- interface-description A podcast client for the GNOME Desktop -->
|
||||
<!-- interface-copyright 2017 - 2018 -->
|
||||
<!-- interface-authors Jordan Petridis\nTobias Bernard -->
|
||||
<object class="GtkBox" id="empty_view">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="pixel_size">256</property>
|
||||
<property name="icon_name">org.gnome.Podcasts-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label" translatable="yes">Get some shows</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="scale" value="1.4399999999999999"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">list-add-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Add new shows via feed URL</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">open-menu-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Import shows from another device</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
+25
-45
@@ -35,6 +35,8 @@ Tobias Bernard
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin_left">6</property>
|
||||
<property name="margin_right">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
@@ -173,7 +175,7 @@ Tobias Bernard
|
||||
<object class="GtkLabel" id="total_size">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="label" translatable="yes">XX MB</property>
|
||||
<property name="label" translatable="yes">Calculating episode size...</property>
|
||||
<property name="single_line_mode">True</property>
|
||||
<property name="track_visited_links">False</property>
|
||||
<style>
|
||||
@@ -207,24 +209,41 @@ Tobias Bernard
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">center</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="desc_button">
|
||||
<object class="GtkButton" id="cancel_button">
|
||||
<property name="label" translatable="yes">Cancel</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="download_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Download this episode</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="always_show_image">True</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">view-paged-symbolic</property>
|
||||
<property name="icon_name">document-save-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
<property name="non_homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
@@ -251,45 +270,6 @@ Tobias Bernard
|
||||
<property name="non_homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="download_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Download this episode</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="always_show_image">True</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">document-save-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">3</property>
|
||||
<property name="non_homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="cancel_button">
|
||||
<property name="label" translatable="yes">Cancel</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -5,22 +5,23 @@
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Check for new episodes</attribute>
|
||||
<attribute name="action">app.refresh</attribute>
|
||||
<attribute name="action">win.refresh</attribute>
|
||||
<attribute name="accel"><primary>r</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Import Shows</attribute>
|
||||
<attribute name="action">app.import</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Export Shows</attribute>
|
||||
<attribute name="action">app.export</attribute>
|
||||
<attribute name="action">win.import</attribute>
|
||||
</item>
|
||||
<!-- <item> -->
|
||||
<!-- <attribute name="label" translatable="yes">_Export Shows</attribute> -->
|
||||
<!-- <attribute name="action">win.export</attribute> -->
|
||||
<!-- </item> -->
|
||||
</section>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Preferences</attribute>
|
||||
<attribute name="action">app.preferences</attribute>
|
||||
<attribute name="action">win.preferences</attribute>
|
||||
<attribute name="accel"><primary>e</attribute>
|
||||
</item>
|
||||
</section>
|
||||
<section>
|
||||
@@ -28,13 +29,13 @@
|
||||
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
|
||||
<attribute name="action">win.show-help-overlay</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Help</attribute>
|
||||
<attribute name="action">app.help</attribute>
|
||||
</item>
|
||||
<!-- <item> -->
|
||||
<!-- <attribute name="label" translatable="yes">_Help</attribute> -->
|
||||
<!-- <attribute name="action">win.help</attribute> -->
|
||||
<!-- </item> -->
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_About</attribute>
|
||||
<attribute name="action">app.about</attribute>
|
||||
<attribute name="action">win.about</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</menu>
|
||||
@@ -151,9 +151,10 @@ Tobias Bernard
|
||||
<object class="GtkMenuButton" id="add_toggle">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Add a new feed</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="popover">add_popover</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="add-button-image2">
|
||||
<property name="visible">True</property>
|
||||
@@ -257,12 +258,11 @@ Tobias Bernard
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="menu_button">
|
||||
<object class="GtkMenuButton" id="hamburger">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="use_popover">True</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
@@ -280,5 +280,28 @@ Tobias Bernard
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="secondary_menu">
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="valign">center</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">view-more-symbolic</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
</interface>
|
||||
@@ -18,6 +18,13 @@
|
||||
<property name="title" translatable="yes" context="shortcut window">Check for new episodes</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">True</property>
|
||||
<property name="accelerator"><primary>e</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Preferences</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">True</property>
|
||||
+1
-2
@@ -36,12 +36,11 @@ Tobias Bernard
|
||||
<property name="valign">center</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="margin_bottom">6</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="cover">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">6</property>
|
||||
<property name="margin_left">8</property>
|
||||
<property name="pixel_size">64</property>
|
||||
<property name="icon_name">image-x-generic-symbolic</property>
|
||||
</object>
|
||||
+2
-2
@@ -32,8 +32,8 @@ Tobias Bernard
|
||||
<!-- interface-authors Jordan Petridis\nTobias Bernard -->
|
||||
<object class="GtkBox" id="container">
|
||||
<property name="name">container</property>
|
||||
<property name="width_request">400</property>
|
||||
<property name="height_request">600</property>
|
||||
<property name="width_request">290</property>
|
||||
<property name="height_request">420</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
@@ -0,0 +1,371 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkImage" id="fast_forward">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">skip-forward-symbolic</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="pause_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">1</property>
|
||||
<property name="icon_name">media-playback-pause-symbolic</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="play_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">1</property>
|
||||
<property name="icon_name">media-playback-start-symbolic</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="rewind">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">skip-back-symbolic</property>
|
||||
</object>
|
||||
<object class="GtkActionBar" id="action_bar">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="valign">center</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="buttons">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">center</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="rewind_button">
|
||||
<property name="width_request">42</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Rewind 10 seconds</property>
|
||||
<property name="image">rewind</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="play_button">
|
||||
<property name="width_request">60</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Play</property>
|
||||
<property name="image">play_image</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pause_button">
|
||||
<property name="width_request">60</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Pause</property>
|
||||
<property name="image">pause_image</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="ff_button">
|
||||
<property name="width_request">42</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Fast Forward 10 seconds</property>
|
||||
<property name="image">fast_forward</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="info">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="show_cover">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="pixel_size">34</property>
|
||||
<property name="icon_name">image-x-generic-symbolic</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="show_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Show Title</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="ellipsize">end</property>
|
||||
<property name="max_width_chars">20</property>
|
||||
<style>
|
||||
<class name="player-show-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="episode_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Episode Title</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="ellipsize">end</property>
|
||||
<property name="max_width_chars">20</property>
|
||||
<style>
|
||||
<class name="player-episode-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale" id="seek">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="round_digits">1</property>
|
||||
<property name="draw_value">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="timer">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="progress_time_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label">0:00</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="separator">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label">/</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="total_duration_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label">0:00</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="rate_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Change the Playback speed</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin_left">6</property>
|
||||
<property name="direction">up</property>
|
||||
<property name="popover">rate_popover</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="rate_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">1.00x</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">go-down-symbolic</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkPopover" id="rate_popover">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="relative_to">rate_button</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">6</property>
|
||||
<property name="margin_right">6</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="margin_bottom">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">3</property>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="rate_1_50">
|
||||
<property name="label" translatable="yes">1.50x</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">1.5 speed rate</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">normal_rate</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="rate_1_25">
|
||||
<property name="label" translatable="yes">1.25x</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">1.25 speed rate</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">normal_rate</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="normal_rate">
|
||||
<property name="label" translatable="yes">1.00x</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Normal speed</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="active">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -0,0 +1,282 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkAdjustment" id="cleanup_value_adj">
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">100</property>
|
||||
<property name="value">1</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkWindow" id="prefs">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">Preferences</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="min_content_width">480</property>
|
||||
<property name="min_content_height">200</property>
|
||||
<property name="propagate_natural_width">True</property>
|
||||
<property name="propagate_natural_height">True</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="margin_top">10</property>
|
||||
<property name="margin_bottom">5</property>
|
||||
<property name="label" translatable="yes">Appearance</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="width_request">450</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkAlignment">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<property name="activate_on_single_click">False</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="height_request">50</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="margin_right">5</property>
|
||||
<property name="margin_top">5</property>
|
||||
<property name="margin_bottom">5</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Dark Theme</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="dark_toggle">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="margin_top">20</property>
|
||||
<property name="margin_bottom">5</property>
|
||||
<property name="label" translatable="yes">Delete played episodes</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="width_request">300</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkAlignment">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<property name="activate_on_single_click">False</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="width_request">100</property>
|
||||
<property name="height_request">50</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activatable">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="margin_right">5</property>
|
||||
<property name="margin_top">5</property>
|
||||
<property name="margin_bottom">5</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">After</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="cleanup_value">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="input_purpose">digits</property>
|
||||
<property name="adjustment">cleanup_value_adj</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="value">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="cleanup_type">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title">Preferences</property>
|
||||
<property name="show_close_button">True</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="refresh_value_adj">
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">100</property>
|
||||
<property name="value">1</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<menu id="menu">
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Mark all episodes as played</attribute>
|
||||
<!-- <attribute name="action">win.refresh</attribute> -->
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Website</attribute>
|
||||
<!-- <attribute name="action">win.import</attribute> -->
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Unsubscribe</attribute>
|
||||
<!-- <attribute name="action">win.export</attribute> -->
|
||||
</item>
|
||||
</section>
|
||||
</menu>
|
||||
</interface>
|
||||
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkPopoverMenu" id="menu">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkModelButton" id="website">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="text" translatable="yes">Open Website</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton" id="played">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="text" translatable="yes">Mark all as played</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton" id="unsub">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="text" translatable="yes">Unsubscribe</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="submenu">main</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
+4
-72
@@ -31,8 +31,8 @@ Tobias Bernard
|
||||
<!-- interface-copyright 2017 - 2018 -->
|
||||
<!-- interface-authors Jordan Petridis\nTobias Bernard -->
|
||||
<object class="GtkBox" id="container">
|
||||
<property name="width_request">400</property>
|
||||
<property name="height_request">600</property>
|
||||
<property name="width_request">290</property>
|
||||
<property name="height_request">420</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
@@ -79,7 +79,7 @@ Tobias Bernard
|
||||
<property name="margin_bottom">32</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">24</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
@@ -133,79 +133,11 @@ Sorry, we could not find a description for this Show.</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="settings_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon_name">emblem-system-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="link_button">
|
||||
<property name="label" translatable="yes">Website</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">5</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="unsub_button">
|
||||
<property name="label" translatable="yes">Unsubscribe</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">5</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="padding">6</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.21.0
|
||||
<!-- Generated with glade 3.22.0
|
||||
|
||||
Copyright (C) 2017 - 2018
|
||||
|
||||
@@ -32,6 +32,8 @@ Tobias Bernard
|
||||
<!-- interface-authors Jordan Petridis\nTobias Bernard -->
|
||||
<object class="GtkBox" id="fb_parent">
|
||||
<property name="name">fb_parent</property>
|
||||
<property name="width_request">290</property>
|
||||
<property name="height_request">420</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
@@ -9,3 +9,12 @@ row:last-child {
|
||||
list, border {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.player-episode-label {
|
||||
font-weight: bold;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.player-show-label {
|
||||
font-size: smaller;
|
||||
}
|
||||
@@ -0,0 +1,617 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-filename="Template.png"
|
||||
width="128"
|
||||
height="128"
|
||||
id="svg11300"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="org.gnome.Podcasts.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.0"
|
||||
style="display:inline;enable-background:new"
|
||||
viewBox="0 0 128 128">
|
||||
<title
|
||||
id="title4162">Adwaita Icon Template</title>
|
||||
<defs
|
||||
id="defs3">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient1654">
|
||||
<stop
|
||||
style="stop-color:#c65f00;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop1642" />
|
||||
<stop
|
||||
id="stop1644"
|
||||
offset="0.03432177"
|
||||
style="stop-color:#ff7b00;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#c65f00;stop-opacity:1"
|
||||
offset="0.07062413"
|
||||
id="stop1646" />
|
||||
<stop
|
||||
id="stop1648"
|
||||
offset="0.92767543"
|
||||
style="stop-color:#c65f00;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#ff7b00;stop-opacity:1"
|
||||
offset="0.96428573"
|
||||
id="stop1650" />
|
||||
<stop
|
||||
style="stop-color:#c65f00;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop1652" />
|
||||
</linearGradient>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath1017">
|
||||
<rect
|
||||
ry="96.000015"
|
||||
rx="96.000015"
|
||||
y="-163.5"
|
||||
x="159.99997"
|
||||
height="367.5"
|
||||
width="192.00003"
|
||||
id="rect1020"
|
||||
style="opacity:1;fill:#f1bd10;fill-opacity:1;stroke:none;stroke-width:0.99999988;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:4.00000002, 2.00000002;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath1090">
|
||||
<rect
|
||||
ry="31.999998"
|
||||
rx="32"
|
||||
y="-115.99999"
|
||||
x="32.5"
|
||||
height="320"
|
||||
width="447"
|
||||
id="rect1092"
|
||||
style="opacity:1;fill:#fb8c14;fill-opacity:1;stroke:none;stroke-width:0.99999994;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:3.9999998, 1.9999999;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath945">
|
||||
<rect
|
||||
ry="31.999998"
|
||||
rx="32"
|
||||
y="-115.99999"
|
||||
x="32.5"
|
||||
height="320"
|
||||
width="447"
|
||||
id="rect943"
|
||||
style="opacity:1;fill:#fb8c14;fill-opacity:1;stroke:none;stroke-width:0.99999994;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:3.9999998, 1.9999999;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath904">
|
||||
<rect
|
||||
y="4"
|
||||
x="208"
|
||||
height="48"
|
||||
width="96"
|
||||
id="rect906"
|
||||
style="opacity:1;fill:#949390;fill-opacity:1;stroke:none;stroke-width:15.99999905;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:11.19999981;stroke-opacity:1" />
|
||||
</clipPath>
|
||||
<linearGradient
|
||||
id="linearGradient1093"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop1089"
|
||||
offset="0"
|
||||
style="stop-color:#4fd2fd;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop1091"
|
||||
offset="1"
|
||||
style="stop-color:#0aa8dc;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<clipPath
|
||||
id="clipPath1567"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<circle
|
||||
transform="rotate(-135)"
|
||||
r="24"
|
||||
cy="-134.35028"
|
||||
cx="-196.57568"
|
||||
id="circle1569"
|
||||
style="display:inline;opacity:1;vector-effect:none;fill:url(#radialGradient1571);fill-opacity:1;stroke:none;stroke-width:0.24999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" />
|
||||
</clipPath>
|
||||
<radialGradient
|
||||
r="24"
|
||||
fy="222.27728"
|
||||
fx="40.287689"
|
||||
cy="222.27728"
|
||||
cx="40.287689"
|
||||
gradientTransform="matrix(1.3314563,0,0,1.3314563,-253.92929,-440.0255)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="radialGradient1571"
|
||||
xlink:href="#linearGradient1093"
|
||||
inkscape:collect="always" />
|
||||
<clipPath
|
||||
id="clipPath1584"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<circle
|
||||
transform="rotate(-45)"
|
||||
r="24"
|
||||
cy="195.16147"
|
||||
cx="-132.93608"
|
||||
id="circle1586"
|
||||
style="display:inline;opacity:1;vector-effect:none;fill:url(#radialGradient1588);fill-opacity:1;stroke:none;stroke-width:0.24999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" />
|
||||
</clipPath>
|
||||
<radialGradient
|
||||
r="24"
|
||||
fy="222.27728"
|
||||
fx="40.287689"
|
||||
cy="222.27728"
|
||||
cx="40.287689"
|
||||
gradientTransform="matrix(1.3314563,0,0,1.3314563,-190.28968,-110.51374)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="radialGradient1588"
|
||||
xlink:href="#linearGradient1093"
|
||||
inkscape:collect="always" />
|
||||
<clipPath
|
||||
id="clipPath1757"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<circle
|
||||
r="120.00001"
|
||||
cy="-200"
|
||||
cx="36"
|
||||
id="circle1759"
|
||||
style="display:inline;opacity:1;fill:#424048;fill-opacity:1;stroke:none;stroke-width:0.99999994;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:3.99999981, 1.99999992;stroke-dashoffset:0;stroke-opacity:1;enable-background:new"
|
||||
transform="rotate(90)" />
|
||||
</clipPath>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient1654"
|
||||
id="linearGradient1640"
|
||||
x1="8"
|
||||
y1="264"
|
||||
x2="120"
|
||||
y2="264"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
stroke="#ef2929"
|
||||
fill="#f57900"
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="0.25490196"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.70710678"
|
||||
inkscape:cx="-263.96829"
|
||||
inkscape:cy="8.5799908"
|
||||
inkscape:current-layer="layer9"
|
||||
showgrid="false"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:showpageshadow="false"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="27"
|
||||
width="400px"
|
||||
height="300px"
|
||||
inkscape:snap-nodes="true"
|
||||
inkscape:snap-bbox="false"
|
||||
objecttolerance="7"
|
||||
gridtolerance="12"
|
||||
guidetolerance="13"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:pagecheckerboard="false"
|
||||
showguides="false"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:locked="false"
|
||||
inkscape:measure-start="0,0"
|
||||
inkscape:measure-end="0,0"
|
||||
inkscape:object-nodes="true"
|
||||
inkscape:bbox-nodes="true"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:object-paths="true"
|
||||
inkscape:snap-intersection-paths="true"
|
||||
inkscape:snap-bbox-edge-midpoints="true"
|
||||
inkscape:snap-bbox-midpoints="true"
|
||||
showborder="false"
|
||||
inkscape:snap-center="true"
|
||||
inkscape:snap-object-midpoints="true"
|
||||
inkscape:snap-midpoints="true"
|
||||
inkscape:snap-smooth-nodes="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid5883"
|
||||
spacingx="2"
|
||||
spacingy="2"
|
||||
enabled="true"
|
||||
visible="true"
|
||||
empspacing="4"
|
||||
originx="0"
|
||||
originy="0" />
|
||||
<sodipodi:guide
|
||||
position="64,8"
|
||||
orientation="0,1"
|
||||
id="guide1073"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="12,39"
|
||||
orientation="1,0"
|
||||
id="guide1075"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="72,104"
|
||||
orientation="0,1"
|
||||
id="guide1099"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="64,128"
|
||||
orientation="0,1"
|
||||
id="guide993"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="104,64"
|
||||
orientation="1,0"
|
||||
id="guide995"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="0,72"
|
||||
orientation="1,0"
|
||||
id="guide867"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="120,58"
|
||||
orientation="1,0"
|
||||
id="guide869"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="84.25,116"
|
||||
orientation="0,1"
|
||||
id="guide871"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid873"
|
||||
spacingx="1"
|
||||
spacingy="1"
|
||||
empspacing="8"
|
||||
color="#000000"
|
||||
opacity="0.49019608"
|
||||
empcolor="#000000"
|
||||
empopacity="0.08627451"
|
||||
dotted="true" />
|
||||
<sodipodi:guide
|
||||
position="24,37"
|
||||
orientation="1,0"
|
||||
id="guide877"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="116,58"
|
||||
orientation="1,0"
|
||||
id="guide879"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="64,120"
|
||||
orientation="0,1"
|
||||
id="guide881"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="59.75,12"
|
||||
orientation="0,1"
|
||||
id="guide883"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="8,39"
|
||||
orientation="1,0"
|
||||
id="guide885"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="128,56"
|
||||
orientation="1,0"
|
||||
id="guide887"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="64,0"
|
||||
orientation="0,1"
|
||||
id="guide897"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="56,24"
|
||||
orientation="0,1"
|
||||
id="guide899"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="256,256"
|
||||
orientation="-0.70710678,0.70710678"
|
||||
id="guide950"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="64,64"
|
||||
orientation="0.70710678,0.70710678"
|
||||
id="guide952"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata4">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>GNOME Design Team</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:source />
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
<dc:title>Adwaita Icon Template</dc:title>
|
||||
<dc:subject>
|
||||
<rdf:Bag />
|
||||
</dc:subject>
|
||||
<dc:date />
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title />
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title />
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier />
|
||||
<dc:relation />
|
||||
<dc:language />
|
||||
<dc:coverage />
|
||||
<dc:description />
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title />
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Icon"
|
||||
inkscape:groupmode="layer"
|
||||
style="display:inline"
|
||||
transform="translate(0,-172)">
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="baseplate"
|
||||
style="display:none"
|
||||
sodipodi:insensitive="true">
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6.08791494px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Normal';text-align:start;writing-mode:lr-tb;text-anchor:start;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.33264872;enable-background:new"
|
||||
x="7.9499588"
|
||||
y="148.65199"
|
||||
id="context"
|
||||
inkscape:label="context"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan2716"
|
||||
x="7.9499588"
|
||||
y="148.65199"
|
||||
style="stroke-width:0.33264872">apps</tspan></text>
|
||||
<text
|
||||
inkscape:label="icon-name"
|
||||
id="text3021"
|
||||
y="157.23398"
|
||||
x="7.7533054"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:6.08791494px;line-height:125%;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Bold';text-align:start;writing-mode:lr-tb;text-anchor:start;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.33264872;enable-background:new"
|
||||
xml:space="preserve"><tspan
|
||||
y="157.23398"
|
||||
x="7.7533054"
|
||||
id="tspan3023"
|
||||
sodipodi:role="line"
|
||||
style="stroke-width:0.33264872">org.gnome.Podcasts</tspan></text>
|
||||
<g
|
||||
style="display:inline;fill:#000000;enable-background:new"
|
||||
transform="matrix(7.9911709,0,0,8.0036407,-167.7909,-4846.0776)"
|
||||
id="g12027"
|
||||
inkscape:export-xdpi="12"
|
||||
inkscape:export-ydpi="12" />
|
||||
<rect
|
||||
style="display:inline;overflow:visible;visibility:visible;fill:#f0f0f0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.5;marker:none;enable-background:accumulate"
|
||||
id="rect13805"
|
||||
width="128"
|
||||
height="128"
|
||||
x="9.2651362e-08"
|
||||
y="172"
|
||||
inkscape:label="512x512" />
|
||||
<g
|
||||
id="g883"
|
||||
style="fill:none;fill-opacity:0.25098039;stroke:#a579b3;stroke-opacity:1"
|
||||
transform="translate(-24,24)" />
|
||||
<g
|
||||
id="g900"
|
||||
style="fill:none;fill-opacity:0.25098039;stroke:#a579b3;stroke-opacity:1"
|
||||
transform="translate(-24,24)" />
|
||||
<g
|
||||
id="g1168"
|
||||
transform="matrix(0.25,0,0,0.25,6.9488522e-8,225)">
|
||||
<rect
|
||||
ry="32"
|
||||
rx="32"
|
||||
y="-180"
|
||||
x="96"
|
||||
height="448"
|
||||
width="319.99979"
|
||||
id="rect1110"
|
||||
style="opacity:0.1;fill:#2864b0;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal" />
|
||||
<rect
|
||||
ry="32"
|
||||
rx="32"
|
||||
y="-164"
|
||||
x="48"
|
||||
height="416"
|
||||
width="416"
|
||||
id="rect1110-8"
|
||||
style="display:inline;opacity:0.1;fill:#2864b0;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" />
|
||||
<rect
|
||||
ry="32"
|
||||
rx="32"
|
||||
y="-116"
|
||||
x="32"
|
||||
height="320"
|
||||
width="448"
|
||||
id="rect1110-8-9"
|
||||
style="display:inline;opacity:0.1;fill:#2864b0;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" />
|
||||
<circle
|
||||
cx="256"
|
||||
cy="44"
|
||||
r="240"
|
||||
id="path1142"
|
||||
style="opacity:0.1;fill:#2864b0;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer9"
|
||||
inkscape:label="hires"
|
||||
style="display:inline">
|
||||
<rect
|
||||
ry="8"
|
||||
rx="8"
|
||||
y="252"
|
||||
x="8"
|
||||
height="24"
|
||||
width="112"
|
||||
id="rect1025"
|
||||
style="display:inline;opacity:1;fill:url(#linearGradient1640);fill-opacity:1.0;stroke:none;stroke-width:0.24999999;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:0.99999995, 0.49999997000000002;stroke-dashoffset:0;stroke-opacity:1;enable-background:new" />
|
||||
<rect
|
||||
style="display:inline;opacity:1;fill:#ff9533;fill-opacity:1;stroke:none;stroke-width:0.24999999;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:0.99999995, 0.49999997000000002;stroke-dashoffset:0;stroke-opacity:1;enable-background:new"
|
||||
id="rect927-7"
|
||||
width="112"
|
||||
height="75.999992"
|
||||
x="8"
|
||||
y="196.00002"
|
||||
rx="8"
|
||||
ry="8" />
|
||||
<path
|
||||
clip-path="none"
|
||||
style="display:inline;fill:#949390;fill-opacity:1;stroke:#949390;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;enable-background:new"
|
||||
d="m 35.999995,270 h 56 l -4,-10 h -48 z"
|
||||
id="path1083-9"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<rect
|
||||
style="display:inline;opacity:1;fill:#6b696c;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;enable-background:new"
|
||||
id="rect915"
|
||||
width="64"
|
||||
height="6.0000076"
|
||||
x="32"
|
||||
y="270" />
|
||||
<path
|
||||
style="display:inline;enable-background:new;opacity:1;fill:#f6f5f4;fill-opacity:1;stroke:none;stroke-width:0.24999997;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:0.99999998, 0.49999998000000001;stroke-dashoffset:0;stroke-opacity:1"
|
||||
d="M 23.999999,204 H 104 l 8,8 v 44.00001 H 15.999999 V 212 Z"
|
||||
id="path1203-6"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<g
|
||||
id="g1565">
|
||||
<rect
|
||||
y="218"
|
||||
x="16"
|
||||
height="28"
|
||||
width="96"
|
||||
id="rect1050"
|
||||
style="display:inline;opacity:1;fill:#424048;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;enable-background:new" />
|
||||
<circle
|
||||
r="6"
|
||||
cy="232"
|
||||
cx="39.999992"
|
||||
id="path1060-5"
|
||||
style="display:inline;opacity:1;fill:#f6f5f4;fill-opacity:1;stroke:none;stroke-width:0.24999999;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:0.99999996, 0.49999998;stroke-dashoffset:0;stroke-opacity:1;enable-background:new" />
|
||||
<circle
|
||||
style="display:inline;opacity:1;fill:#f6f5f4;fill-opacity:1;stroke:none;stroke-width:0.24999999;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:0.99999996, 0.49999998;stroke-dashoffset:0;stroke-opacity:1;enable-background:new"
|
||||
id="circle1062-6"
|
||||
cx="87.999992"
|
||||
cy="232"
|
||||
r="6" />
|
||||
<rect
|
||||
y="226"
|
||||
x="51.999992"
|
||||
height="12"
|
||||
width="24"
|
||||
id="rect1271-3"
|
||||
style="display:inline;opacity:1;fill:#949390;fill-opacity:1;stroke:none;stroke-width:3.99999976;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:11.19999981;stroke-opacity:1;enable-background:new" />
|
||||
<path
|
||||
sodipodi:nodetypes="sssss"
|
||||
inkscape:connector-curvature="0"
|
||||
id="ellipse900"
|
||||
d="M 272,28 C 272,89.855892 221.85589,140 160,140 98.144108,140 48,89.855892 48,28 48,-33.855892 98.144108,-84 160,-84 c 61.85589,0 112,50.144108 112,112 z"
|
||||
clip-path="url(#clipPath904)"
|
||||
style="display:inline;opacity:0.5;fill:#424048;fill-opacity:1;stroke:none;stroke-width:0.99999982;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:3.99999983, 1.99999994;stroke-dashoffset:0;stroke-opacity:1;enable-background:new"
|
||||
transform="matrix(0.25,0,0,0.25,-4.5e-6,225.00001)" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 22 KiB |
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
version="1.1"
|
||||
id="svg7384"
|
||||
height="16"
|
||||
sodipodi:docname="org.gnome.Podcasts-symbolic.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)">
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1016"
|
||||
id="namedview16"
|
||||
showgrid="false"
|
||||
inkscape:zoom="14.75"
|
||||
inkscape:cx="-14.813559"
|
||||
inkscape:cy="6.9152542"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g876" />
|
||||
<metadata
|
||||
id="metadata90">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Gnome Symbolic Icon Theme</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<title
|
||||
id="title9167">Gnome Symbolic Icon Theme</title>
|
||||
<defs
|
||||
id="defs7386">
|
||||
<linearGradient
|
||||
osb:paint="solid"
|
||||
id="linearGradient7212">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop7214" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g
|
||||
transform="translate(-323.0002,125)"
|
||||
style="display:inline"
|
||||
id="layer9">
|
||||
<g
|
||||
transform="translate(311.00017,-893)"
|
||||
id="g876"
|
||||
style="enable-background:new">
|
||||
<path
|
||||
style="display:inline;opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:2.61861467;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.43700789"
|
||||
d="M 1 3 C 0.446 3 0 3.446 0 4 L 0 13 C 0 13.554 0.446 14 1 14 L 15 14 C 15.554 14 16 13.554 16 13 L 16 4 C 16 3.446 15.554 3 15 3 L 1 3 z M 1 6 L 15 6 L 15 10 L 1 10 L 1 6 z M 4 7 A 1 1 0 0 0 3 8 A 1 1 0 0 0 4 9 A 1 1 0 0 0 5 8 A 1 1 0 0 0 4 7 z M 6 7 L 6 9 L 10 9 L 10 7 L 6 7 z M 12 7 A 1 1 0 0 0 11 8 A 1 1 0 0 0 12 9 A 1 1 0 0 0 13 8 A 1 1 0 0 0 12 7 z M 5 11 L 11 11 L 12 13 L 4 13 L 5 11 z "
|
||||
transform="translate(12.00003,768)"
|
||||
id="rect2029" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
@@ -0,0 +1 @@
|
||||
install_subdir('hicolor', install_dir: icondir)
|
||||
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
version="1.1"
|
||||
id="svg7384"
|
||||
height="16"
|
||||
sodipodi:docname="skip-back-symbolic.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)">
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1016"
|
||||
id="namedview16"
|
||||
showgrid="true"
|
||||
inkscape:snap-smooth-nodes="true"
|
||||
inkscape:snap-midpoints="true"
|
||||
inkscape:object-paths="true"
|
||||
inkscape:snap-intersection-paths="true"
|
||||
inkscape:snap-object-midpoints="true"
|
||||
inkscape:snap-center="true"
|
||||
inkscape:snap-text-baseline="true"
|
||||
inkscape:snap-page="true"
|
||||
inkscape:zoom="14.75"
|
||||
inkscape:cx="-5.302011"
|
||||
inkscape:cy="11.053898"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g1104">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid837" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata90">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Gnome Symbolic Icon Theme</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<title
|
||||
id="title9167">Gnome Symbolic Icon Theme</title>
|
||||
<defs
|
||||
id="defs7386">
|
||||
<linearGradient
|
||||
osb:paint="solid"
|
||||
id="linearGradient7212">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop7214" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g
|
||||
id="g1104"
|
||||
transform="translate(-285.00026,-511.51971)">
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-anchor:start;display:inline;overflow:visible;visibility:visible;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;enable-background:accumulate"
|
||||
d="m 293.25027,512.51971 c -0.13304,0.006 -0.26338,0.0444 -0.375,0.11719 l -3.75,2.25 c -0.2118,0.13478 -0.32813,0.3838 -0.32813,0.63281 0,0.24901 0.11633,0.49803 0.32813,0.63281 l 3.75,2.25 c 0.11162,0.0728 0.24196,0.11119 0.375,0.11719 h 0.11719 0.6328 v -6 h -0.6328 z"
|
||||
id="path1096-6-3"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccscccccccc" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path1098-7"
|
||||
d="m 294.00002,514.51953 c 2.61534,0 4.93816,1.703 5.72461,4.19727 0.78645,2.49427 -0.14084,5.22062 -2.2832,6.7207 a 1.0000999,1.0000999 0 1 1 -1.14649,-1.63867 c 1.43403,-1.00411 2.04791,-2.8109 1.52149,-4.48047 -0.52643,-1.66957 -2.06577,-2.79883 -3.81641,-2.79883 a 1.0000999,1.0000999 0 1 1 0,-2 z"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.99999988;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
d="m 285.51611,526.51971 h 3.72666 v -1.28266 h -1.066 v -4.732 h -0.89266 l -2.07134,1.196 0.56334,1.07466 0.90133,-0.468 v 2.92934 h -1.16133 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:800;font-stretch:normal;font-size:8.66666698px;line-height:1.25;font-family:Cantarell;-inkscape-font-specification:'Cantarell Ultra-Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:0.99999976"
|
||||
id="path844"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
d="m 292.11307,526.60638 c 1.52533,0 2.55666,-1.248 2.55666,-3.12867 0,-1.83733 -1.014,-3.05933 -2.51333,-3.05933 -1.534,0 -2.56533,1.248 -2.56533,3.12 0,1.83733 1.014,3.068 2.522,3.068 z m 0.0347,-1.28267 c -0.61533,0 -1.014,-0.73666 -1.014,-1.83733 0,-1.07467 0.39867,-1.78533 0.988,-1.78533 0.598,0 1.00534,0.73666 1.00534,1.846 0,1.066 -0.39867,1.77666 -0.97934,1.77666 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:800;font-stretch:normal;font-size:8.66666698px;line-height:1.25;font-family:Cantarell;-inkscape-font-specification:'Cantarell Ultra-Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:0.99999976"
|
||||
id="path846"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.1 KiB |
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
version="1.1"
|
||||
id="svg7384"
|
||||
height="16"
|
||||
sodipodi:docname="skip-forward-symbolic.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)">
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1016"
|
||||
id="namedview16"
|
||||
showgrid="true"
|
||||
inkscape:snap-smooth-nodes="true"
|
||||
inkscape:snap-midpoints="true"
|
||||
inkscape:object-paths="true"
|
||||
inkscape:snap-intersection-paths="true"
|
||||
inkscape:snap-object-midpoints="true"
|
||||
inkscape:snap-center="true"
|
||||
inkscape:snap-text-baseline="true"
|
||||
inkscape:snap-page="true"
|
||||
inkscape:zoom="20.85965"
|
||||
inkscape:cx="12.060999"
|
||||
inkscape:cy="12.860546"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg7384">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid835" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata90">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Gnome Symbolic Icon Theme</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<title
|
||||
id="title9167">Gnome Symbolic Icon Theme</title>
|
||||
<defs
|
||||
id="defs7386">
|
||||
<linearGradient
|
||||
osb:paint="solid"
|
||||
id="linearGradient7212">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop7214" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path849"
|
||||
style="font-style:normal;font-variant:normal;font-weight:800;font-stretch:normal;font-size:8.66666698px;line-height:1.25;font-family:Cantarell;-inkscape-font-specification:'Cantarell Ultra-Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:0.99999976"
|
||||
d="m 6.515284,15.000003 h 3.726667 V 13.717336 H 9.1759508 v -4.732 H 8.2832841 l -2.0713334,1.196 0.5633333,1.074667 0.9013334,-0.468 v 2.929333 H 6.515284 Z" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path851"
|
||||
style="font-style:normal;font-variant:normal;font-weight:800;font-stretch:normal;font-size:8.66666698px;line-height:1.25;font-family:Cantarell;-inkscape-font-specification:'Cantarell Ultra-Bold';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:0.99999976"
|
||||
d="m 13.112242,15.08667 c 1.525334,0 2.556667,-1.248001 2.556667,-3.128667 0,-1.837334 -1.014,-3.0593337 -2.513333,-3.0593337 -1.534,0 -2.565334,1.2479997 -2.565334,3.1199997 0,1.837334 1.014,3.068001 2.522,3.068001 z m 0.03467,-1.282667 c -0.615333,0 -1.014,-0.736667 -1.014,-1.837334 0,-1.074666 0.398667,-1.785333 0.988,-1.785333 0.598,0 1.005333,0.736667 1.005333,1.846 0,1.066 -0.398666,1.776667 -0.979333,1.776667 z" />
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-anchor:start;display:inline;overflow:visible;visibility:visible;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;enable-background:accumulate"
|
||||
d="m 7.74999,1 c 0.13304,0.006 0.26338,0.0444 0.375,0.11719 l 3.749999,2.2499999 c 0.2118,0.13478 0.32813,0.3838 0.32813,0.63281 0,0.24901 -0.11633,0.49803 -0.32813,0.63281 L 8.12499,6.8828096 c -0.11162,0.0728 -0.24196,0.11119 -0.375,0.11719 H 7.6328 7 V 1 h 0.6328 z"
|
||||
id="path946"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccscccccccc" />
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.99999988;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 7,3 c -2.615338,-10e-8 -4.9362036,1.702994 -5.7226562,4.1972656 -0.78645273,2.4942717 0.1388853,5.2206254 2.28125,6.7207034 A 1.0000999,1.0000999 0 1 0 4.7050781,12.279297 C 3.2710452,11.275191 2.6571722,9.4683988 3.1835938,7.7988281 3.7100153,6.1292575 5.2493627,5 7,5 A 1.0000999,1.0000999 0 1 0 7,3 Z"
|
||||
id="path948"
|
||||
inkscape:connector-curvature="0" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.1 KiB |
@@ -0,0 +1,13 @@
|
||||
subdir('icons')
|
||||
|
||||
install_data('org.gnome.Podcasts.desktop', install_dir : datadir + '/applications')
|
||||
install_data('org.gnome.Podcasts.appdata.xml', install_dir : datadir + '/appdata')
|
||||
install_data('org.gnome.Podcasts.gschema.xml', install_dir: join_paths(datadir, 'glib-2.0', 'schemas'))
|
||||
|
||||
|
||||
configure_file(input: 'org.gnome.Podcasts.service.in',
|
||||
output: 'org.gnome.Podcasts.service',
|
||||
configuration: podcasts_conf,
|
||||
install_dir: join_paths([datadir,'dbus-1/services']))
|
||||
|
||||
meson.add_install_script('../../scripts/compile-gschema.py')
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop">
|
||||
<id>org.gnome.Podcasts</id>
|
||||
<name>Podcasts</name>
|
||||
<project_license>GPL-3.0</project_license>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<developer_name>Jordan Petridis</developer_name>
|
||||
<summary>Podcast app for GNOME</summary>
|
||||
<description xml:lang="en">
|
||||
<p>
|
||||
Listen to your favorite podcasts, right from your desktop.
|
||||
</p>
|
||||
</description>
|
||||
<url type="homepage">https://gitlab.gnome.org/World/podcasts</url>
|
||||
<screenshots>
|
||||
<screenshot>
|
||||
<image>https://gitlab.gnome.org/World/podcasts/raw/master/screenshots/home_view.png</image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image>https://gitlab.gnome.org/World/podcasts/raw/master/screenshots/shows_view.png</image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image>https://gitlab.gnome.org/World/podcasts/raw/master/screenshots/show_widget.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<releases>
|
||||
<release version="0.4.4" date="2018-07-31"/>
|
||||
</releases>
|
||||
<url type="homepage">https://gitlab.gnome.org/World/podcasts</url>
|
||||
<update_contact>jpetridis@gnome.org</update_contact>
|
||||
<developer_name>Jordan Petridis and others</developer_name>
|
||||
</component>
|
||||
@@ -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
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<schemalist>
|
||||
<enum id="org.gnome.Hammond.timePeriods">
|
||||
<enum id="org.gnome.Podcasts.timePeriods">
|
||||
<value nick="seconds" value="1"/>
|
||||
<value nick="minutes" value="2"/>
|
||||
<value nick="hours" value="3"/>
|
||||
@@ -9,7 +9,7 @@
|
||||
<value nick="months" value="6"/>
|
||||
</enum>
|
||||
|
||||
<schema path="/org/gnome/hammond/" id="org.gnome.Hammond">
|
||||
<schema path="/org/gnome/Podcasts/" id="org.gnome.Podcasts">
|
||||
<key name="persist-window-geometry-top" type="i">
|
||||
<default>-1</default>
|
||||
<summary>Top position of the last open main window</summary>
|
||||
@@ -45,7 +45,7 @@
|
||||
<default>1</default>
|
||||
<summary>How many periods of time to wait between automatic refreshes</summary>
|
||||
</key>
|
||||
<key name="refresh-interval-period" enum="org.gnome.Hammond.timePeriods">
|
||||
<key name="refresh-interval-period" enum="org.gnome.Podcasts.timePeriods">
|
||||
<default>'hours'</default>
|
||||
<summary>What period of time to wait between automatic refreshes</summary>
|
||||
</key>
|
||||
@@ -59,7 +59,7 @@
|
||||
<default>2</default>
|
||||
<summary>How many periods of time to wait between automatic cleanups</summary>
|
||||
</key>
|
||||
<key name="cleanup-age-period" enum="org.gnome.Hammond.timePeriods">
|
||||
<key name="cleanup-age-period" enum="org.gnome.Podcasts.timePeriods">
|
||||
<default>'days'</default>
|
||||
<summary>What period of time to wait between automatic cleanups</summary>
|
||||
</key>
|
||||
@@ -0,0 +1,3 @@
|
||||
[D-BUS Service]
|
||||
Name=org.gnome.Podcasts
|
||||
Exec=@BINDIR@/gnome-podcasts --gapplication-service
|
||||
@@ -1,18 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/org/gnome/Hammond/">
|
||||
<gresource prefix="/org/gnome/Podcasts/">
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/episode_widget.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/show_widget.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/empty_view.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/empty_show.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/episodes_view.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/episodes_view_widget.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/home_view.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/home_episode.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/shows_view.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/shows_child.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/headerbar.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/inapp_notif.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/menus.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/hamburger.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/show_menu.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/player_toolbar.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">icons/skip-back-symbolic.svg</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">icons/skip-forward-symbolic.svg</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">gtk/prefs.ui</file>
|
||||
<file compressed="true">gtk/style.css</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
</gresources>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user