Compare commits
272 Commits
Author | SHA1 | Date | |
---|---|---|---|
8cb58fe388 | |||
a9be73b88d | |||
0c26182721 | |||
e439730a4d | |||
f0a2d199f9 | |||
8fe01c2222 | |||
03baaa9875 | |||
d455385382 | |||
|
08ce645960 | ||
a2e14d65f2 | |||
f247b83b90 | |||
|
c7f07e4562 | ||
e4f0ae8f83 | |||
0648f90768 | |||
|
0514ce24ce | ||
|
70bd8c191c | ||
c5b3434b31 | |||
|
921b14b2d3 | ||
f79a19116d | |||
34ad127a0b | |||
697586e4de | |||
|
98011122b5 | ||
|
a4f2151ebe | ||
|
6b44189f07 | ||
b606a239bc | |||
|
9823a1eadf | ||
d11f8d41c0 | |||
de52f111c5 | |||
407c93ae49 | |||
17ef77ea6e | |||
|
20a9a9f14d | ||
676b1e0ea2 | |||
0edf8d2634 | |||
56c9102284 | |||
75aad7baab | |||
668c377c33 | |||
3aa5a6020e | |||
5b0b1dcc81 | |||
4f412c23c0 | |||
c34646b72c | |||
43692a233c | |||
6e289b02b4 | |||
5a58b253d2 | |||
7b4c39499a | |||
427c6b2ee8 | |||
cbe8750fd2 | |||
|
bc6c22e3c5 | ||
785e6c7832 | |||
b9f254f561 | |||
|
b182f7e752 | ||
ee48860a47 | |||
64dcfe36fe | |||
1a65befeed | |||
082964d4e2 | |||
3a503e1969 | |||
0024507ed5 | |||
3232723602 | |||
c3d6319402 | |||
|
bf40156f68 | ||
2dd9578257 | |||
7cd45d3539 | |||
8fd3eada75 | |||
|
3ebfbf6df7 | ||
133a8e8a09 | |||
|
d00e72439e | ||
4108ae57bc | |||
|
92ad21d49b | ||
761b3f1079 | |||
fb586e7115 | |||
|
11e0e0e675 | ||
|
f2de304d60 | ||
cf298db3d7 | |||
|
749fc6e628 | ||
bfebf4996f | |||
|
2a88b0d392 | ||
b8035a21ee | |||
a51fefb321 | |||
f1442c6c5f | |||
13515c3141 | |||
|
d53f9216c5 | ||
|
f4093378a9 | ||
|
6992ce6e50 | ||
|
f6630f91d8 | ||
70184c79b0 | |||
|
9e934e6ca6 | ||
0d017bbc68 | |||
|
3b2981d201 | ||
25949e98c9 | |||
b002e3bab8 | |||
d80044934f | |||
|
4d88f485fb | ||
|
ae66036a82 | ||
674f0193db | |||
ccc903be97 | |||
10c7a1f907 | |||
a6ab9c69d9 | |||
285e9f7dfb | |||
60fc620b79 | |||
5588bb93e3 | |||
b97d4487bb | |||
29c29cdfdd | |||
d7c3b87d8d | |||
9fa48c2da3 | |||
3cea8d3505 | |||
23280d68b9 | |||
1e1bb03c23 | |||
fc86f62d93 | |||
83e3358e9b | |||
38bc986bb3 | |||
eae106e72b | |||
3c358a3c5c | |||
|
79ee855f9b | ||
|
5150cb6501 | ||
1d85811ad3 | |||
872b0ced0a | |||
|
2a280c3493 | ||
|
c9f922b31d | ||
c983ab8d3b | |||
4f0685ccbd | |||
e165a070c8 | |||
|
622f5ec635 | ||
|
7d64e3370c | ||
fcf99e5bbf | |||
924106202a | |||
ce2412fb01 | |||
6c348d5583 | |||
|
7eef3ceaf0 | ||
|
5321c0a3bf | ||
fe40b7c9f7 | |||
|
11a1db72c6 | ||
7f00696140 | |||
|
33dcbe9162 | ||
5c6542e60c | |||
|
ea6704c537 | ||
df4ac80554 | |||
2b2ab2af8f | |||
|
7b00eb22ff | ||
|
ecee6ff2a8 | ||
57a22d9390 | |||
42c35d3856 | |||
4d199bc02b | |||
|
8a89cc06cd | ||
|
03740231c5 | ||
b54ab2be91 | |||
d1658a9408 | |||
1eb8b35501 | |||
fb7780fead | |||
19c56ef31d | |||
2bad1852d7 | |||
0302489924 | |||
81cb6a0191 | |||
094b7812cd | |||
491ad89242 | |||
01e2dabb65 | |||
a86ea6ab3f | |||
7b7ceef503 | |||
437c7868dd | |||
7c151d8f58 | |||
b7025a7aa1 | |||
42035d6e18 | |||
5ed33d1cf6 | |||
4e4730efd5 | |||
9005b519f3 | |||
b0132287f0 | |||
062da25264 | |||
fd0f8f9c7a | |||
|
35610ee8da | ||
60aedf3be5 | |||
4bafb3306b | |||
58af1f6d40 | |||
|
4eb9236ecb | ||
eb1196c841 | |||
dd275a1f03 | |||
f205d3243f | |||
46b30f1ebb | |||
9be107edc9 | |||
4e6eee96bf | |||
ddef81f92f | |||
456592adfc | |||
|
147311013c | ||
|
99dc3582c4 | ||
2824431330 | |||
a30678bfd2 | |||
6bc8d70016 | |||
c42d455d4b | |||
5b08cf970e | |||
cf6dd25378 | |||
a2c3b389ba | |||
5917c59610 | |||
|
6cf868dc51 | ||
66b59c52fa | |||
36c3bd875b | |||
5742d1a762 | |||
bd9e3691b9 | |||
19427809ca | |||
544c91edee | |||
cf6bd440bf | |||
891d4762d0 | |||
a2b63241cc | |||
5db93914d2 | |||
68ada2b0e0 | |||
c91c17ae66 | |||
b4160d23d2 | |||
caf0bb7ec0 | |||
5f528e6b9b | |||
196bc23b1a | |||
e78e3b2565 | |||
b67123b578 | |||
53543a259f | |||
7efb0327d4 | |||
81af0c219f | |||
1feb0291bb | |||
989d5d38e1 | |||
b4ccd98f77 | |||
75da02e05b | |||
1530e8b294 | |||
7e359bdf29 | |||
082161e177 | |||
04ed6b101a | |||
6456ccc3d0 | |||
e190a9eeb6 | |||
e63ff6ef04 | |||
a50947ffaf | |||
c97e927a15 | |||
a6a0f0d4f8 | |||
358c1d06c8 | |||
1e452263a7 | |||
|
bfa9cde661 | ||
0238107be2 | |||
f94b529d6d | |||
1302c82fdb | |||
|
08b327e408 | ||
2104e2e6d8 | |||
|
c73e53d04e | ||
cee28f51a6 | |||
|
1665e1e193 | ||
1d73de5925 | |||
|
a753d1d634 | ||
a91648848b | |||
a538b38160 | |||
8479cc1553 | |||
69a2c20338 | |||
55ee2634df | |||
f3090c5490 | |||
d57189490e | |||
d5c34fa719 | |||
|
57b581fa54 | ||
|
74fa105d5a | ||
d81e6b505c | |||
|
ef66427afc | ||
f9b0c8fa39 | |||
b8466aebf1 | |||
|
1aa6dad3ba | ||
|
0c0946559a | ||
fcf389f925 | |||
|
6c59851cb9 | ||
1d15ade42e | |||
|
c85a347032 | ||
ec605fde0a | |||
46b7d80652 | |||
541c669dd5 | |||
79c6fbcc16 | |||
42bfdb530b | |||
bc8db22fce | |||
|
a4a00d4aea | ||
8d13fac7aa | |||
|
83e519d4c5 | ||
7ba27d7c9c | |||
5d75b51c63 | |||
a60341f352 | |||
c27f358f71 | |||
691ee72ac5 |
@ -9,5 +9,6 @@
|
|||||||
|
|
||||||
/node_modules/
|
/node_modules/
|
||||||
/js/
|
/js/
|
||||||
|
/css/
|
||||||
|
|
||||||
/build/
|
/build/
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
extends: ['@nextcloud', 'plugin:prettier/recommended'],
|
extends: [
|
||||||
|
'@nextcloud',
|
||||||
|
'@vue/eslint-config-typescript/recommended',
|
||||||
|
'plugin:pinia/recommended',
|
||||||
|
'plugin:prettier/recommended',
|
||||||
|
],
|
||||||
|
parser: 'vue-eslint-parser',
|
||||||
rules: {
|
rules: {
|
||||||
'jsdoc/require-jsdoc': 'off',
|
'jsdoc/require-jsdoc': 'off',
|
||||||
'vue/first-attribute-linebreak': 'off',
|
'vue/first-attribute-linebreak': 'off',
|
@ -14,7 +14,7 @@ jobs:
|
|||||||
|
|
||||||
php:
|
php:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: nextcloud:29
|
container: nextcloud:30
|
||||||
steps:
|
steps:
|
||||||
- run: apt-get update
|
- run: apt-get update
|
||||||
- run: apt-get install -y git nodejs
|
- run: apt-get install -y git nodejs
|
||||||
@ -30,15 +30,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: skjnldsv/read-package-engines-version-actions@v3
|
|
||||||
id: versions
|
|
||||||
with:
|
|
||||||
fallbackNode: '^20'
|
|
||||||
fallbackNpm: '^10'
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
node-version: "^20"
|
||||||
- run: npm i -g npm@${{ steps.versions.outputs.npmVersion }}
|
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run lint
|
- run: npm run lint
|
||||||
- run: npm run stylelint
|
- run: npm run stylelint
|
||||||
@ -47,22 +41,16 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
if: gitea.ref_type == 'tag'
|
if: gitea.ref_type == 'tag'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: nextcloud:29
|
container: nextcloud:30
|
||||||
steps:
|
steps:
|
||||||
- run: apt-get update
|
- run: apt-get update
|
||||||
- run: apt-get install -y git nodejs
|
- run: apt-get install -y git nodejs
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: curl -sSLo /usr/local/bin/composer https://getcomposer.org/download/latest-stable/composer.phar
|
- run: curl -sSLo /usr/local/bin/composer https://getcomposer.org/download/latest-stable/composer.phar
|
||||||
- run: chmod +x /usr/local/bin/composer
|
- run: chmod +x /usr/local/bin/composer
|
||||||
- uses: skjnldsv/read-package-engines-version-actions@v3
|
|
||||||
id: versions
|
|
||||||
with:
|
|
||||||
fallbackNode: '^20'
|
|
||||||
fallbackNpm: '^10'
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
node-version: "^20"
|
||||||
- run: npm i -g npm@${{ steps.versions.outputs.npmVersion }}
|
|
||||||
- run: make dist
|
- run: make dist
|
||||||
- uses: akkuman/gitea-release-action@v1
|
- uses: akkuman/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
|
1
.gitignore
vendored
@ -9,5 +9,6 @@
|
|||||||
|
|
||||||
/node_modules/
|
/node_modules/
|
||||||
/js/
|
/js/
|
||||||
|
/css/
|
||||||
|
|
||||||
/build/
|
/build/
|
||||||
|
@ -9,5 +9,6 @@ tests/.phpunit.cache
|
|||||||
|
|
||||||
node_modules/
|
node_modules/
|
||||||
js/
|
js/
|
||||||
|
css/
|
||||||
|
|
||||||
build/
|
build/
|
||||||
|
@ -15,7 +15,6 @@ class MyConfig extends Config
|
|||||||
$rules['curly_braces_position']['classes_opening_brace'] = 'next_line_unless_newline_at_signature_end';
|
$rules['curly_braces_position']['classes_opening_brace'] = 'next_line_unless_newline_at_signature_end';
|
||||||
$rules['phpdoc_separation'] = false;
|
$rules['phpdoc_separation'] = false;
|
||||||
$rules['phpdoc_to_comment'] = false;
|
$rules['phpdoc_to_comment'] = false;
|
||||||
$rules['single_line_comment_style'] = false;
|
|
||||||
return $rules;
|
return $rules;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
120
CHANGELOG.md
@ -1,9 +1,101 @@
|
|||||||
## 2.3.1 - 2024-05-29
|
## 3.3.2 - What a Nightmare - 2024-10-24
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- 🚑 Revert [#178](https://git.crystalyx.net/Xefir/repod/issues/178) not working on big subscriptions lists
|
||||||
|
[#182](https://git.crystalyx.net/Xefir/repod/issues/182) reported by @SteveDinn
|
||||||
|
|
||||||
|
## 3.3.1 - Breaking the Loop - 2024-10-24
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- ⚡ Speed up the loading time of subscriptions
|
||||||
|
[#178](https://git.crystalyx.net/Xefir/repod/issues/178) reported by @MikeAndrews
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- 🐛 Prevent Firefox for going nuts when having Plasma Integration addon installed
|
||||||
|
[#164](https://git.crystalyx.net/Xefir/repod/issues/164) reported by @cichy1173, @Share1440 and @mark.collins
|
||||||
|
|
||||||
|
## 3.3.0 - Into The Jet Lag - 2024-10-18
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- 🧑💻 CSS isn't mixed in the main JS file anymore
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- 🐛 App won't load on Firefox 115
|
||||||
|
[#158](https://git.crystalyx.net/Xefir/repod/issues/158) reported by @Jaunty and @mark.collins
|
||||||
|
- 🔇 Volume slider didn't work properly
|
||||||
|
|
||||||
|
### Deprecated
|
||||||
|
- 💣 Require Nextcloud 29 or more
|
||||||
|
|
||||||
|
## 3.2.0 - Typing fast - 2024-09-15
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- 📝 Add Cardo to list of compatible clients
|
||||||
|
[#176](https://github.com/thrillfall/nextcloud-gpodder/pull/176) reported by @n0vella
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- 🧑💻 Switch entiere project to TypeScript
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- 💄 Missing icon on home when aren't any favorites
|
||||||
|
- 💄 Tweaks spacing in several spaces on Home and banners
|
||||||
|
- 💩 Leverage the available space between the episode title and the play button (but hacky way for now)
|
||||||
|
[#59](https://git.crystalyx.net/Xefir/repod/issues/59#issuecomment-6246) reported by @W_LL_M
|
||||||
|
|
||||||
|
## 3.1.0 - Above the stars - 2024-09-02
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- ⭐ You can now add favorites subscriptions !
|
||||||
|
It will show's up on the homepage instead of the recommendations witch appear only when you add a new subscription.
|
||||||
|
[#59](https://git.crystalyx.net/Xefir/repod/issues/59) suggested by @W_LL_M, @Jaunty and @Satalink
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- 💥 Use html5 routing instead of hashes. All the URLs has changed removing the `#/` part.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- 🐛 Regression on 3.0 that prevent seeking player to episode last listened position
|
||||||
|
[#136](https://git.crystalyx.net/Xefir/repod/issues/136) reported by @randomuser1967
|
||||||
|
- ⚡ Improve the detection off mis-installed or mis-enabled gpodder app
|
||||||
|
|
||||||
|
## 3.0.0 - What a vue - 2024-08-17
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- 🌐 Add german translation
|
||||||
|
Thanks to @OiledAmoeba [#120](https://git.crystalyx.net/Xefir/repod/issues/120)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- 🎉 Migrate to Vue 3
|
||||||
|
- 🔖 Support Nextcloud 30
|
||||||
|
- 🏗️ Switch from Vuex to Pinia
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- 💄 Use iTunes image first for episode if available
|
||||||
|
- 💄 Displaying styles and proper HTML on episode's modal descriptions
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
- 🗑️ Temporary replacing @nextcloud/dialogs to toastyjs
|
||||||
|
|
||||||
|
## 2.3.3 - The Cake is a Lie - 2024-06-14
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- ⬆️ Update @nextcloud/dialogs to 5.3.2
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- 🐛 App crashed when no cache system available
|
||||||
|
[#107](https://git.crystalyx.net/Xefir/repod/issues/107) reported by @skvaller and @PhilTraere
|
||||||
|
|
||||||
|
## 2.3.2 - Young Youth - 2024-05-31
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- 🐛 New subscribe button on search not disapearing if subscribed
|
||||||
|
- ♿ Missing accessibility label on this button as well
|
||||||
|
|
||||||
|
## 2.3.1 - Powerwash the Universe - 2024-05-29
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- ⚡ Reduce app size by not shipping sourcemap
|
- ⚡ Reduce app size by not shipping sourcemap
|
||||||
|
|
||||||
## 2.3.0 - 2024-05-29
|
## 2.3.0 - Star Align - 2024-05-29
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- ➕ Ability to subscribe to podcast from search list
|
- ➕ Ability to subscribe to podcast from search list
|
||||||
@ -20,12 +112,12 @@
|
|||||||
- ⚰️ Drop support for PHP 8.0
|
- ⚰️ Drop support for PHP 8.0
|
||||||
- 🌐 Removed babel
|
- 🌐 Removed babel
|
||||||
|
|
||||||
## 2.2.1 - 2024-05-18
|
## 2.2.1 - Shami was here - 2024-05-18
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
- ♻️ Rollback: Hide unreadable episodes because of insecure sources
|
- ♻️ Rollback: Hide unreadable episodes because of insecure sources
|
||||||
|
|
||||||
## 2.2.0 - 2024-05-18
|
## 2.2.0 - Moving in and out - 2024-05-18
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- 🚨 Linting the code with ESLint
|
- 🚨 Linting the code with ESLint
|
||||||
@ -37,7 +129,7 @@
|
|||||||
### Fixed
|
### Fixed
|
||||||
- 🔓 Hide unreadable episodes because of insecure sources
|
- 🔓 Hide unreadable episodes because of insecure sources
|
||||||
|
|
||||||
## 2.1.0 - 2024-03-16
|
## 2.1.0 - Pocket Gundams - 2024-03-16
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- 🔍 Add CTA for rating the app on the store
|
- 🔍 Add CTA for rating the app on the store
|
||||||
@ -51,7 +143,7 @@
|
|||||||
- 🔒 App wasn't working for non admin users
|
- 🔒 App wasn't working for non admin users
|
||||||
[#76](https://git.crystalyx.net/Xefir/repod/issues/76) reported by @devasservice
|
[#76](https://git.crystalyx.net/Xefir/repod/issues/76) reported by @devasservice
|
||||||
|
|
||||||
## 2.0.0 - 2024-03-05
|
## 2.0.0 - Taking Actions - 2024-03-05
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- 🍪 Saving filters preference
|
- 🍪 Saving filters preference
|
||||||
@ -68,13 +160,13 @@
|
|||||||
### Fixed
|
### Fixed
|
||||||
- ❤️🔥 Better handling ended episodes
|
- ❤️🔥 Better handling ended episodes
|
||||||
|
|
||||||
## 1.5.9 - 2024-02-21
|
## 1.5.9 - Just According to Keikaku - 2024-02-21
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- 🧑💻 Change some endpoints to match gPodder.net "specifications"
|
- 🧑💻 Change some endpoints to match gPodder.net "specifications"
|
||||||
- ⬆️ Update @nextcloud/vue to 8.7.0
|
- ⬆️ Update @nextcloud/vue to 8.7.0
|
||||||
|
|
||||||
## 1.5.8 - 2024-02-11
|
## 1.5.8 - Goblet of Eonothem - 2024-02-11
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fyyd API sometime send empty feeds, ignoring them
|
- Fyyd API sometime send empty feeds, ignoring them
|
||||||
@ -92,19 +184,19 @@
|
|||||||
### Changed
|
### Changed
|
||||||
- Update @nextcloud/vue to v8.6.2
|
- Update @nextcloud/vue to v8.6.2
|
||||||
|
|
||||||
## 1.5.5 - 2024-02-04
|
## 1.5.5 - Hide and seek - 2024-02-04
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Can't open podcast details if cache missing or misconfigured
|
- Can't open podcast details if cache missing or misconfigured
|
||||||
[#58](https://git.crystalyx.net/Xefir/repod/issues/58) reported by @raxventus
|
[#58](https://git.crystalyx.net/Xefir/repod/issues/58) reported by @raxventus
|
||||||
|
|
||||||
## 1.5.4 - 2024-02-03
|
## 1.5.4 - In search of the truth - 2024-02-03
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Nextcloud search engine didn't work on Nextcloud 26 and 27
|
- Nextcloud search engine didn't work on Nextcloud 26 and 27
|
||||||
[#57](https://git.crystalyx.net/Xefir/repod/issues/57) reported by @JonOfUs
|
[#57](https://git.crystalyx.net/Xefir/repod/issues/57) reported by @JonOfUs
|
||||||
|
|
||||||
## 1.5.3 - 2024-02-01
|
## 1.5.3 - The date where it all ends - 2024-02-01
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Update @nextcloud/vue to v8.6.1
|
- Update @nextcloud/vue to v8.6.1
|
||||||
@ -112,7 +204,7 @@
|
|||||||
### Fixed
|
### Fixed
|
||||||
- Fix episode listing crashing if an invalid publication date is present in the RSS
|
- Fix episode listing crashing if an invalid publication date is present in the RSS
|
||||||
|
|
||||||
## 1.5.2 - 2024-02-01
|
## 1.5.2 - A little to the top - 2024-02-01
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Update @nextcloud/router to v3.0.0
|
- Update @nextcloud/router to v3.0.0
|
||||||
@ -120,7 +212,7 @@
|
|||||||
### Fixed
|
### Fixed
|
||||||
- Fix player alignment off by a couple of pixels
|
- Fix player alignment off by a couple of pixels
|
||||||
|
|
||||||
## 1.5.1 - 2024-01-30
|
## 1.5.1 - Play on the PlayHead - 2024-01-30
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Update @nextcloud/vue to v8.6.0
|
- Update @nextcloud/vue to v8.6.0
|
||||||
@ -130,7 +222,7 @@
|
|||||||
### Fixed
|
### Fixed
|
||||||
- Force the placement of the filter settings to the top
|
- Force the placement of the filter settings to the top
|
||||||
|
|
||||||
## 1.5.0 - 2024-01-30
|
## 1.5.0 - Featuring the filtering - 2024-01-30
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Filtering options for each podcast section
|
- Filtering options for each podcast section
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
In the Nextcloud community, participants from all over the world come together to create Free Software for a free internet. This is made possible by the support, hard work and enthusiasm of thousands of people, including those who create and use Nextcloud software.
|
|
||||||
|
|
||||||
Our code of conduct offers some guidance to ensure Nextcloud participants can cooperate effectively in a positive and inspiring atmosphere, and to explain how together we can strengthen and support each other.
|
|
||||||
|
|
||||||
The Code of Conduct is shared by all contributors and users who engage with the Nextcloud team and its community services. It presents a summary of the shared values and “common sense” thinking in our community.
|
|
||||||
|
|
||||||
You can find our full code of conduct on our website: https://nextcloud.com/code-of-conduct/
|
|
||||||
|
|
||||||
Please, keep our CoC in mind when you contribute! That way, everyone can be a part of our community in a productive, positive, creative and fun way.
|
|
12
Dockerfile
@ -1,10 +1,10 @@
|
|||||||
FROM nextcloud:29
|
FROM nextcloud:30
|
||||||
|
|
||||||
ENV NEXTCLOUD_UPDATE 1
|
ENV NEXTCLOUD_UPDATE=1
|
||||||
ENV NEXTCLOUD_ADMIN_USER repod
|
ENV NEXTCLOUD_ADMIN_USER=repod
|
||||||
ENV NEXTCLOUD_ADMIN_PASSWORD repod
|
ENV NEXTCLOUD_ADMIN_PASSWORD=repod
|
||||||
ENV NEXTCLOUD_INIT_HTACCESS 1
|
ENV NEXTCLOUD_INIT_HTACCESS=1
|
||||||
ENV SQLITE_DATABASE repod
|
ENV SQLITE_DATABASE=repod
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y nodejs npm sqlite3 && \
|
apt-get install -y nodejs npm sqlite3 && \
|
||||||
|
87
Makefile
@ -103,14 +103,14 @@ dist: build
|
|||||||
source:
|
source:
|
||||||
rm -rf $(source_build_directory)
|
rm -rf $(source_build_directory)
|
||||||
mkdir -p $(source_build_directory)
|
mkdir -p $(source_build_directory)
|
||||||
tar cvzf $(source_package_name).tar.gz \
|
tar -C .. -cvzf $(source_package_name).tar.gz \
|
||||||
--exclude-vcs \
|
--exclude-vcs \
|
||||||
--exclude="../$(app_name)/build" \
|
--exclude="$(app_name)/build" \
|
||||||
--exclude="../$(app_name)/js/node_modules" \
|
--exclude="$(app_name)/js/node_modules" \
|
||||||
--exclude="../$(app_name)/node_modules" \
|
--exclude="$(app_name)/node_modules" \
|
||||||
--exclude="../$(app_name)/*.log" \
|
--exclude="$(app_name)/*.log" \
|
||||||
--exclude="../$(app_name)/js/*.log" \
|
--exclude="$(app_name)/js/*.log" \
|
||||||
../$(app_name)
|
$(app_name)
|
||||||
|
|
||||||
# Builds the source package for the app store, ignores php tests, js tests
|
# Builds the source package for the app store, ignores php tests, js tests
|
||||||
# and build related folders that are unnecessary for an appstore release
|
# and build related folders that are unnecessary for an appstore release
|
||||||
@ -118,42 +118,43 @@ source:
|
|||||||
appstore:
|
appstore:
|
||||||
rm -rf $(appstore_build_directory)
|
rm -rf $(appstore_build_directory)
|
||||||
mkdir -p $(appstore_build_directory)
|
mkdir -p $(appstore_build_directory)
|
||||||
tar cvzf $(appstore_package_name).tar.gz \
|
tar -C .. -cvzf $(appstore_package_name).tar.gz \
|
||||||
--exclude="../$(app_name)/build" \
|
--exclude="$(app_name)/build" \
|
||||||
--exclude="../$(app_name)/tests" \
|
--exclude="$(app_name)/tests" \
|
||||||
--exclude="../$(app_name)/Makefile" \
|
--exclude="$(app_name)/Makefile" \
|
||||||
--exclude="../$(app_name)/*.log" \
|
--exclude="$(app_name)/*.log" \
|
||||||
--exclude="../$(app_name)/phpunit*xml" \
|
--exclude="$(app_name)/phpunit*xml" \
|
||||||
--exclude="../$(app_name)/composer.*" \
|
--exclude="$(app_name)/composer.*" \
|
||||||
--exclude="../$(app_name)/node_modules" \
|
--exclude="$(app_name)/node_modules" \
|
||||||
--exclude="../$(app_name)/js/node_modules" \
|
--exclude="$(app_name)/js/node_modules" \
|
||||||
--exclude="../$(app_name)/js/tests" \
|
--exclude="$(app_name)/js/tests" \
|
||||||
--exclude="../$(app_name)/js/test" \
|
--exclude="$(app_name)/js/test" \
|
||||||
--exclude="../$(app_name)/js/*.log" \
|
--exclude="$(app_name)/js/*.log" \
|
||||||
--exclude="../$(app_name)/js/package.json" \
|
--exclude="$(app_name)/js/package.json" \
|
||||||
--exclude="../$(app_name)/js/bower.json" \
|
--exclude="$(app_name)/js/bower.json" \
|
||||||
--exclude="../$(app_name)/js/karma.*" \
|
--exclude="$(app_name)/js/karma.*" \
|
||||||
--exclude="../$(app_name)/js/protractor.*" \
|
--exclude="$(app_name)/js/protractor.*" \
|
||||||
--exclude="../$(app_name)/package.json" \
|
--exclude="$(app_name)/package.json" \
|
||||||
--exclude="../$(app_name)/bower.json" \
|
--exclude="$(app_name)/bower.json" \
|
||||||
--exclude="../$(app_name)/karma.*" \
|
--exclude="$(app_name)/karma.*" \
|
||||||
--exclude="../$(app_name)/protractor\.*" \
|
--exclude="$(app_name)/protractor\.*" \
|
||||||
--exclude="../$(app_name)/.*" \
|
--exclude="$(app_name)/.*" \
|
||||||
--exclude="../$(app_name)/js/.*" \
|
--exclude="$(app_name)/js/.*" \
|
||||||
--exclude="../$(app_name)/webpack.js" \
|
--exclude="$(app_name)/tsconfig.json" \
|
||||||
--exclude="../$(app_name)/stylelint.config.js" \
|
--exclude="$(app_name)/stylelint.config.cjs" \
|
||||||
--exclude="../$(app_name)/README.md" \
|
--exclude="$(app_name)/README.md" \
|
||||||
--exclude="../$(app_name)/package-lock.json" \
|
--exclude="$(app_name)/package-lock.json" \
|
||||||
--exclude="../$(app_name)/LICENSE" \
|
--exclude="$(app_name)/LICENSE" \
|
||||||
--exclude="../$(app_name)/src" \
|
--exclude="$(app_name)/src" \
|
||||||
--exclude="../$(app_name)/stubs" \
|
--exclude="$(app_name)/stubs" \
|
||||||
--exclude="../$(app_name)/screens" \
|
--exclude="$(app_name)/screens" \
|
||||||
--exclude="../$(app_name)/vendor" \
|
--exclude="$(app_name)/vendor" \
|
||||||
--exclude="../$(app_name)/translationfiles" \
|
--exclude="$(app_name)/translationfiles" \
|
||||||
--exclude="../$(app_name)/Dockerfile" \
|
--exclude="$(app_name)/Dockerfile" \
|
||||||
--exclude="../$(app_name)/psalm.xml" \
|
--exclude="$(app_name)/psalm.xml" \
|
||||||
--exclude="../$(app_name)/renovate.json" \
|
--exclude="$(app_name)/renovate.json" \
|
||||||
../$(app_name)
|
--exclude="$(app_name)/vite.config.ts" \
|
||||||
|
$(app_name)
|
||||||
|
|
||||||
# Start a nextcloud server on Docker to kickstart developement
|
# Start a nextcloud server on Docker to kickstart developement
|
||||||
.PHONY: dev
|
.PHONY: dev
|
||||||
|
13
README.md
@ -12,7 +12,6 @@ You need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) inst
|
|||||||
- Import and export subscriptions
|
- Import and export subscriptions
|
||||||
- Mobile friendly interface
|
- Mobile friendly interface
|
||||||
- Unified search integration
|
- Unified search integration
|
||||||
- Interface in multiple languages
|
|
||||||
|
|
||||||
## Comparaison with similar apps for Nextcloud
|
## Comparaison with similar apps for Nextcloud
|
||||||
|
|
||||||
@ -25,17 +24,24 @@ You need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) inst
|
|||||||
| Listen synced episodes by another clients | ✅ | ✅ | ❌ | ❌ |
|
| Listen synced episodes by another clients | ✅ | ✅ | ❌ | ❌ |
|
||||||
| Fetch and listen new epidodes | ✅ | ❌ | ✅ | ✅ |
|
| Fetch and listen new epidodes | ✅ | ❌ | ✅ | ✅ |
|
||||||
| Keep track of listened episodes | ✅ | ✅ | ❌ | ✅ |
|
| Keep track of listened episodes | ✅ | ✅ | ❌ | ✅ |
|
||||||
|
| Download epidodes | ✅ | ✅ | ❌ | ✅ |
|
||||||
| Import and export subscriptions | ✅ | ❌ | ❌ | ❌ |
|
| Import and export subscriptions | ✅ | ❌ | ❌ | ❌ |
|
||||||
| Search and discover new podcasts | ✅ | ❌ | ❌ | ✅ |
|
| Search and discover new podcasts | ✅ | ❌ | ❌ | ✅ |
|
||||||
|
| Open episode website and RSS feed | ✅ | ✅ | ❌ | ✅ |
|
||||||
| Integrate with Nextcloud search engine | ✅ | ❌ | ❌ | ✅ |
|
| Integrate with Nextcloud search engine | ✅ | ❌ | ❌ | ✅ |
|
||||||
|
| Integrate with [Nextcloud Notes](https://apps.nextcloud.com/apps/notes) | ❌ | ✅ | ❌ | ❌ |
|
||||||
| Mobile friendly interface | ✅ | ❌ | ✅ | ✅ |
|
| Mobile friendly interface | ✅ | ❌ | ✅ | ✅ |
|
||||||
| Support chapters | ❌ | ❌ | ❌ | ✅ |
|
| Support chapters | ❌ | ❌ | ❌ | ✅ |
|
||||||
|
| Available in multiple languages | ⭕ (en/fr/de) | ❌ | ✅ | ⭕ (en/de) |
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
### Homepage
|
### Homepage
|
||||||
![homepage](./screens/index.png)
|
![homepage](./screens/index.png)
|
||||||
|
|
||||||
|
### Discover
|
||||||
|
![homepage](./screens/discover.png)
|
||||||
|
|
||||||
### Search
|
### Search
|
||||||
![search](./screens/search.png)
|
![search](./screens/search.png)
|
||||||
|
|
||||||
@ -52,11 +58,16 @@ You need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) inst
|
|||||||
| [AntennaPod](https://antennapod.org) | Initial purpose for this project, as a synchronization endpoint for this client.<br> Support is available [as of version 2.5.1](https://github.com/AntennaPod/AntennaPod/pull/5243/). |
|
| [AntennaPod](https://antennapod.org) | Initial purpose for this project, as a synchronization endpoint for this client.<br> Support is available [as of version 2.5.1](https://github.com/AntennaPod/AntennaPod/pull/5243/). |
|
||||||
| [KDE Kasts](https://apps.kde.org/de/kasts/) | Supported since version 21.12 |
|
| [KDE Kasts](https://apps.kde.org/de/kasts/) | Supported since version 21.12 |
|
||||||
| [Podcast Merlin](https://github.com/yoyoooooooooo/Podcast-Merlin--Nextcloud-Gpodder-Client-For-Windows) | Full sync support podcast client for Windows |
|
| [Podcast Merlin](https://github.com/yoyoooooooooo/Podcast-Merlin--Nextcloud-Gpodder-Client-For-Windows) | Full sync support podcast client for Windows |
|
||||||
|
| [Cardo](https://cardo-podcast.github.io/#/cardo) | Podcast client with sync support, for Windows, Mac and Linux |
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Either from the official Nextcloud [app store](https://apps.nextcloud.com/apps/repod) or by downloading the [latest release](https://git.crystalyx.net/Xefir/repod/releases/latest) and extracting it into your Nextcloud `apps/` directory.
|
Either from the official Nextcloud [app store](https://apps.nextcloud.com/apps/repod) or by downloading the [latest release](https://git.crystalyx.net/Xefir/repod/releases/latest) and extracting it into your Nextcloud `apps/` directory.
|
||||||
|
|
||||||
|
## Known issues
|
||||||
|
|
||||||
|
- Conflict with Plasma Integration Firefox addon ([#164](https://git.crystalyx.net/Xefir/repod/issues/164))
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
- [GPodder Sync](https://github.com/thrillfall/nextcloud-gpodder) for the database API
|
- [GPodder Sync](https://github.com/thrillfall/nextcloud-gpodder) for the database API
|
||||||
|
@ -7,11 +7,14 @@
|
|||||||
<description><![CDATA[## Features
|
<description><![CDATA[## Features
|
||||||
- 🔍 Browse and subscribe huge collection of podcasts
|
- 🔍 Browse and subscribe huge collection of podcasts
|
||||||
- 🔊 Listen to episodes directly in Nextcloud
|
- 🔊 Listen to episodes directly in Nextcloud
|
||||||
- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/)
|
- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/) and [other apps](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-gpoddersync)
|
||||||
|
- 📱 Mobile friendly interface
|
||||||
|
- 📡 Import and export your subscriptions
|
||||||
|
- ➡️ Full features comparison [here](https://git.crystalyx.net/Xefir/repod#comparaison-with-similar-apps-for-nextcloud)
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
You need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!]]></description>
|
You need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!]]></description>
|
||||||
<version>2.3.1</version>
|
<version>3.3.2</version>
|
||||||
<licence>agpl</licence>
|
<licence>agpl</licence>
|
||||||
<author mail="xefir@crystalyx.net" homepage="https://crystalyx.net">Michel Roux</author>
|
<author mail="xefir@crystalyx.net" homepage="https://crystalyx.net">Michel Roux</author>
|
||||||
<namespace>RePod</namespace>
|
<namespace>RePod</namespace>
|
||||||
@ -20,17 +23,21 @@ You need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) inst
|
|||||||
<website>https://git.crystalyx.net/Xefir/repod</website>
|
<website>https://git.crystalyx.net/Xefir/repod</website>
|
||||||
<bugs>https://git.crystalyx.net/Xefir/repod/issues</bugs>
|
<bugs>https://git.crystalyx.net/Xefir/repod/issues</bugs>
|
||||||
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/index.png</screenshot>
|
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/index.png</screenshot>
|
||||||
|
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/discover.png</screenshot>
|
||||||
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/search.png</screenshot>
|
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/search.png</screenshot>
|
||||||
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/episodes.png</screenshot>
|
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/episodes.png</screenshot>
|
||||||
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/modal.png</screenshot>
|
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/modal.png</screenshot>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<php min-version="8.1"/>
|
<php min-version="8.1"/>
|
||||||
<nextcloud min-version="27" max-version="29"/>
|
<nextcloud min-version="29" max-version="30"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<navigations>
|
<navigations>
|
||||||
<navigation>
|
<navigation>
|
||||||
|
<id>repod</id>
|
||||||
<name>Podcast</name>
|
<name>Podcast</name>
|
||||||
<route>repod.page.index</route>
|
<route>repod.page.index</route>
|
||||||
|
<icon>app.svg</icon>
|
||||||
|
<type>link</type>
|
||||||
</navigation>
|
</navigation>
|
||||||
</navigations>
|
</navigations>
|
||||||
</info>
|
</info>
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create your routes in here. The name is the lowercase name of the controller
|
|
||||||
* without the controller part, the stuff after the hash is the method.
|
|
||||||
* e.g. page#index -> OCA\RePod\Controller\PageController->index().
|
|
||||||
*
|
|
||||||
* The controller class has to be registered in the application.php file since
|
|
||||||
* it's instantiated in there
|
|
||||||
*/
|
|
||||||
return [
|
|
||||||
'routes' => [
|
|
||||||
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
|
|
||||||
['name' => 'episodes#action', 'url' => '/episodes/action', 'verb' => 'GET'],
|
|
||||||
['name' => 'episodes#list', 'url' => '/episodes/list', 'verb' => 'GET'],
|
|
||||||
['name' => 'opml#export', 'url' => '/opml/export', 'verb' => 'GET'],
|
|
||||||
['name' => 'opml#import', 'url' => '/opml/import', 'verb' => 'POST'],
|
|
||||||
['name' => 'podcast#index', 'url' => '/podcast', 'verb' => 'GET'],
|
|
||||||
['name' => 'search#index', 'url' => '/search', 'verb' => 'GET'],
|
|
||||||
['name' => 'toplist#hot', 'url' => '/toplist/hot', 'verb' => 'GET'],
|
|
||||||
['name' => 'toplist#new', 'url' => '/toplist/new', 'verb' => 'GET'],
|
|
||||||
],
|
|
||||||
];
|
|
@ -15,10 +15,10 @@
|
|||||||
"psalm": "psalm --threads=1 --no-cache --show-info=true"
|
"psalm": "psalm --threads=1 --no-cache --show-info=true"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"nextcloud/ocp": "^29.0.1",
|
"nextcloud/ocp": "^30.0.2",
|
||||||
"roave/security-advisories": "dev-latest",
|
"roave/security-advisories": "dev-latest",
|
||||||
"nextcloud/coding-standard": "^1.2.1",
|
"nextcloud/coding-standard": "^1.3.2",
|
||||||
"vimeo/psalm": "^5.24.0"
|
"vimeo/psalm": "^5.26.1"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"optimize-autoloader": true,
|
"optimize-autoloader": true,
|
||||||
|
623
composer.lock
generated
54
l10n/de.js
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
OC.L10N.register(
|
||||||
|
"repod",
|
||||||
|
{
|
||||||
|
"RePod Subscriptions" : "RePod Abonnements",
|
||||||
|
"Podcast" : "Podcast",
|
||||||
|
"RePod" : "RePod",
|
||||||
|
"🔊 Browse, manage and listen to podcasts" : "🔊 Suchen, Verwalten und Anhören von Podcasts",
|
||||||
|
"## Features\n- 🔍 Browse and subscribe huge collection of podcasts\n- 🔊 Listen to episodes directly in Nextcloud\n- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/) and [other apps](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-gpoddersync)\n- 📱 Mobile friendly interface\n- 📡 Import and export your subscriptions\n- ➡️ Full features comparison [here](https://git.crystalyx.net/Xefir/repod#comparaison-with-similar-apps-for-nextcloud)\n\n## Requirements\nYou need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!" : "## Funktionen\n- 🔍 Durchsuchen und abonnieren einer großen Sammlung von Podcasts\n- 🔊 Episoden direkt in Nextcloud anhören\n- 🌐 Synchronisiere deine Aktivität mit [AntennaPod](https://antennapod.org/)\n- 📱 Mobile-freundliche Schnittstelle\n- 📡 Importieren und Exportieren Ihrer Abonnements\n\n## Voraussetzungen\nDu musst [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installiert haben, um diese App zu benutzen!",
|
||||||
|
"Download" : "Herunterladen",
|
||||||
|
"Add a RSS link" : "Einen RSS-Link hinzufügen",
|
||||||
|
"Subscribe" : "Abonnieren",
|
||||||
|
"Error while adding the feed" : "Fehler beim Hinzufügen des Feeds",
|
||||||
|
"Could not fetch search results" : "Suchergebnisse können nicht geladen werden",
|
||||||
|
"New podcasts" : "Neue Podcasts",
|
||||||
|
"Hot podcasts" : "Beliebte Podcasts",
|
||||||
|
"Could not fetch tops" : "Titel können nicht abgerufen werden",
|
||||||
|
"Copy feed" : "Feed kopieren",
|
||||||
|
"Link copied to the clipboard" : "Der Link des Feeds wurde in die Zwischenablage kopiert",
|
||||||
|
"Play" : "Abspielen",
|
||||||
|
"Stop" : "Stopp",
|
||||||
|
"Read" : "Gelesen",
|
||||||
|
"Open website" : "Webseite aufrufen",
|
||||||
|
"Could not change the status of the episode" : "Kann den Status der Folge nicht ändern",
|
||||||
|
"Could not fetch episodes" : "Folgen können nicht abgerufen werden",
|
||||||
|
"Rewind 10 seconds" : "10 Sekunden zurückspulen",
|
||||||
|
"Pause" : "Pause",
|
||||||
|
"Fast forward 30 seconds" : "30 Sekunden vorspulen",
|
||||||
|
"Mute" : "Stumm",
|
||||||
|
"Unmute" : "Stummschalten",
|
||||||
|
"Export subscriptions" : "Abonnements exportieren",
|
||||||
|
"Filtering episodes" : "Folgen filtern",
|
||||||
|
"Show all" : "Zeige alles",
|
||||||
|
"Listened" : "Gehört",
|
||||||
|
"Listening" : "Läuft",
|
||||||
|
"Unlistened" : "Nicht angehört",
|
||||||
|
"Import subscriptions" : "Importiere Abonnements",
|
||||||
|
"Import OPML file" : "Importiere OPML-Datei",
|
||||||
|
"Rate RePod ❤️" : "Bewerte RePod ❤️",
|
||||||
|
"Playback speed" : "Wiedergabegeschwindigkeit",
|
||||||
|
"Favorite" : "Favorit",
|
||||||
|
"Are you sure you want to delete this subscription?" : "Bist Du sicher, dass Du das Abonnement löschen möchtest?",
|
||||||
|
"Error while removing the feed" : "Fehler beim Löschen des Feeds",
|
||||||
|
"You can only have 10 favorites" : "Du kannst nur 10 Favoriten haben",
|
||||||
|
"Add a podcast" : "Einen Podcast hinzufügen",
|
||||||
|
"Could not fetch subscriptions" : "Abonnements können nicht abgerufen werden",
|
||||||
|
"Find a podcast" : "Finde einen Podcast",
|
||||||
|
"Error loading feed" : "Fehler beim Laden des Feeds",
|
||||||
|
"Missing required app" : "Benötigte App fehlt",
|
||||||
|
"Install GPodder Sync" : "Installiere GPodder Sync",
|
||||||
|
"Pin some subscriptions to see their latest updates" : "Pinne einige Abonnements, um ihre neuesten Updates zu sehen",
|
||||||
|
"No favorites" : "Keine Favoriten",
|
||||||
|
"A browser extension conflict with RePod" : "Ein Browser-Erweiterungskonflikt mit RePod"
|
||||||
|
},
|
||||||
|
"");
|
52
l10n/de.json
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{ "translations": {
|
||||||
|
"RePod Subscriptions" : "RePod Abonnements",
|
||||||
|
"Podcast" : "Podcast",
|
||||||
|
"RePod" : "RePod",
|
||||||
|
"🔊 Browse, manage and listen to podcasts" : "🔊 Suchen, Verwalten und Anhören von Podcasts",
|
||||||
|
"## Features\n- 🔍 Browse and subscribe huge collection of podcasts\n- 🔊 Listen to episodes directly in Nextcloud\n- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/) and [other apps](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-gpoddersync)\n- 📱 Mobile friendly interface\n- 📡 Import and export your subscriptions\n- ➡️ Full features comparison [here](https://git.crystalyx.net/Xefir/repod#comparaison-with-similar-apps-for-nextcloud)\n\n## Requirements\nYou need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!" : "## Funktionen\n- 🔍 Durchsuchen und abonnieren einer großen Sammlung von Podcasts\n- 🔊 Episoden direkt in Nextcloud anhören\n- 🌐 Synchronisiere deine Aktivität mit [AntennaPod](https://antennapod.org/)\n- 📱 Mobile-freundliche Schnittstelle\n- 📡 Importieren und Exportieren Ihrer Abonnements\n\n## Voraussetzungen\nDu musst [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installiert haben, um diese App zu benutzen!",
|
||||||
|
"Download" : "Herunterladen",
|
||||||
|
"Add a RSS link" : "Einen RSS-Link hinzufügen",
|
||||||
|
"Subscribe" : "Abonnieren",
|
||||||
|
"Error while adding the feed" : "Fehler beim Hinzufügen des Feeds",
|
||||||
|
"Could not fetch search results" : "Suchergebnisse können nicht geladen werden",
|
||||||
|
"New podcasts" : "Neue Podcasts",
|
||||||
|
"Hot podcasts" : "Beliebte Podcasts",
|
||||||
|
"Could not fetch tops" : "Titel können nicht abgerufen werden",
|
||||||
|
"Copy feed" : "Feed kopieren",
|
||||||
|
"Link copied to the clipboard" : "Der Link des Feeds wurde in die Zwischenablage kopiert",
|
||||||
|
"Play" : "Abspielen",
|
||||||
|
"Stop" : "Stopp",
|
||||||
|
"Read" : "Gelesen",
|
||||||
|
"Open website" : "Webseite aufrufen",
|
||||||
|
"Could not change the status of the episode" : "Kann den Status der Folge nicht ändern",
|
||||||
|
"Could not fetch episodes" : "Folgen können nicht abgerufen werden",
|
||||||
|
"Rewind 10 seconds" : "10 Sekunden zurückspulen",
|
||||||
|
"Pause" : "Pause",
|
||||||
|
"Fast forward 30 seconds" : "30 Sekunden vorspulen",
|
||||||
|
"Mute" : "Stumm",
|
||||||
|
"Unmute" : "Stummschalten",
|
||||||
|
"Export subscriptions" : "Abonnements exportieren",
|
||||||
|
"Filtering episodes" : "Folgen filtern",
|
||||||
|
"Show all" : "Zeige alles",
|
||||||
|
"Listened" : "Gehört",
|
||||||
|
"Listening" : "Läuft",
|
||||||
|
"Unlistened" : "Nicht angehört",
|
||||||
|
"Import subscriptions" : "Importiere Abonnements",
|
||||||
|
"Import OPML file" : "Importiere OPML-Datei",
|
||||||
|
"Rate RePod ❤️" : "Bewerte RePod ❤️",
|
||||||
|
"Playback speed" : "Wiedergabegeschwindigkeit",
|
||||||
|
"Favorite" : "Favorit",
|
||||||
|
"Are you sure you want to delete this subscription?" : "Bist Du sicher, dass Du das Abonnement löschen möchtest?",
|
||||||
|
"Error while removing the feed" : "Fehler beim Löschen des Feeds",
|
||||||
|
"You can only have 10 favorites" : "Du kannst nur 10 Favoriten haben",
|
||||||
|
"Add a podcast" : "Einen Podcast hinzufügen",
|
||||||
|
"Could not fetch subscriptions" : "Abonnements können nicht abgerufen werden",
|
||||||
|
"Find a podcast" : "Finde einen Podcast",
|
||||||
|
"Error loading feed" : "Fehler beim Laden des Feeds",
|
||||||
|
"Missing required app" : "Benötigte App fehlt",
|
||||||
|
"Install GPodder Sync" : "Installiere GPodder Sync",
|
||||||
|
"Pin some subscriptions to see their latest updates" : "Pinne einige Abonnements, um ihre neuesten Updates zu sehen",
|
||||||
|
"No favorites" : "Keine Favoriten",
|
||||||
|
"A browser extension conflict with RePod" : "Ein Browser-Erweiterungskonflikt mit RePod"
|
||||||
|
},"pluralForm" :""
|
||||||
|
}
|
19
l10n/fr.js
@ -5,7 +5,7 @@ OC.L10N.register(
|
|||||||
"Podcast" : "Podcast",
|
"Podcast" : "Podcast",
|
||||||
"RePod" : "RePod",
|
"RePod" : "RePod",
|
||||||
"🔊 Browse, manage and listen to podcasts" : "🔊 Parcourir, gérer et écouter vos podcasts",
|
"🔊 Browse, manage and listen to podcasts" : "🔊 Parcourir, gérer et écouter vos podcasts",
|
||||||
"## Features\n- 🔍 Browse and subscribe huge collection of podcasts\n- 🔊 Listen to episodes directly in Nextcloud\n- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/)\n\n## Requirements\nYou need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!" : "## Fonctionnalités\n- 🔍 Parcourir et s'abonner à une grande collections de podcasts\n- 🔊 Écouter vos épisodes directement sur Nextcloud\n- 🌐 Synchroniser son activité avec [AntennaPod](https://antennapod.org/)\n\n## Pré-requis\nVous devez avoir [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installé pour utiliser cette application !",
|
"## Features\n- 🔍 Browse and subscribe huge collection of podcasts\n- 🔊 Listen to episodes directly in Nextcloud\n- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/) and [other apps](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-gpoddersync)\n- 📱 Mobile friendly interface\n- 📡 Import and export your subscriptions\n- ➡️ Full features comparison [here](https://git.crystalyx.net/Xefir/repod#comparaison-with-similar-apps-for-nextcloud)\n\n## Requirements\nYou need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!" : "## Fonctionnalités\n- 🔍 Parcourir et s'abonner à une grande collections de podcasts\n- 🔊 Écouter vos épisodes directement sur Nextcloud\n- 🌐 Synchroniser son activité avec [AntennaPod](https://antennapod.org/) et d'autres [applications](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-gpoddersync)\n- 📱 Interface optimisée pour mobiles et ordinateurs\n- 📡 Import/export de ses abonnements\n- ➡️ Tableau récapitulatif complet des fonctionnalitées [ici](https://git.crystalyx.net/Xefir/repod#comparaison-with-similar-apps-for-nextcloud)\n\n## Pré-requis\nVous devez avoir [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installé pour utiliser cette application !",
|
||||||
"Download" : "Télécharger",
|
"Download" : "Télécharger",
|
||||||
"Add a RSS link" : "Ajouter un lien RSS",
|
"Add a RSS link" : "Ajouter un lien RSS",
|
||||||
"Subscribe" : "S'abonner",
|
"Subscribe" : "S'abonner",
|
||||||
@ -15,13 +15,18 @@ OC.L10N.register(
|
|||||||
"Hot podcasts" : "Tendances",
|
"Hot podcasts" : "Tendances",
|
||||||
"Could not fetch tops" : "Impossible de récupérer les tops",
|
"Could not fetch tops" : "Impossible de récupérer les tops",
|
||||||
"Copy feed" : "Copier le flux",
|
"Copy feed" : "Copier le flux",
|
||||||
|
"Link copied to the clipboard" : "Lien vers le flux copié dans le presse-papiers",
|
||||||
"Play" : "Lecture",
|
"Play" : "Lecture",
|
||||||
"Stop" : "Arrêter",
|
"Stop" : "Arrêter",
|
||||||
"Mark as read" : "Marquer comme lu",
|
"Read" : "Lu",
|
||||||
"Mark as unread" : "Marquer comme non lu",
|
|
||||||
"Open website" : "Ouvrir le site web",
|
"Open website" : "Ouvrir le site web",
|
||||||
"Could not fetch episodes" : "Impossible de récuprer les épisodes",
|
|
||||||
"Could not change the status of the episode" : "Impossible de changer le status de l'épisode",
|
"Could not change the status of the episode" : "Impossible de changer le status de l'épisode",
|
||||||
|
"Could not fetch episodes" : "Impossible de récuprer les épisodes",
|
||||||
|
"Rewind 10 seconds" : "Retour rapide de 10 secondes",
|
||||||
|
"Pause" : "Pause",
|
||||||
|
"Fast forward 30 seconds" : "Avance rapide de 30 secondes",
|
||||||
|
"Mute" : "Silencer",
|
||||||
|
"Unmute" : "Paroler",
|
||||||
"Export subscriptions" : "Exporter les abonnements",
|
"Export subscriptions" : "Exporter les abonnements",
|
||||||
"Filtering episodes" : "Filtrage des épisodes",
|
"Filtering episodes" : "Filtrage des épisodes",
|
||||||
"Show all" : "Montrer tout",
|
"Show all" : "Montrer tout",
|
||||||
@ -32,14 +37,18 @@ OC.L10N.register(
|
|||||||
"Import OPML file" : "Importer un fichier OPML",
|
"Import OPML file" : "Importer un fichier OPML",
|
||||||
"Rate RePod ❤️" : "Donnez votre avis ❤️",
|
"Rate RePod ❤️" : "Donnez votre avis ❤️",
|
||||||
"Playback speed" : "Vitesse de lecture",
|
"Playback speed" : "Vitesse de lecture",
|
||||||
|
"Favorite" : "Favori",
|
||||||
"Are you sure you want to delete this subscription?" : "Êtes-vous sûr de vouloir supprimer ce flux ?",
|
"Are you sure you want to delete this subscription?" : "Êtes-vous sûr de vouloir supprimer ce flux ?",
|
||||||
"Error while removing the feed" : "Erreur lors de la suppression du flux",
|
"Error while removing the feed" : "Erreur lors de la suppression du flux",
|
||||||
|
"You can only have 10 favorites" : "Vous ne pouvez avoir que 10 favoris",
|
||||||
"Add a podcast" : "Ajouter un podcast",
|
"Add a podcast" : "Ajouter un podcast",
|
||||||
"Could not fetch subscriptions" : "Impossible de récupérer les flux",
|
"Could not fetch subscriptions" : "Impossible de récupérer les flux",
|
||||||
"Find a podcast" : "Chercher un podcast",
|
"Find a podcast" : "Chercher un podcast",
|
||||||
"Error loading feed" : "Erreur lors du chargement du flux",
|
"Error loading feed" : "Erreur lors du chargement du flux",
|
||||||
"Missing required app" : "Une application requise est manquante",
|
"Missing required app" : "Une application requise est manquante",
|
||||||
"Install GPodder Sync" : "Installer GPodder Sync",
|
"Install GPodder Sync" : "Installer GPodder Sync",
|
||||||
"Feed's link copied to the clipboard" : "Lien vers le flux copié dans le presse-papiers"
|
"Pin some subscriptions to see their latest updates" : "Ajoutez des abonnements en favoris pour obtenir les dernières nouvelles ici",
|
||||||
|
"No favorites" : "Aucun favoris",
|
||||||
|
"A browser extension conflict with RePod" : "Une extension de votre navigateur entre en conflit avec RePod"
|
||||||
},
|
},
|
||||||
"");
|
"");
|
||||||
|
19
l10n/fr.json
@ -3,7 +3,7 @@
|
|||||||
"Podcast" : "Podcast",
|
"Podcast" : "Podcast",
|
||||||
"RePod" : "RePod",
|
"RePod" : "RePod",
|
||||||
"🔊 Browse, manage and listen to podcasts" : "🔊 Parcourir, gérer et écouter vos podcasts",
|
"🔊 Browse, manage and listen to podcasts" : "🔊 Parcourir, gérer et écouter vos podcasts",
|
||||||
"## Features\n- 🔍 Browse and subscribe huge collection of podcasts\n- 🔊 Listen to episodes directly in Nextcloud\n- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/)\n\n## Requirements\nYou need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!" : "## Fonctionnalités\n- 🔍 Parcourir et s'abonner à une grande collections de podcasts\n- 🔊 Écouter vos épisodes directement sur Nextcloud\n- 🌐 Synchroniser son activité avec [AntennaPod](https://antennapod.org/)\n\n## Pré-requis\nVous devez avoir [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installé pour utiliser cette application !",
|
"## Features\n- 🔍 Browse and subscribe huge collection of podcasts\n- 🔊 Listen to episodes directly in Nextcloud\n- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/) and [other apps](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-gpoddersync)\n- 📱 Mobile friendly interface\n- 📡 Import and export your subscriptions\n- ➡️ Full features comparison [here](https://git.crystalyx.net/Xefir/repod#comparaison-with-similar-apps-for-nextcloud)\n\n## Requirements\nYou need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!" : "## Fonctionnalités\n- 🔍 Parcourir et s'abonner à une grande collections de podcasts\n- 🔊 Écouter vos épisodes directement sur Nextcloud\n- 🌐 Synchroniser son activité avec [AntennaPod](https://antennapod.org/) et d'autres [applications](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-gpoddersync)\n- 📱 Interface optimisée pour mobiles et ordinateurs\n- 📡 Import/export de ses abonnements\n- ➡️ Tableau récapitulatif complet des fonctionnalitées [ici](https://git.crystalyx.net/Xefir/repod#comparaison-with-similar-apps-for-nextcloud)\n\n## Pré-requis\nVous devez avoir [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installé pour utiliser cette application !",
|
||||||
"Download" : "Télécharger",
|
"Download" : "Télécharger",
|
||||||
"Add a RSS link" : "Ajouter un lien RSS",
|
"Add a RSS link" : "Ajouter un lien RSS",
|
||||||
"Subscribe" : "S'abonner",
|
"Subscribe" : "S'abonner",
|
||||||
@ -13,13 +13,18 @@
|
|||||||
"Hot podcasts" : "Tendances",
|
"Hot podcasts" : "Tendances",
|
||||||
"Could not fetch tops" : "Impossible de récupérer les tops",
|
"Could not fetch tops" : "Impossible de récupérer les tops",
|
||||||
"Copy feed" : "Copier le flux",
|
"Copy feed" : "Copier le flux",
|
||||||
|
"Link copied to the clipboard" : "Lien vers le flux copié dans le presse-papiers",
|
||||||
"Play" : "Lecture",
|
"Play" : "Lecture",
|
||||||
"Stop" : "Arrêter",
|
"Stop" : "Arrêter",
|
||||||
"Mark as read" : "Marquer comme lu",
|
"Read" : "Lu",
|
||||||
"Mark as unread" : "Marquer comme non lu",
|
|
||||||
"Open website" : "Ouvrir le site web",
|
"Open website" : "Ouvrir le site web",
|
||||||
"Could not fetch episodes" : "Impossible de récuprer les épisodes",
|
|
||||||
"Could not change the status of the episode" : "Impossible de changer le status de l'épisode",
|
"Could not change the status of the episode" : "Impossible de changer le status de l'épisode",
|
||||||
|
"Could not fetch episodes" : "Impossible de récuprer les épisodes",
|
||||||
|
"Rewind 10 seconds" : "Retour rapide de 10 secondes",
|
||||||
|
"Pause" : "Pause",
|
||||||
|
"Fast forward 30 seconds" : "Avance rapide de 30 secondes",
|
||||||
|
"Mute" : "Silencer",
|
||||||
|
"Unmute" : "Paroler",
|
||||||
"Export subscriptions" : "Exporter les abonnements",
|
"Export subscriptions" : "Exporter les abonnements",
|
||||||
"Filtering episodes" : "Filtrage des épisodes",
|
"Filtering episodes" : "Filtrage des épisodes",
|
||||||
"Show all" : "Montrer tout",
|
"Show all" : "Montrer tout",
|
||||||
@ -30,14 +35,18 @@
|
|||||||
"Import OPML file" : "Importer un fichier OPML",
|
"Import OPML file" : "Importer un fichier OPML",
|
||||||
"Rate RePod ❤️" : "Donnez votre avis ❤️",
|
"Rate RePod ❤️" : "Donnez votre avis ❤️",
|
||||||
"Playback speed" : "Vitesse de lecture",
|
"Playback speed" : "Vitesse de lecture",
|
||||||
|
"Favorite" : "Favori",
|
||||||
"Are you sure you want to delete this subscription?" : "Êtes-vous sûr de vouloir supprimer ce flux ?",
|
"Are you sure you want to delete this subscription?" : "Êtes-vous sûr de vouloir supprimer ce flux ?",
|
||||||
"Error while removing the feed" : "Erreur lors de la suppression du flux",
|
"Error while removing the feed" : "Erreur lors de la suppression du flux",
|
||||||
|
"You can only have 10 favorites" : "Vous ne pouvez avoir que 10 favoris",
|
||||||
"Add a podcast" : "Ajouter un podcast",
|
"Add a podcast" : "Ajouter un podcast",
|
||||||
"Could not fetch subscriptions" : "Impossible de récupérer les flux",
|
"Could not fetch subscriptions" : "Impossible de récupérer les flux",
|
||||||
"Find a podcast" : "Chercher un podcast",
|
"Find a podcast" : "Chercher un podcast",
|
||||||
"Error loading feed" : "Erreur lors du chargement du flux",
|
"Error loading feed" : "Erreur lors du chargement du flux",
|
||||||
"Missing required app" : "Une application requise est manquante",
|
"Missing required app" : "Une application requise est manquante",
|
||||||
"Install GPodder Sync" : "Installer GPodder Sync",
|
"Install GPodder Sync" : "Installer GPodder Sync",
|
||||||
"Feed's link copied to the clipboard" : "Lien vers le flux copié dans le presse-papiers"
|
"Pin some subscriptions to see their latest updates" : "Ajoutez des abonnements en favoris pour obtenir les dernières nouvelles ici",
|
||||||
|
"No favorites" : "Aucun favoris",
|
||||||
|
"A browser extension conflict with RePod" : "Une extension de votre navigateur entre en conflit avec RePod"
|
||||||
},"pluralForm" :""
|
},"pluralForm" :""
|
||||||
}
|
}
|
@ -32,6 +32,10 @@ class Application extends App implements IBootstrap
|
|||||||
/** @var IInitialState $initialState */
|
/** @var IInitialState $initialState */
|
||||||
$initialState = $appContainer->get(IInitialState::class);
|
$initialState = $appContainer->get(IInitialState::class);
|
||||||
|
|
||||||
|
if (null === $appManager->getAppInfo(self::GPODDERSYNC_ID)) {
|
||||||
|
$appManager->disableApp(self::GPODDERSYNC_ID);
|
||||||
|
}
|
||||||
|
|
||||||
$gpoddersync = $appManager->isEnabledForUser(self::GPODDERSYNC_ID);
|
$gpoddersync = $appManager->isEnabledForUser(self::GPODDERSYNC_ID);
|
||||||
if (!$gpoddersync) {
|
if (!$gpoddersync) {
|
||||||
try {
|
try {
|
||||||
|
@ -11,6 +11,9 @@ use OCA\RePod\Core\EpisodeAction\EpisodeActionReader;
|
|||||||
use OCA\RePod\Service\UserService;
|
use OCA\RePod\Service\UserService;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
use OCP\AppFramework\Http;
|
use OCP\AppFramework\Http;
|
||||||
|
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
use OCP\Http\Client\IClientService;
|
use OCP\Http\Client\IClientService;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
@ -27,10 +30,9 @@ class EpisodesController extends Controller
|
|||||||
parent::__construct(Application::APP_ID, $request);
|
parent::__construct(Application::APP_ID, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[NoCSRFRequired]
|
||||||
* @NoCSRFRequired
|
#[FrontpageRoute(verb: 'GET', url: '/episodes/list')]
|
||||||
*/
|
|
||||||
public function list(string $url): JSONResponse {
|
public function list(string $url): JSONResponse {
|
||||||
$client = $this->clientService->newClient();
|
$client = $this->clientService->newClient();
|
||||||
$feed = $client->get($url);
|
$feed = $client->get($url);
|
||||||
@ -41,10 +43,9 @@ class EpisodesController extends Controller
|
|||||||
return new JSONResponse($episodes, $feed->getStatusCode());
|
return new JSONResponse($episodes, $feed->getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[NoCSRFRequired]
|
||||||
* @NoCSRFRequired
|
#[FrontpageRoute(verb: 'GET', url: '/episodes/action')]
|
||||||
*/
|
|
||||||
public function action(string $url): JSONResponse {
|
public function action(string $url): JSONResponse {
|
||||||
$action = $this->episodeActionRepository->findByEpisodeUrl($url, $this->userService->getUserUID());
|
$action = $this->episodeActionRepository->findByEpisodeUrl($url, $this->userService->getUserUID());
|
||||||
|
|
||||||
|
@ -10,6 +10,9 @@ use OCA\GPodderSync\Core\SubscriptionChange\SubscriptionChangeSaver;
|
|||||||
use OCA\RePod\AppInfo\Application;
|
use OCA\RePod\AppInfo\Application;
|
||||||
use OCA\RePod\Service\UserService;
|
use OCA\RePod\Service\UserService;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
|
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||||
use OCP\AppFramework\Http\DataDownloadResponse;
|
use OCP\AppFramework\Http\DataDownloadResponse;
|
||||||
use OCP\AppFramework\Http\Response;
|
use OCP\AppFramework\Http\Response;
|
||||||
use OCP\IL10N;
|
use OCP\IL10N;
|
||||||
@ -28,10 +31,9 @@ class OpmlController extends Controller
|
|||||||
parent::__construct(Application::APP_ID, $request);
|
parent::__construct(Application::APP_ID, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[NoCSRFRequired]
|
||||||
* @NoCSRFRequired
|
#[FrontpageRoute(verb: 'GET', url: '/opml/export')]
|
||||||
*/
|
|
||||||
public function export(): DataDownloadResponse {
|
public function export(): DataDownloadResponse {
|
||||||
// https://github.com/AntennaPod/AntennaPod/blob/master/core/src/main/java/de/danoeh/antennapod/core/export/opml/OpmlWriter.java
|
// https://github.com/AntennaPod/AntennaPod/blob/master/core/src/main/java/de/danoeh/antennapod/core/export/opml/OpmlWriter.java
|
||||||
$xml = new \SimpleXMLElement('<opml/>', namespaceOrPrefix: 'http://xmlpull.org/v1/doc/features.html#indent-output');
|
$xml = new \SimpleXMLElement('<opml/>', namespaceOrPrefix: 'http://xmlpull.org/v1/doc/features.html#indent-output');
|
||||||
@ -82,10 +84,9 @@ class OpmlController extends Controller
|
|||||||
return new DataDownloadResponse((string) $xml->asXML(), 'repod-'.$dateCreated->getTimestamp().'.opml', ' application/xml');
|
return new DataDownloadResponse((string) $xml->asXML(), 'repod-'.$dateCreated->getTimestamp().'.opml', ' application/xml');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[NoCSRFRequired]
|
||||||
* @NoCSRFRequired
|
#[FrontpageRoute(verb: 'POST', url: '/opml/import')]
|
||||||
*/
|
|
||||||
public function import(): Response {
|
public function import(): Response {
|
||||||
$file = $this->request->getUploadedFile('import');
|
$file = $this->request->getUploadedFile('import');
|
||||||
|
|
||||||
|
@ -6,18 +6,30 @@ namespace OCA\RePod\Controller;
|
|||||||
|
|
||||||
use OCA\RePod\AppInfo\Application;
|
use OCA\RePod\AppInfo\Application;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
|
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||||
use OCP\AppFramework\Http\ContentSecurityPolicy;
|
use OCP\AppFramework\Http\ContentSecurityPolicy;
|
||||||
use OCP\AppFramework\Http\TemplateResponse;
|
use OCP\AppFramework\Http\TemplateResponse;
|
||||||
|
use OCP\IConfig;
|
||||||
|
use OCP\IRequest;
|
||||||
use OCP\Util;
|
use OCP\Util;
|
||||||
|
|
||||||
class PageController extends Controller
|
class PageController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
public function __construct(
|
||||||
* @NoAdminRequired
|
IRequest $request,
|
||||||
* @NoCSRFRequired
|
private IConfig $config
|
||||||
*/
|
) {
|
||||||
|
parent::__construct(Application::APP_ID, $request);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[NoAdminRequired]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
#[FrontpageRoute(verb: 'GET', url: '/')]
|
||||||
public function index(): TemplateResponse {
|
public function index(): TemplateResponse {
|
||||||
Util::addScript(Application::APP_ID, 'main');
|
Util::addScript(Application::APP_ID, Application::APP_ID.'-main');
|
||||||
|
Util::addStyle(Application::APP_ID, Application::APP_ID.'-main');
|
||||||
|
|
||||||
$csp = new ContentSecurityPolicy();
|
$csp = new ContentSecurityPolicy();
|
||||||
$csp->addAllowedImageDomain('*');
|
$csp->addAllowedImageDomain('*');
|
||||||
@ -28,4 +40,18 @@ class PageController extends Controller
|
|||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[NoAdminRequired]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
#[FrontpageRoute(verb: 'GET', url: '/discover')]
|
||||||
|
public function discover(): TemplateResponse {
|
||||||
|
return $this->index();
|
||||||
|
}
|
||||||
|
|
||||||
|
#[NoAdminRequired]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
#[FrontpageRoute(verb: 'GET', url: '/feed/{path}', requirements: ['path' => '.+'])]
|
||||||
|
public function feed(): TemplateResponse {
|
||||||
|
return $this->index();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,29 +8,36 @@ use OCA\GPodderSync\Core\PodcastData\PodcastData;
|
|||||||
use OCA\GPodderSync\Core\PodcastData\PodcastDataReader;
|
use OCA\GPodderSync\Core\PodcastData\PodcastDataReader;
|
||||||
use OCA\RePod\AppInfo\Application;
|
use OCA\RePod\AppInfo\Application;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
|
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
use OCP\Http\Client\IClientService;
|
use OCP\Http\Client\IClientService;
|
||||||
|
use OCP\ICacheFactory;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
class PodcastController extends Controller
|
class PodcastController extends Controller
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
IRequest $request,
|
IRequest $request,
|
||||||
|
private ICacheFactory $cacheFactory,
|
||||||
private IClientService $clientService,
|
private IClientService $clientService,
|
||||||
private PodcastDataReader $podcastDataReader
|
private PodcastDataReader $podcastDataReader
|
||||||
) {
|
) {
|
||||||
parent::__construct(Application::APP_ID, $request);
|
parent::__construct(Application::APP_ID, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[NoCSRFRequired]
|
||||||
* @NoCSRFRequired
|
#[FrontpageRoute(verb: 'GET', url: '/podcast')]
|
||||||
*/
|
|
||||||
public function index(string $url): JSONResponse {
|
public function index(string $url): JSONResponse {
|
||||||
try {
|
$podcast = null;
|
||||||
$podcast = $this->podcastDataReader->tryGetCachedPodcastData($url);
|
|
||||||
} catch (\Exception $e) {
|
if ($this->cacheFactory->isLocalCacheAvailable()) {
|
||||||
$podcast = null;
|
try {
|
||||||
|
$podcast = $this->podcastDataReader->tryGetCachedPodcastData($url);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($podcast) {
|
if ($podcast) {
|
||||||
@ -41,9 +48,11 @@ class PodcastController extends Controller
|
|||||||
$feed = $client->get($url);
|
$feed = $client->get($url);
|
||||||
$podcast = PodcastData::parseRssXml((string) $feed->getBody());
|
$podcast = PodcastData::parseRssXml((string) $feed->getBody());
|
||||||
|
|
||||||
try {
|
if ($this->cacheFactory->isLocalCacheAvailable()) {
|
||||||
$this->podcastDataReader->trySetCachedPodcastData($url, $podcast);
|
try {
|
||||||
} catch (\Exception $e) {
|
$this->podcastDataReader->trySetCachedPodcastData($url, $podcast);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new JSONResponse($podcast, $feed->getStatusCode());
|
return new JSONResponse($podcast, $feed->getStatusCode());
|
||||||
|
@ -7,6 +7,9 @@ namespace OCA\RePod\Controller;
|
|||||||
use OCA\RePod\AppInfo\Application;
|
use OCA\RePod\AppInfo\Application;
|
||||||
use OCA\RePod\Service\MultiPodService;
|
use OCA\RePod\Service\MultiPodService;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
|
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
@ -19,10 +22,9 @@ class SearchController extends Controller
|
|||||||
parent::__construct(Application::APP_ID, $request);
|
parent::__construct(Application::APP_ID, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[NoCSRFRequired]
|
||||||
* @NoCSRFRequired
|
#[FrontpageRoute(verb: 'GET', url: '/search')]
|
||||||
*/
|
|
||||||
public function index(string $q): JSONResponse {
|
public function index(string $q): JSONResponse {
|
||||||
return new JSONResponse($this->multiPodService->search($q));
|
return new JSONResponse($this->multiPodService->search($q));
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,9 @@ namespace OCA\RePod\Controller;
|
|||||||
use OCA\RePod\AppInfo\Application;
|
use OCA\RePod\AppInfo\Application;
|
||||||
use OCA\RePod\Service\FyydService;
|
use OCA\RePod\Service\FyydService;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
|
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
@ -19,18 +22,16 @@ class ToplistController extends Controller
|
|||||||
parent::__construct(Application::APP_ID, $request);
|
parent::__construct(Application::APP_ID, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[NoCSRFRequired]
|
||||||
* @NoCSRFRequired
|
#[FrontpageRoute(verb: 'GET', url: '/toplist/hot')]
|
||||||
*/
|
|
||||||
public function hot(): JSONResponse {
|
public function hot(): JSONResponse {
|
||||||
return new JSONResponse($this->fyydService->hot());
|
return new JSONResponse($this->fyydService->hot());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[NoCSRFRequired]
|
||||||
* @NoCSRFRequired
|
#[FrontpageRoute(verb: 'GET', url: '/toplist/new')]
|
||||||
*/
|
|
||||||
public function new(): JSONResponse {
|
public function new(): JSONResponse {
|
||||||
return new JSONResponse($this->fyydService->latest());
|
return new JSONResponse($this->fyydService->latest());
|
||||||
}
|
}
|
||||||
|
@ -55,22 +55,24 @@ class EpisodeActionReader extends CoreEpisodeActionReader
|
|||||||
$link = $this->stringOrNull($item->link);
|
$link = $this->stringOrNull($item->link);
|
||||||
|
|
||||||
// Get episode image
|
// Get episode image
|
||||||
$image = $this->stringOrNull($item->image->url);
|
if (isset($iTunesItemChildren)) {
|
||||||
|
|
||||||
if (!isset($image) && isset($iTunesItemChildren)) {
|
|
||||||
$imageAttributes = $iTunesItemChildren->image->attributes();
|
$imageAttributes = $iTunesItemChildren->image->attributes();
|
||||||
$image = $this->stringOrNull(isset($imageAttributes) ? (string) $imageAttributes->href : '');
|
$image = $this->stringOrNull(isset($imageAttributes) ? (string) $imageAttributes->href : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($image)) {
|
|
||||||
$image = $this->stringOrNull($channel->image->url);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($image) && isset($iTunesChannelChildren)) {
|
if (!isset($image) && isset($iTunesChannelChildren)) {
|
||||||
$imageAttributes = $iTunesChannelChildren->image->attributes();
|
$imageAttributes = $iTunesChannelChildren->image->attributes();
|
||||||
$image = $this->stringOrNull(isset($imageAttributes) ? (string) $imageAttributes->href : '');
|
$image = $this->stringOrNull(isset($imageAttributes) ? (string) $imageAttributes->href : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($image)) {
|
||||||
|
$image = $this->stringOrNull($item->image->url);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($image)) {
|
||||||
|
$image = $this->stringOrNull($channel->image->url);
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($image)) {
|
if (!isset($image)) {
|
||||||
preg_match('/<itunes:image\s+href="([^"]+)"/', $xmlString, $matches);
|
preg_match('/<itunes:image\s+href="([^"]+)"/', $xmlString, $matches);
|
||||||
if (count($matches) > 1) {
|
if (count($matches) > 1) {
|
||||||
|
10681
package-lock.json
generated
49
package.json
@ -2,37 +2,50 @@
|
|||||||
"name": "repod",
|
"name": "repod",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "NODE_ENV=production webpack --config webpack.js --progress",
|
"build": "vue-tsc && vite build",
|
||||||
"dev": "NODE_ENV=development webpack --config webpack.js --progress",
|
"dev": "vite --mode development build",
|
||||||
"watch": "NODE_ENV=development webpack --config webpack.js --progress --watch",
|
"watch": "vite --mode development build --watch",
|
||||||
"lint": "eslint src",
|
"lint": "vue-tsc && eslint src",
|
||||||
"stylelint": "stylelint src/**/*.vue src/**/*.scss src/**/*.css"
|
"lint:fix": "vue-tsc && eslint src --fix",
|
||||||
|
"stylelint": "stylelint src/**/*.vue src/**/*.scss src/**/*.css",
|
||||||
|
"stylelint:fix": "stylelint src/**/*.vue src/**/*.scss src/**/*.css --fix"
|
||||||
},
|
},
|
||||||
|
"type": "module",
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"extends @nextcloud/browserslist-config"
|
"extends @nextcloud/browserslist-config"
|
||||||
],
|
],
|
||||||
"prettier": "@nextcloud/prettier-config",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nextcloud/axios": "^2.5.0",
|
"@formatjs/intl-segmenter": "^11.7.3",
|
||||||
"@nextcloud/dialogs": "^5.3.1",
|
"@nextcloud/axios": "^2.5.1",
|
||||||
"@nextcloud/initial-state": "^2.2.0",
|
"@nextcloud/initial-state": "^2.2.0",
|
||||||
"@nextcloud/l10n": "^3.1.0",
|
"@nextcloud/l10n": "^3.1.0",
|
||||||
"@nextcloud/router": "^3.0.1",
|
"@nextcloud/router": "^3.0.1",
|
||||||
"@nextcloud/vue": "^8.12.0",
|
"@nextcloud/vite-config": "^2.2.2",
|
||||||
"vue": "^2",
|
"@nextcloud/vue": "9.0.0-alpha.5",
|
||||||
"vue-material-design-icons": "^5.3.0",
|
"dompurify": "^3.1.7",
|
||||||
"vue-router": "^3",
|
"linkify-html": "^4.1.3",
|
||||||
"vuex": "^3"
|
"pinia": "^2.2.6",
|
||||||
|
"toastify-js": "^1.12.0",
|
||||||
|
"vite": "^5.4.10",
|
||||||
|
"vue": "^3.5.12",
|
||||||
|
"vue-material-design-icons": "^5.3.1",
|
||||||
|
"vue-router": "^4.4.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nextcloud/browserslist-config": "^3.0.1",
|
"@nextcloud/browserslist-config": "^3.0.1",
|
||||||
"@nextcloud/eslint-config": "^8.4.1",
|
"@nextcloud/eslint-config": "^8.4.1",
|
||||||
"@nextcloud/prettier-config": "^1.1.0",
|
"@nextcloud/prettier-config": "^1.1.0",
|
||||||
"@nextcloud/stylelint-config": "^3.0.1",
|
"@nextcloud/stylelint-config": "^3.0.1",
|
||||||
"@nextcloud/webpack-vue-config": "^6.0.1",
|
"@types/toastify-js": "^1.12.3",
|
||||||
|
"@vue/eslint-config-typescript": "^13",
|
||||||
|
"@vue/tsconfig": "^0.5.1",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-plugin-prettier": "^5.1.3",
|
"eslint-plugin-pinia": "^0.4.1",
|
||||||
"eslint-webpack-plugin": "^4.2.0",
|
"eslint-plugin-prettier": "^5.2.1",
|
||||||
"stylelint-webpack-plugin": "^5.0.1"
|
"ts-node": "^10.9.2",
|
||||||
}
|
"typescript": "5.5",
|
||||||
|
"vue-eslint-parser": "^9.4.3",
|
||||||
|
"vue-tsc": "^2.1.10"
|
||||||
|
},
|
||||||
|
"prettier": "@nextcloud/prettier-config"
|
||||||
}
|
}
|
||||||
|
BIN
screens/discover.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 282 KiB After Width: | Height: | Size: 857 KiB |
Before Width: | Height: | Size: 429 KiB After Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 171 KiB After Width: | Height: | Size: 817 KiB |
Before Width: | Height: | Size: 214 KiB After Width: | Height: | Size: 961 KiB |
13
src/App.vue
@ -7,13 +7,15 @@
|
|||||||
</NcContent>
|
</NcContent>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import '@nextcloud/dialogs/style.css'
|
import 'toastify-js/src/toastify.css'
|
||||||
|
import { mapActions, mapState } from 'pinia'
|
||||||
import Bar from './components/Player/Bar.vue'
|
import Bar from './components/Player/Bar.vue'
|
||||||
import GPodder from './views/GPodder.vue'
|
import GPodder from './views/GPodder.vue'
|
||||||
import { NcContent } from '@nextcloud/vue'
|
import { NcContent } from '@nextcloud/vue'
|
||||||
import Subscriptions from './components/Sidebar/Subscriptions.vue'
|
import Subscriptions from './components/Sidebar/Subscriptions.vue'
|
||||||
import { loadState } from '@nextcloud/initial-state'
|
import { loadState } from '@nextcloud/initial-state'
|
||||||
|
import { usePlayer } from './store/player.ts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'App',
|
name: 'App',
|
||||||
@ -24,9 +26,16 @@ export default {
|
|||||||
Subscriptions,
|
Subscriptions,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapState(usePlayer, ['paused']),
|
||||||
gpodder() {
|
gpodder() {
|
||||||
return loadState('repod', 'gpodder', false)
|
return loadState('repod', 'gpodder', false)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.init()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
...mapActions(usePlayer, ['init']),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<NcAppContent :class="episode ? 'padding' : ''">
|
<NcAppContent :class="{ episode }">
|
||||||
<slot />
|
<slot />
|
||||||
</NcAppContent>
|
</NcAppContent>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import { NcAppContent } from '@nextcloud/vue'
|
import { NcAppContent } from '@nextcloud/vue'
|
||||||
|
import { mapState } from 'pinia'
|
||||||
|
import { usePlayer } from '../../store/player.ts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppContent',
|
name: 'AppContent',
|
||||||
@ -13,15 +15,13 @@ export default {
|
|||||||
NcAppContent,
|
NcAppContent,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
episode() {
|
...mapState(usePlayer, ['episode']),
|
||||||
return this.$store.state.player.episode
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.padding {
|
.episode {
|
||||||
padding-bottom: 6rem;
|
padding-bottom: 6rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<NcAppNavigation :class="episode ? 'padding' : ''">
|
<NcAppNavigation :class="{ episode }">
|
||||||
<slot />
|
<slot />
|
||||||
<template #list>
|
<template #list>
|
||||||
<slot name="list" />
|
<slot name="list" />
|
||||||
@ -10,8 +10,10 @@
|
|||||||
</NcAppNavigation>
|
</NcAppNavigation>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import { NcAppNavigation } from '@nextcloud/vue'
|
import { NcAppNavigation } from '@nextcloud/vue'
|
||||||
|
import { mapState } from 'pinia'
|
||||||
|
import { usePlayer } from '../../store/player.ts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppNavigation',
|
name: 'AppNavigation',
|
||||||
@ -19,15 +21,13 @@ export default {
|
|||||||
NcAppNavigation,
|
NcAppNavigation,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
episode() {
|
...mapState(usePlayer, ['episode']),
|
||||||
return this.$store.state.player.episode
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.padding {
|
.episode {
|
||||||
padding-bottom: 6rem;
|
padding-bottom: 6rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
34
src/components/Atoms/EmptyContent.vue
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<template>
|
||||||
|
<NcEmptyContent class="empty">
|
||||||
|
<slot />
|
||||||
|
<template #icon>
|
||||||
|
<slot name="icon" />
|
||||||
|
</template>
|
||||||
|
<template #name>
|
||||||
|
<slot name="name" />
|
||||||
|
</template>
|
||||||
|
<template #description>
|
||||||
|
<slot name="description" />
|
||||||
|
</template>
|
||||||
|
<template #action>
|
||||||
|
<slot name="action" />
|
||||||
|
</template>
|
||||||
|
</NcEmptyContent>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { NcEmptyContent } from '@nextcloud/vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'EmptyContent',
|
||||||
|
components: {
|
||||||
|
NcEmptyContent,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.empty {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
@ -2,7 +2,7 @@
|
|||||||
<NcLoadingIcon class="loading" />
|
<NcLoadingIcon class="loading" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import { NcLoadingIcon } from '@nextcloud/vue'
|
import { NcLoadingIcon } from '@nextcloud/vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -1,32 +1,43 @@
|
|||||||
<!-- eslint-disable vue/no-v-html -->
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="flex">
|
||||||
<NcAvatar :display-name="name" :is-no-user="true" :size="256" :url="image" />
|
<NcAvatar
|
||||||
<h2>{{ name }}</h2>
|
:display-name="episode.name"
|
||||||
<p v-html="strippedDescription" />
|
:is-no-user="true"
|
||||||
<div>
|
:size="256"
|
||||||
<NcButton v-if="link" :href="link" target="_blank">
|
:url="episode.image" />
|
||||||
|
<h2>{{ episode.name }}</h2>
|
||||||
|
<SafeHtml :source="episode.description || ''" />
|
||||||
|
<div class="flex">
|
||||||
|
<NcButton v-if="episode.link" :href="episode.link" target="_blank">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<OpenInNewIcon :size="20" />
|
<OpenInNewIcon :size="20" />
|
||||||
</template>
|
</template>
|
||||||
{{ title }}
|
{{ episode.title }}
|
||||||
</NcButton>
|
</NcButton>
|
||||||
<NcButton v-if="url" :href="url" target="_blank">
|
<NcButton
|
||||||
|
v-if="episode.url"
|
||||||
|
:download="filenameFromUrl(episode.url)"
|
||||||
|
:href="episode.url"
|
||||||
|
target="_blank">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<DownloadIcon :size="20" />
|
<DownloadIcon :size="20" />
|
||||||
</template>
|
</template>
|
||||||
{{ t('repod', 'Download') }} {{ size ? `(${episodeFileSize})` : '' }}
|
{{ t('repod', 'Download') }}
|
||||||
|
{{ episode.size ? `(${humanFileSize(episode.size)})` : '' }}
|
||||||
</NcButton>
|
</NcButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import { NcAvatar, NcButton } from '@nextcloud/vue'
|
import { NcAvatar, NcButton } from '@nextcloud/vue'
|
||||||
import DownloadIcon from 'vue-material-design-icons/Download.vue'
|
import DownloadIcon from 'vue-material-design-icons/Download.vue'
|
||||||
|
import type { EpisodeInterface } from '../../utils/types.ts'
|
||||||
import OpenInNewIcon from 'vue-material-design-icons/OpenInNew.vue'
|
import OpenInNewIcon from 'vue-material-design-icons/OpenInNew.vue'
|
||||||
import { cleanHtml } from '../../utils/text.js'
|
import SafeHtml from './SafeHtml.vue'
|
||||||
import { humanFileSize } from '../../utils/size.js'
|
import { filenameFromUrl } from '../../utils/url.ts'
|
||||||
|
import { humanFileSize } from '../../utils/size.ts'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Modal',
|
name: 'Modal',
|
||||||
@ -35,50 +46,24 @@ export default {
|
|||||||
NcAvatar,
|
NcAvatar,
|
||||||
NcButton,
|
NcButton,
|
||||||
OpenInNewIcon,
|
OpenInNewIcon,
|
||||||
|
SafeHtml,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
description: {
|
episode: {
|
||||||
type: String,
|
type: Object as () => EpisodeInterface,
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
image: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
link: {
|
|
||||||
type: String,
|
|
||||||
default: null,
|
|
||||||
},
|
|
||||||
name: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
size: {
|
|
||||||
type: Number,
|
|
||||||
default: null,
|
|
||||||
},
|
|
||||||
title: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
url: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
methods: {
|
||||||
episodeFileSize() {
|
filenameFromUrl,
|
||||||
return humanFileSize(this.size)
|
humanFileSize,
|
||||||
},
|
t,
|
||||||
strippedDescription() {
|
|
||||||
return cleanHtml(this.description)
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
div {
|
.flex {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
36
src/components/Atoms/SafeHtml.vue
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<template>
|
||||||
|
<div v-sanitize="source" class="html" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import dompurify from 'dompurify'
|
||||||
|
import linkifyHtml from 'linkify-html'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'SafeHtml',
|
||||||
|
directives: {
|
||||||
|
sanitize: {
|
||||||
|
mounted(el, binding) {
|
||||||
|
el.innerHTML = dompurify.sanitize(
|
||||||
|
linkifyHtml(binding.value, {
|
||||||
|
nl2br: true,
|
||||||
|
target: '_blank',
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
source: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.html a {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<NcAppNavigationList>
|
<NcAppNavigationList class="list">
|
||||||
<NcAppNavigationNewItem
|
<NcAppNavigationNewItem
|
||||||
:name="t('repod', 'Add a RSS link')"
|
:name="t('repod', 'Add a RSS link')"
|
||||||
@new-item="addSubscription">
|
@new-item="(url) => $router.push(toFeedUrl(url))">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<PlusIcon :size="20" />
|
<PlusIcon :size="20" />
|
||||||
</template>
|
</template>
|
||||||
@ -10,10 +10,11 @@
|
|||||||
</NcAppNavigationList>
|
</NcAppNavigationList>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import { NcAppNavigationList, NcAppNavigationNewItem } from '@nextcloud/vue'
|
import { NcAppNavigationList, NcAppNavigationNewItem } from '@nextcloud/vue'
|
||||||
import PlusIcon from 'vue-material-design-icons/Plus.vue'
|
import PlusIcon from 'vue-material-design-icons/Plus.vue'
|
||||||
import { encodeUrl } from '../../utils/url.js'
|
import { t } from '@nextcloud/l10n'
|
||||||
|
import { toFeedUrl } from '../../utils/url.ts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddRss',
|
name: 'AddRss',
|
||||||
@ -23,15 +24,14 @@ export default {
|
|||||||
PlusIcon,
|
PlusIcon,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addSubscription(feedUrl) {
|
t,
|
||||||
this.$router.push(encodeUrl(feedUrl))
|
toFeedUrl,
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
ul {
|
.list {
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
:key="feed.link"
|
:key="feed.link"
|
||||||
:details="formatLocaleDate(new Date(feed.fetchedAtUnix * 1000))"
|
:details="formatLocaleDate(new Date(feed.fetchedAtUnix * 1000))"
|
||||||
:name="feed.title"
|
:name="feed.title"
|
||||||
:to="toUrl(feed.link)">
|
:to="toFeedUrl(feed.link)">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<NcAvatar
|
<NcAvatar
|
||||||
:display-name="feed.author"
|
:display-name="feed.author"
|
||||||
@ -19,7 +19,8 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<NcActionButton
|
<NcActionButton
|
||||||
v-if="!isSubscribed"
|
v-if="!getSubByUrl(feed.link)"
|
||||||
|
:aria-label="t('repod', 'Subscribe')"
|
||||||
:name="t('repod', 'Subscribe')"
|
:name="t('repod', 'Subscribe')"
|
||||||
:title="t('repod', 'Subscribe')"
|
:title="t('repod', 'Subscribe')"
|
||||||
@click="addSubscription(feed.link)">
|
@click="addSubscription(feed.link)">
|
||||||
@ -33,16 +34,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import { NcActionButton, NcAvatar, NcListItem } from '@nextcloud/vue'
|
import { NcActionButton, NcAvatar, NcListItem } from '@nextcloud/vue'
|
||||||
|
import { mapActions, mapState } from 'pinia'
|
||||||
import Loading from '../Atoms/Loading.vue'
|
import Loading from '../Atoms/Loading.vue'
|
||||||
import PlusIcon from 'vue-material-design-icons/Plus.vue'
|
import PlusIcon from 'vue-material-design-icons/Plus.vue'
|
||||||
|
import type { PodcastDataInterface } from '../../utils/types.ts'
|
||||||
import axios from '@nextcloud/axios'
|
import axios from '@nextcloud/axios'
|
||||||
import { debounce } from '../../utils/debounce.js'
|
import { formatLocaleDate } from '../../utils/time.ts'
|
||||||
import { formatLocaleDate } from '../../utils/time.js'
|
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
import { showError } from '@nextcloud/dialogs'
|
import { showError } from '../../utils/toast.ts'
|
||||||
import { toUrl } from '../../utils/url.js'
|
import { t } from '@nextcloud/l10n'
|
||||||
|
import { toFeedUrl } from '../../utils/url.ts'
|
||||||
|
import { useSubscriptions } from '../../store/subscriptions.ts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Search',
|
name: 'Search',
|
||||||
@ -59,21 +63,28 @@ export default {
|
|||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data: () => ({
|
||||||
return {
|
feeds: [] as PodcastDataInterface[],
|
||||||
feeds: [],
|
loading: false,
|
||||||
loading: false,
|
timeout: null as NodeJS.Timeout | null,
|
||||||
}
|
}),
|
||||||
|
computed: {
|
||||||
|
...mapState(useSubscriptions, ['getSubByUrl']),
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value() {
|
value() {
|
||||||
this.search()
|
if (this.timeout) {
|
||||||
|
clearTimeout(this.timeout)
|
||||||
|
}
|
||||||
|
this.timeout = setTimeout(this.search, 200)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapActions(useSubscriptions, ['fetch']),
|
||||||
formatLocaleDate,
|
formatLocaleDate,
|
||||||
toUrl,
|
t,
|
||||||
async addSubscription(url) {
|
toFeedUrl,
|
||||||
|
async addSubscription(url: string) {
|
||||||
try {
|
try {
|
||||||
await axios.post(
|
await axios.post(
|
||||||
generateUrl('/apps/gpoddersync/subscription_change/create'),
|
generateUrl('/apps/gpoddersync/subscription_change/create'),
|
||||||
@ -86,14 +97,13 @@ export default {
|
|||||||
console.error(e)
|
console.error(e)
|
||||||
showError(t('repod', 'Error while adding the feed'))
|
showError(t('repod', 'Error while adding the feed'))
|
||||||
}
|
}
|
||||||
|
this.fetch()
|
||||||
this.$store.dispatch('subscriptions/fetch')
|
|
||||||
},
|
},
|
||||||
search: debounce(async function value() {
|
async search() {
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const currentSearch = this.value
|
const currentSearch = this.value
|
||||||
const feeds = await axios.get(
|
const feeds = await axios.get<PodcastDataInterface[]>(
|
||||||
generateUrl('/apps/repod/search?q={value}', {
|
generateUrl('/apps/repod/search?q={value}', {
|
||||||
value: currentSearch,
|
value: currentSearch,
|
||||||
}),
|
}),
|
||||||
@ -111,7 +121,7 @@ export default {
|
|||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 200),
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<Loading v-if="loading" />
|
<Loading v-if="loading" />
|
||||||
<ul v-if="!loading">
|
<ul v-if="!loading">
|
||||||
<li v-for="top in tops" :key="top.link">
|
<li v-for="top in tops" :key="top.link">
|
||||||
<router-link :to="toUrl(top.link)">
|
<router-link :to="toFeedUrl(top.link)">
|
||||||
<img :src="top.imageUrl" :title="top.author" />
|
<img :src="top.imageUrl" :title="top.author" />
|
||||||
</router-link>
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
@ -12,12 +12,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import Loading from '../Atoms/Loading.vue'
|
import Loading from '../Atoms/Loading.vue'
|
||||||
|
import type { PodcastDataInterface } from '../../utils/types.ts'
|
||||||
import axios from '@nextcloud/axios'
|
import axios from '@nextcloud/axios'
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
import { showError } from '@nextcloud/dialogs'
|
import { showError } from '../../utils/toast.ts'
|
||||||
import { toUrl } from '../../utils/url.js'
|
import { t } from '@nextcloud/l10n'
|
||||||
|
import { toFeedUrl } from '../../utils/url.ts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Toplist',
|
name: 'Toplist',
|
||||||
@ -30,12 +32,10 @@ export default {
|
|||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data: () => ({
|
||||||
return {
|
loading: true,
|
||||||
loading: true,
|
tops: [] as PodcastDataInterface[],
|
||||||
tops: [],
|
}),
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
@ -51,8 +51,8 @@ export default {
|
|||||||
async mounted() {
|
async mounted() {
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const tops = await axios.get(
|
const tops = await axios.get<PodcastDataInterface[]>(
|
||||||
generateUrl(`/apps/repod/toplist/${this.type}`),
|
generateUrl('/apps/repod/toplist/{type}', { type: this.type }),
|
||||||
)
|
)
|
||||||
this.tops = tops.data
|
this.tops = tops.data
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -63,7 +63,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toUrl,
|
toFeedUrl,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
<!-- eslint-disable vue/no-v-html -->
|
|
||||||
<template>
|
<template>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<img class="background" :src="imageUrl" />
|
<img class="background" :src="feed.imageUrl" />
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div>
|
<div>
|
||||||
<NcAvatar
|
<NcAvatar
|
||||||
:display-name="author || title"
|
:display-name="feed.author || feed.title"
|
||||||
:is-no-user="true"
|
:is-no-user="true"
|
||||||
:size="128"
|
:size="128"
|
||||||
:url="imageUrl" />
|
:url="feed.imageUrl" />
|
||||||
<a class="feed" :href="url" @click.prevent="copyFeed">
|
<a class="feed" :href="url" @click.prevent="copyFeed">
|
||||||
<RssIcon :size="20" />
|
<RssIcon :size="20" />
|
||||||
<i>{{ t('repod', 'Copy feed') }}</i>
|
<i>{{ t('repod', 'Copy feed') }}</i>
|
||||||
@ -16,17 +15,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<div class="infos">
|
<div class="infos">
|
||||||
<h2>{{ title }}</h2>
|
<h2>{{ feed.title }}</h2>
|
||||||
<a :href="link" target="_blank">
|
<a :href="feed.link" target="_blank">
|
||||||
<i>{{ author }}</i>
|
<i>{{ feed.author }}</i>
|
||||||
</a>
|
</a>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<p>
|
<SafeHtml :source="feed.description || ''" />
|
||||||
<small v-html="strippedDescription" />
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<NcAppNavigationNew
|
<NcAppNavigationNew
|
||||||
v-if="!isSubscribed"
|
v-if="!getSubByUrl(url)"
|
||||||
:text="t('repod', 'Subscribe')"
|
:text="t('repod', 'Subscribe')"
|
||||||
@click="addSubscription">
|
@click="addSubscription">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
@ -38,15 +35,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import { NcAppNavigationNew, NcAvatar } from '@nextcloud/vue'
|
import { NcAppNavigationNew, NcAvatar } from '@nextcloud/vue'
|
||||||
import { showError, showSuccess } from '@nextcloud/dialogs'
|
import { mapActions, mapState } from 'pinia'
|
||||||
|
import { showError, showSuccess } from '../../utils/toast.ts'
|
||||||
import PlusIcon from 'vue-material-design-icons/Plus.vue'
|
import PlusIcon from 'vue-material-design-icons/Plus.vue'
|
||||||
|
import type { PodcastDataInterface } from '../../utils/types.ts'
|
||||||
import RssIcon from 'vue-material-design-icons/Rss.vue'
|
import RssIcon from 'vue-material-design-icons/Rss.vue'
|
||||||
|
import SafeHtml from '../Atoms/SafeHtml.vue'
|
||||||
import axios from '@nextcloud/axios'
|
import axios from '@nextcloud/axios'
|
||||||
import { cleanHtml } from '../../utils/text.js'
|
import { decodeUrl } from '../../utils/url.ts'
|
||||||
import { decodeUrl } from '../../utils/url.js'
|
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
import { useSubscriptions } from '../../store/subscriptions.ts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Banner',
|
name: 'Banner',
|
||||||
@ -55,41 +56,23 @@ export default {
|
|||||||
NcAppNavigationNew,
|
NcAppNavigationNew,
|
||||||
PlusIcon,
|
PlusIcon,
|
||||||
RssIcon,
|
RssIcon,
|
||||||
|
SafeHtml,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
author: {
|
feed: {
|
||||||
type: String,
|
type: Object as () => PodcastDataInterface,
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
description: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
imageUrl: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
link: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
title: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapState(useSubscriptions, ['getSubByUrl']),
|
||||||
url() {
|
url() {
|
||||||
return decodeUrl(this.$route.params.url)
|
return decodeUrl(this.$route.params.url as string)
|
||||||
},
|
|
||||||
isSubscribed() {
|
|
||||||
return this.$store.state.subscriptions.subscriptions.includes(this.url)
|
|
||||||
},
|
|
||||||
strippedDescription() {
|
|
||||||
return cleanHtml(this.description)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapActions(useSubscriptions, ['fetch']),
|
||||||
|
t,
|
||||||
async addSubscription() {
|
async addSubscription() {
|
||||||
try {
|
try {
|
||||||
await axios.post(
|
await axios.post(
|
||||||
@ -103,12 +86,11 @@ export default {
|
|||||||
console.error(e)
|
console.error(e)
|
||||||
showError(t('repod', 'Error while adding the feed'))
|
showError(t('repod', 'Error while adding the feed'))
|
||||||
}
|
}
|
||||||
|
this.fetch()
|
||||||
this.$store.dispatch('subscriptions/fetch')
|
|
||||||
},
|
},
|
||||||
copyFeed() {
|
copyFeed() {
|
||||||
window.navigator.clipboard.writeText(this.url)
|
window.navigator.clipboard.writeText(this.url)
|
||||||
showSuccess(t('repod', "Feed's link copied to the clipboard"))
|
showSuccess(t('repod', 'Link copied to the clipboard'))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -147,11 +129,13 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.infos {
|
.infos {
|
||||||
|
flex: 1;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inner {
|
.inner {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 768px) {
|
@media only screen and (max-width: 768px) {
|
||||||
|
222
src/components/Feed/Episode.vue
Normal file
@ -0,0 +1,222 @@
|
|||||||
|
<template>
|
||||||
|
<NcListItem
|
||||||
|
:active="isCurrentEpisode(episode)"
|
||||||
|
class="episode"
|
||||||
|
:details="
|
||||||
|
!oneLine && episode.pubDate
|
||||||
|
? formatLocaleDate(new Date(episode.pubDate?.date))
|
||||||
|
: ''
|
||||||
|
"
|
||||||
|
:force-display-actions="true"
|
||||||
|
:name="episode.name"
|
||||||
|
:one-line="oneLine"
|
||||||
|
:style="{ opacity: hasEnded(episode) ? 0.4 : 1 }"
|
||||||
|
:title="episode.description"
|
||||||
|
@click="modalEpisode = episode">
|
||||||
|
<template #actions>
|
||||||
|
<NcActionButton
|
||||||
|
v-if="!isCurrentEpisode(episode)"
|
||||||
|
:aria-label="t('repod', 'Play')"
|
||||||
|
:title="t('repod', 'Play')"
|
||||||
|
@click="load(episode, url)">
|
||||||
|
<template #icon>
|
||||||
|
<PlayIcon :size="20" />
|
||||||
|
</template>
|
||||||
|
</NcActionButton>
|
||||||
|
<NcActionButton
|
||||||
|
v-if="isCurrentEpisode(episode)"
|
||||||
|
:aria-label="t('repod', 'Stop')"
|
||||||
|
:title="t('repod', 'Stop')"
|
||||||
|
@click="load(null)">
|
||||||
|
<template #icon>
|
||||||
|
<StopIcon :size="20" />
|
||||||
|
</template>
|
||||||
|
</NcActionButton>
|
||||||
|
</template>
|
||||||
|
<template #extra>
|
||||||
|
<NcActions>
|
||||||
|
<NcActionButton
|
||||||
|
v-if="episode.duration"
|
||||||
|
:aria-label="t('repod', 'Read')"
|
||||||
|
:disabled="loading"
|
||||||
|
:model-value="hasEnded(episode)"
|
||||||
|
:name="t('repod', 'Read')"
|
||||||
|
:title="t('repod', 'Read')"
|
||||||
|
@click="markAs(episode, !hasEnded(episode))">
|
||||||
|
<template #icon>
|
||||||
|
<PlaylistPlayIcon v-if="!hasEnded(episode)" :size="20" />
|
||||||
|
<PlaylistRemoveIcon v-if="hasEnded(episode)" :size="20" />
|
||||||
|
</template>
|
||||||
|
</NcActionButton>
|
||||||
|
<NcActionLink
|
||||||
|
v-if="episode.link"
|
||||||
|
:href="episode.link"
|
||||||
|
:name="t('repod', 'Open website')"
|
||||||
|
target="_blank"
|
||||||
|
:title="t('repod', 'Open website')">
|
||||||
|
<template #icon>
|
||||||
|
<OpenInNewIcon :size="20" />
|
||||||
|
</template>
|
||||||
|
</NcActionLink>
|
||||||
|
<NcActionLink
|
||||||
|
v-if="episode.url"
|
||||||
|
:download="filenameFromUrl(episode.url)"
|
||||||
|
:href="episode.url"
|
||||||
|
:name="t('repod', 'Download')"
|
||||||
|
target="_blank"
|
||||||
|
:title="t('repod', 'Download')">
|
||||||
|
<template #icon>
|
||||||
|
<DownloadIcon :size="20" />
|
||||||
|
</template>
|
||||||
|
</NcActionLink>
|
||||||
|
</NcActions>
|
||||||
|
<NcModal v-if="modalEpisode" @close="modalEpisode = null">
|
||||||
|
<Modal :episode="episode" />
|
||||||
|
</NcModal>
|
||||||
|
</template>
|
||||||
|
<template #icon>
|
||||||
|
<NcAvatar
|
||||||
|
:display-name="episode.name"
|
||||||
|
:is-no-user="true"
|
||||||
|
:url="episode.image" />
|
||||||
|
</template>
|
||||||
|
<template #indicator>
|
||||||
|
<NcProgressBar
|
||||||
|
v-if="episode.action && isListening(episode) && !oneLine"
|
||||||
|
class="progress"
|
||||||
|
:value="(episode.action.position * 100) / episode.action.total" />
|
||||||
|
</template>
|
||||||
|
<template #subname>
|
||||||
|
{{ episode.duration }}
|
||||||
|
</template>
|
||||||
|
</NcListItem>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import {
|
||||||
|
NcActionButton,
|
||||||
|
NcActionLink,
|
||||||
|
NcActions,
|
||||||
|
NcAvatar,
|
||||||
|
NcListItem,
|
||||||
|
NcModal,
|
||||||
|
NcProgressBar,
|
||||||
|
} from '@nextcloud/vue'
|
||||||
|
import {
|
||||||
|
durationToSeconds,
|
||||||
|
formatEpisodeTimestamp,
|
||||||
|
formatLocaleDate,
|
||||||
|
} from '../../utils/time.ts'
|
||||||
|
import { hasEnded, isListening } from '../../utils/status.ts'
|
||||||
|
import { mapActions, mapState } from 'pinia'
|
||||||
|
import DownloadIcon from 'vue-material-design-icons/Download.vue'
|
||||||
|
import type { EpisodeInterface } from '../../utils/types.ts'
|
||||||
|
import Modal from '../Atoms/Modal.vue'
|
||||||
|
import OpenInNewIcon from 'vue-material-design-icons/OpenInNew.vue'
|
||||||
|
import PlayIcon from 'vue-material-design-icons/Play.vue'
|
||||||
|
import PlaylistPlayIcon from 'vue-material-design-icons/PlaylistPlay.vue'
|
||||||
|
import PlaylistRemoveIcon from 'vue-material-design-icons/PlaylistRemove.vue'
|
||||||
|
import StopIcon from 'vue-material-design-icons/Stop.vue'
|
||||||
|
import axios from '@nextcloud/axios'
|
||||||
|
import { filenameFromUrl } from '../../utils/url.ts'
|
||||||
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
import { showError } from '../../utils/toast.ts'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
import { usePlayer } from '../../store/player.ts'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Episode',
|
||||||
|
components: {
|
||||||
|
DownloadIcon,
|
||||||
|
Modal,
|
||||||
|
NcActionButton,
|
||||||
|
NcActionLink,
|
||||||
|
NcActions,
|
||||||
|
NcAvatar,
|
||||||
|
NcListItem,
|
||||||
|
NcModal,
|
||||||
|
NcProgressBar,
|
||||||
|
OpenInNewIcon,
|
||||||
|
PlayIcon,
|
||||||
|
PlaylistPlayIcon,
|
||||||
|
PlaylistRemoveIcon,
|
||||||
|
StopIcon,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
episode: {
|
||||||
|
type: Object as () => EpisodeInterface,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
oneLine: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data: () => ({
|
||||||
|
loading: false,
|
||||||
|
modalEpisode: null as EpisodeInterface | null,
|
||||||
|
}),
|
||||||
|
computed: {
|
||||||
|
...mapState(usePlayer, { playerEpisode: 'episode' }),
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
...mapActions(usePlayer, ['load']),
|
||||||
|
filenameFromUrl,
|
||||||
|
formatLocaleDate,
|
||||||
|
hasEnded,
|
||||||
|
isListening,
|
||||||
|
t,
|
||||||
|
isCurrentEpisode(episode: EpisodeInterface) {
|
||||||
|
return this.playerEpisode?.url === episode.url
|
||||||
|
},
|
||||||
|
async markAs(episode: EpisodeInterface, read: boolean) {
|
||||||
|
try {
|
||||||
|
this.loading = true
|
||||||
|
episode.action = {
|
||||||
|
podcast: this.url,
|
||||||
|
episode: episode.url,
|
||||||
|
guid: episode.guid,
|
||||||
|
action: 'play',
|
||||||
|
timestamp: formatEpisodeTimestamp(new Date()),
|
||||||
|
started: episode.action?.started || 0,
|
||||||
|
position: read ? durationToSeconds(episode.duration || '') : 0,
|
||||||
|
total: durationToSeconds(episode.duration || ''),
|
||||||
|
}
|
||||||
|
await axios.post(
|
||||||
|
generateUrl('/apps/gpoddersync/episode_action/create'),
|
||||||
|
[episode.action],
|
||||||
|
)
|
||||||
|
if (read && this.isCurrentEpisode(episode)) {
|
||||||
|
this.load(null)
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
|
showError(t('repod', 'Could not change the status of the episode'))
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.progress {
|
||||||
|
margin-top: 0.4rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.episode .list-item-content__name {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.episode .list-item-content__subname {
|
||||||
|
flex-basis: auto;
|
||||||
|
flex-grow: 0;
|
||||||
|
}
|
||||||
|
</style>
|
@ -2,212 +2,82 @@
|
|||||||
<div>
|
<div>
|
||||||
<Loading v-if="loading" />
|
<Loading v-if="loading" />
|
||||||
<ul v-if="!loading">
|
<ul v-if="!loading">
|
||||||
<NcListItem
|
<Episode
|
||||||
v-for="episode in filteredEpisodes"
|
v-for="episode in filteredEpisodes"
|
||||||
:key="episode.guid"
|
:key="episode.guid"
|
||||||
:active="isCurrentEpisode(episode)"
|
:episode="episode"
|
||||||
:class="hasEnded(episode) ? 'ended' : ''"
|
:url="url" />
|
||||||
:details="formatLocaleDate(new Date(episode.pubDate?.date))"
|
|
||||||
:force-display-actions="true"
|
|
||||||
:name="episode.name"
|
|
||||||
:title="episode.description"
|
|
||||||
@click="modalEpisode = episode">
|
|
||||||
<template #actions>
|
|
||||||
<NcActionButton
|
|
||||||
v-if="!isCurrentEpisode(episode)"
|
|
||||||
:aria-label="t('repod', 'Play')"
|
|
||||||
:name="t('repod', 'Play')"
|
|
||||||
:title="t('repod', 'Play')"
|
|
||||||
@click="load(episode)">
|
|
||||||
<template #icon>
|
|
||||||
<PlayIcon :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcActionButton>
|
|
||||||
<NcActionButton
|
|
||||||
v-if="isCurrentEpisode(episode)"
|
|
||||||
:aria-label="t('repod', 'Stop')"
|
|
||||||
:name="t('repod', 'Stop')"
|
|
||||||
:title="t('repod', 'Stop')"
|
|
||||||
@click="load(null)">
|
|
||||||
<template #icon>
|
|
||||||
<StopIcon :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcActionButton>
|
|
||||||
</template>
|
|
||||||
<template #extra>
|
|
||||||
<NcActions>
|
|
||||||
<NcActionButton
|
|
||||||
v-if="episode.duration && !hasEnded(episode)"
|
|
||||||
:aria-label="t('repod', 'Mark as read')"
|
|
||||||
:disabled="loadingAction"
|
|
||||||
:name="t('repod', 'Mark as read')"
|
|
||||||
:title="t('repod', 'Mark as read')"
|
|
||||||
@click="markAs(episode, true)">
|
|
||||||
<template #icon>
|
|
||||||
<PlaylistPlayIcon :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcActionButton>
|
|
||||||
<NcActionButton
|
|
||||||
v-if="episode.duration && hasEnded(episode)"
|
|
||||||
:aria-label="t('repod', 'Mark as unread')"
|
|
||||||
:disabled="loadingAction"
|
|
||||||
:name="t('repod', 'Mark as unread')"
|
|
||||||
:title="t('repod', 'Mark as unread')"
|
|
||||||
@click="markAs(episode, false)">
|
|
||||||
<template #icon>
|
|
||||||
<PlaylistRemoveIcon :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcActionButton>
|
|
||||||
<NcActionLink
|
|
||||||
v-if="episode.link"
|
|
||||||
:href="episode.link"
|
|
||||||
:name="t('repod', 'Open website')"
|
|
||||||
target="_blank"
|
|
||||||
:title="t('repod', 'Open website')">
|
|
||||||
<template #icon>
|
|
||||||
<OpenInNewIcon :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcActionLink>
|
|
||||||
<NcActionLink
|
|
||||||
v-if="episode.url"
|
|
||||||
:href="episode.url"
|
|
||||||
:name="t('repod', 'Download')"
|
|
||||||
target="_blank"
|
|
||||||
:title="t('repod', 'Download')">
|
|
||||||
<template #icon>
|
|
||||||
<DownloadIcon :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcActionLink>
|
|
||||||
</NcActions>
|
|
||||||
</template>
|
|
||||||
<template #icon>
|
|
||||||
<NcAvatar
|
|
||||||
:display-name="episode.name"
|
|
||||||
:is-no-user="true"
|
|
||||||
:url="episode.image" />
|
|
||||||
</template>
|
|
||||||
<template #indicator>
|
|
||||||
<NcProgressBar
|
|
||||||
v-if="isListening(episode)"
|
|
||||||
class="progress"
|
|
||||||
:value="
|
|
||||||
(episode.action.position * 100) / episode.action.total
|
|
||||||
" />
|
|
||||||
</template>
|
|
||||||
<template #subname>
|
|
||||||
{{ episode.duration }}
|
|
||||||
</template>
|
|
||||||
</NcListItem>
|
|
||||||
</ul>
|
</ul>
|
||||||
<NcModal v-if="modalEpisode" @close="modalEpisode = null">
|
|
||||||
<Modal
|
|
||||||
:description="modalEpisode.description"
|
|
||||||
:image="modalEpisode.image"
|
|
||||||
:link="modalEpisode.link"
|
|
||||||
:name="modalEpisode.name"
|
|
||||||
:size="modalEpisode.size"
|
|
||||||
:title="modalEpisode.title"
|
|
||||||
:url="modalEpisode.url" />
|
|
||||||
</NcModal>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import {
|
import { hasEnded, isListening } from '../../utils/status.ts'
|
||||||
NcActionButton,
|
import Episode from './Episode.vue'
|
||||||
NcActionLink,
|
import type { EpisodeInterface } from '../../utils/types.ts'
|
||||||
NcActions,
|
|
||||||
NcAvatar,
|
|
||||||
NcListItem,
|
|
||||||
NcModal,
|
|
||||||
NcProgressBar,
|
|
||||||
} from '@nextcloud/vue'
|
|
||||||
import {
|
|
||||||
durationToSeconds,
|
|
||||||
formatEpisodeTimestamp,
|
|
||||||
formatLocaleDate,
|
|
||||||
} from '../../utils/time.js'
|
|
||||||
import DownloadIcon from 'vue-material-design-icons/Download.vue'
|
|
||||||
import { EventBus } from '../../store/bus.js'
|
|
||||||
import Loading from '../Atoms/Loading.vue'
|
import Loading from '../Atoms/Loading.vue'
|
||||||
import Modal from '../Atoms/Modal.vue'
|
|
||||||
import OpenInNewIcon from 'vue-material-design-icons/OpenInNew.vue'
|
|
||||||
import PlayIcon from 'vue-material-design-icons/Play.vue'
|
|
||||||
import PlaylistPlayIcon from 'vue-material-design-icons/PlaylistPlay.vue'
|
|
||||||
import PlaylistRemoveIcon from 'vue-material-design-icons/PlaylistRemove.vue'
|
|
||||||
import StopIcon from 'vue-material-design-icons/Stop.vue'
|
|
||||||
import axios from '@nextcloud/axios'
|
import axios from '@nextcloud/axios'
|
||||||
import { decodeUrl } from '../../utils/url.js'
|
import { decodeUrl } from '../../utils/url.ts'
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
import { showError } from '@nextcloud/dialogs'
|
import { mapState } from 'pinia'
|
||||||
|
import { showError } from '../../utils/toast.ts'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
import { usePlayer } from '../../store/player.ts'
|
||||||
|
import { useSettings } from '../../store/settings.ts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Episodes',
|
name: 'Episodes',
|
||||||
components: {
|
components: {
|
||||||
DownloadIcon,
|
Episode,
|
||||||
Loading,
|
Loading,
|
||||||
Modal,
|
|
||||||
NcActionButton,
|
|
||||||
NcActionLink,
|
|
||||||
NcActions,
|
|
||||||
NcAvatar,
|
|
||||||
NcListItem,
|
|
||||||
NcModal,
|
|
||||||
NcProgressBar,
|
|
||||||
OpenInNewIcon,
|
|
||||||
PlayIcon,
|
|
||||||
PlaylistPlayIcon,
|
|
||||||
PlaylistRemoveIcon,
|
|
||||||
StopIcon,
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
episodes: [],
|
|
||||||
loading: true,
|
|
||||||
loadingAction: false,
|
|
||||||
modalEpisode: null,
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
data: () => ({
|
||||||
|
episodes: [] as EpisodeInterface[],
|
||||||
|
loading: true,
|
||||||
|
}),
|
||||||
computed: {
|
computed: {
|
||||||
currentEpisode() {
|
...mapState(usePlayer, ['episode']),
|
||||||
return this.$store.state.player.episode
|
...mapState(useSettings, ['filters']),
|
||||||
},
|
|
||||||
filters() {
|
|
||||||
return this.$store.state.settings.filters
|
|
||||||
},
|
|
||||||
filteredEpisodes() {
|
filteredEpisodes() {
|
||||||
return this.episodes.filter((episode) => {
|
return this.episodes.filter((episode) => {
|
||||||
if (!this.filters.listened && this.hasEnded(episode)) {
|
if (!this.filters.listened && this.hasEnded(episode)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.filters.listening && this.isListening(episode)) {
|
if (!this.filters.listening && this.isListening(episode)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.filters.unlistened && !this.isListening(episode)) {
|
if (!this.filters.unlistened && !this.isListening(episode)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
url() {
|
url() {
|
||||||
return decodeUrl(this.$route.params.url)
|
return decodeUrl(this.$route.params.url as string)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
episode() {
|
||||||
|
if (this.episode) {
|
||||||
|
this.episodes = this.episodes.map((e) =>
|
||||||
|
e.url === this.episode?.url ? this.episode : e,
|
||||||
|
)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const episodes = await axios.get(
|
const episodes = await axios.get<EpisodeInterface[]>(
|
||||||
generateUrl('/apps/repod/episodes/list?url={url}', {
|
generateUrl('/apps/repod/episodes/list?url={url}', {
|
||||||
url: this.url,
|
url: this.url,
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
this.episodes = [...episodes.data].sort(
|
this.episodes = [...episodes.data].sort(
|
||||||
(a, b) => new Date(b.pubDate?.date) - new Date(a.pubDate?.date),
|
(a, b) =>
|
||||||
|
new Date(b.pubDate?.date || '').getTime() -
|
||||||
|
new Date(a.pubDate?.date || '').getTime(),
|
||||||
)
|
)
|
||||||
EventBus.$on('updateEpisodesList', this.updateList)
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
showError(t('repod', 'Could not fetch episodes'))
|
showError(t('repod', 'Could not fetch episodes'))
|
||||||
@ -215,72 +85,9 @@ export default {
|
|||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
destroyed() {
|
|
||||||
EventBus.$off('updateEpisodesList')
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
formatLocaleDate,
|
hasEnded,
|
||||||
hasEnded(episode) {
|
isListening,
|
||||||
return (
|
|
||||||
episode.action &&
|
|
||||||
episode.action.position > 0 &&
|
|
||||||
episode.action.total > 0 &&
|
|
||||||
episode.action.position >= episode.action.total
|
|
||||||
)
|
|
||||||
},
|
|
||||||
isCurrentEpisode(episode) {
|
|
||||||
return this.currentEpisode && this.currentEpisode.url === episode.url
|
|
||||||
},
|
|
||||||
isListening(episode) {
|
|
||||||
return (
|
|
||||||
episode.action &&
|
|
||||||
episode.action.action.toLowerCase() === 'play' &&
|
|
||||||
!this.hasEnded(episode)
|
|
||||||
)
|
|
||||||
},
|
|
||||||
load(episode) {
|
|
||||||
this.$store.dispatch('player/load', episode)
|
|
||||||
},
|
|
||||||
async markAs(episode, read) {
|
|
||||||
try {
|
|
||||||
this.loadingAction = true
|
|
||||||
episode.action = {
|
|
||||||
podcast: this.url,
|
|
||||||
episode: episode.url,
|
|
||||||
guid: episode.guid,
|
|
||||||
action: 'play',
|
|
||||||
timestamp: formatEpisodeTimestamp(new Date()),
|
|
||||||
started: episode.action ? episode.action.started : 0,
|
|
||||||
position: read ? durationToSeconds(episode.duration) : 0,
|
|
||||||
total: durationToSeconds(episode.duration),
|
|
||||||
}
|
|
||||||
await axios.post(
|
|
||||||
generateUrl('/apps/gpoddersync/episode_action/create'),
|
|
||||||
[episode.action],
|
|
||||||
)
|
|
||||||
this.updateList(episode)
|
|
||||||
} catch (e) {
|
|
||||||
console.error(e)
|
|
||||||
showError(t('repod', 'Could not change the status of the episode'))
|
|
||||||
} finally {
|
|
||||||
this.loadingAction = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
updateList(episode) {
|
|
||||||
this.episodes = this.episodes.map((e) =>
|
|
||||||
e.url === episode.url ? episode : e,
|
|
||||||
)
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.ended {
|
|
||||||
opacity: 0.4;
|
|
||||||
}
|
|
||||||
|
|
||||||
.progress {
|
|
||||||
margin-top: 0.4rem;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
106
src/components/Feed/Favorite.vue
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
<template>
|
||||||
|
<NcGuestContent class="guest">
|
||||||
|
<Loading v-if="!feed.data" />
|
||||||
|
<NcAvatar
|
||||||
|
v-if="feed.data"
|
||||||
|
class="avatar"
|
||||||
|
:display-name="feed.data.author || feed.data.title"
|
||||||
|
:is-no-user="true"
|
||||||
|
:size="222"
|
||||||
|
:title="feed.data.author"
|
||||||
|
:url="feed.data.imageUrl" />
|
||||||
|
<div v-if="feed.data" class="list">
|
||||||
|
<h2 class="title">{{ feed.data.title }}</h2>
|
||||||
|
<Loading v-if="loading" />
|
||||||
|
<ul v-if="!loading">
|
||||||
|
<Episode
|
||||||
|
v-for="episode in episodes"
|
||||||
|
:key="episode.guid"
|
||||||
|
:episode="episode"
|
||||||
|
:one-line="true"
|
||||||
|
:url="feed.metrics.url" />
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</NcGuestContent>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import type { EpisodeInterface, SubscriptionInterface } from '../../utils/types.ts'
|
||||||
|
import { NcAvatar, NcGuestContent } from '@nextcloud/vue'
|
||||||
|
import Episode from './Episode.vue'
|
||||||
|
import Loading from '../Atoms/Loading.vue'
|
||||||
|
import axios from '@nextcloud/axios'
|
||||||
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
import { hasEnded } from '../../utils/status.ts'
|
||||||
|
import { showError } from '../../utils/toast.ts'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Favorite',
|
||||||
|
components: {
|
||||||
|
Episode,
|
||||||
|
Loading,
|
||||||
|
NcAvatar,
|
||||||
|
NcGuestContent,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
feed: {
|
||||||
|
type: Object as () => SubscriptionInterface,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data: () => ({
|
||||||
|
episodes: [] as EpisodeInterface[],
|
||||||
|
loading: true,
|
||||||
|
}),
|
||||||
|
async mounted() {
|
||||||
|
try {
|
||||||
|
this.loading = true
|
||||||
|
const episodes = await axios.get<EpisodeInterface[]>(
|
||||||
|
generateUrl('/apps/repod/episodes/list?url={url}', {
|
||||||
|
url: this.feed.metrics.url,
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
this.episodes = [...episodes.data]
|
||||||
|
.sort(
|
||||||
|
(a, b) =>
|
||||||
|
new Date(b.pubDate?.date || '').getTime() -
|
||||||
|
new Date(a.pubDate?.date || '').getTime(),
|
||||||
|
)
|
||||||
|
.filter((episode) => !this.hasEnded(episode))
|
||||||
|
.slice(0, 4)
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
|
showError(t('repod', 'Could not fetch episodes'))
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
hasEnded,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.guest {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 1rem;
|
||||||
|
margin: 20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 768px) {
|
||||||
|
.avatar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="player.episode" class="footer">
|
<div v-if="episode" class="footer">
|
||||||
<img class="background" :src="player.episode.image" />
|
<img class="background" :src="episode.image" />
|
||||||
<Loading v-if="!player.loaded" />
|
<Loading v-if="!loaded" />
|
||||||
<ProgressBar v-if="player.loaded" />
|
<ProgressBar v-if="loaded" />
|
||||||
<div v-if="player.loaded" class="player">
|
<div v-if="loaded" class="player">
|
||||||
<img :src="player.episode.image" />
|
<img :src="episode.image" />
|
||||||
<Infos class="infos" />
|
<Infos class="infos" />
|
||||||
<Controls class="controls" />
|
<Controls class="controls" />
|
||||||
<Timer class="timer" />
|
<Timer class="timer" />
|
||||||
@ -13,13 +13,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import Controls from './Controls.vue'
|
import Controls from './Controls.vue'
|
||||||
import Infos from './Infos.vue'
|
import Infos from './Infos.vue'
|
||||||
import Loading from '../Atoms/Loading.vue'
|
import Loading from '../Atoms/Loading.vue'
|
||||||
import ProgressBar from './ProgressBar.vue'
|
import ProgressBar from './ProgressBar.vue'
|
||||||
import Timer from './Timer.vue'
|
import Timer from './Timer.vue'
|
||||||
import Volume from './Volume.vue'
|
import Volume from './Volume.vue'
|
||||||
|
import { mapState } from 'pinia'
|
||||||
|
import { usePlayer } from '../../store/player.ts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Bar',
|
name: 'Bar',
|
||||||
@ -32,9 +34,7 @@ export default {
|
|||||||
Volume,
|
Volume,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
player() {
|
...mapState(usePlayer, ['episode', 'loaded']),
|
||||||
return this.$store.state.player
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -78,7 +78,7 @@ export default {
|
|||||||
|
|
||||||
@media only screen and (max-width: 768px) {
|
@media only screen and (max-width: 768px) {
|
||||||
.infos {
|
.infos {
|
||||||
flex: 2;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timer,
|
.timer,
|
||||||
|
@ -1,32 +1,53 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
|
<Rewind10Icon
|
||||||
|
class="pointer rewind"
|
||||||
|
:size="20"
|
||||||
|
:title="t('repod', 'Rewind 10 seconds')"
|
||||||
|
@click="seek((currentTime ?? 0) - 10)" />
|
||||||
<PauseIcon
|
<PauseIcon
|
||||||
v-if="!player.paused"
|
v-if="!paused"
|
||||||
class="pointer"
|
class="pointer"
|
||||||
:size="50"
|
:size="50"
|
||||||
@click="$store.dispatch('player/pause')" />
|
:title="t('repod', 'Pause')"
|
||||||
|
@click="pause" />
|
||||||
<PlayIcon
|
<PlayIcon
|
||||||
v-if="player.paused"
|
v-if="paused"
|
||||||
class="pointer"
|
class="pointer"
|
||||||
:size="50"
|
:size="50"
|
||||||
@click="$store.dispatch('player/play')" />
|
:title="t('repod', 'Play')"
|
||||||
|
@click="play" />
|
||||||
|
<FastForward30Icon
|
||||||
|
class="pointer forward"
|
||||||
|
:size="20"
|
||||||
|
:title="t('repod', 'Fast forward 30 seconds')"
|
||||||
|
@click="seek((currentTime ?? 0) + 30)" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
|
import { mapActions, mapState } from 'pinia'
|
||||||
|
import FastForward30Icon from 'vue-material-design-icons/FastForward30.vue'
|
||||||
import PauseIcon from 'vue-material-design-icons/Pause.vue'
|
import PauseIcon from 'vue-material-design-icons/Pause.vue'
|
||||||
import PlayIcon from 'vue-material-design-icons/Play.vue'
|
import PlayIcon from 'vue-material-design-icons/Play.vue'
|
||||||
|
import Rewind10Icon from 'vue-material-design-icons/Rewind10.vue'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
import { usePlayer } from '../../store/player.ts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Controls',
|
name: 'Controls',
|
||||||
components: {
|
components: {
|
||||||
|
FastForward30Icon,
|
||||||
PauseIcon,
|
PauseIcon,
|
||||||
PlayIcon,
|
PlayIcon,
|
||||||
|
Rewind10Icon,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
player() {
|
...mapState(usePlayer, ['currentTime', 'paused']),
|
||||||
return this.$store.state.player
|
},
|
||||||
},
|
methods: {
|
||||||
|
...mapActions(usePlayer, ['play', 'pause', 'seek']),
|
||||||
|
t,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -39,4 +60,11 @@ export default {
|
|||||||
.pointer {
|
.pointer {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 768px) {
|
||||||
|
.forward,
|
||||||
|
.rewind {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,28 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="root">
|
<div v-if="episode && podcastUrl" class="root">
|
||||||
<strong class="pointer" @click="modal = true">
|
<strong class="pointer" @click="modal = true">
|
||||||
{{ player.episode.name }}
|
{{ episode.name }}
|
||||||
</strong>
|
</strong>
|
||||||
<router-link :to="hash">
|
<router-link :to="toFeedUrl(podcastUrl)">
|
||||||
<i>{{ player.episode.title }}</i>
|
<i>{{ episode.title }}</i>
|
||||||
</router-link>
|
</router-link>
|
||||||
<NcModal v-if="modal" @close="modal = false">
|
<NcModal v-if="modal" @close="modal = false">
|
||||||
<Modal
|
<Modal :episode="episode" />
|
||||||
:description="player.episode.description"
|
|
||||||
:image="player.episode.image"
|
|
||||||
:link="player.episode.link"
|
|
||||||
:name="player.episode.name"
|
|
||||||
:size="player.episode.size"
|
|
||||||
:title="player.episode.title"
|
|
||||||
:url="player.episode.url" />
|
|
||||||
</NcModal>
|
</NcModal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import Modal from '../Atoms/Modal.vue'
|
import Modal from '../Atoms/Modal.vue'
|
||||||
import { NcModal } from '@nextcloud/vue'
|
import { NcModal } from '@nextcloud/vue'
|
||||||
import { toUrl } from '../../utils/url.js'
|
import { mapState } from 'pinia'
|
||||||
|
import { toFeedUrl } from '../../utils/url.ts'
|
||||||
|
import { usePlayer } from '../../store/player.ts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Infos',
|
name: 'Infos',
|
||||||
@ -30,18 +25,14 @@ export default {
|
|||||||
Modal,
|
Modal,
|
||||||
NcModal,
|
NcModal,
|
||||||
},
|
},
|
||||||
data() {
|
data: () => ({
|
||||||
return {
|
modal: false,
|
||||||
modal: false,
|
}),
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
player() {
|
...mapState(usePlayer, ['episode', 'podcastUrl']),
|
||||||
return this.$store.state.player
|
},
|
||||||
},
|
methods: {
|
||||||
hash() {
|
toFeedUrl,
|
||||||
return toUrl(this.player.podcastUrl)
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,20 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<input
|
<input
|
||||||
|
v-if="duration"
|
||||||
class="progress"
|
class="progress"
|
||||||
:max="player.duration"
|
:max="duration"
|
||||||
min="0"
|
min="0"
|
||||||
type="range"
|
type="range"
|
||||||
:value="player.currentTime"
|
:value="currentTime"
|
||||||
@change="(event) => $store.dispatch('player/seek', event.target.value)" />
|
@change="
|
||||||
|
(event) => seek(parseInt((event.target as HTMLInputElement).value))
|
||||||
|
" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
|
import { mapActions, mapState } from 'pinia'
|
||||||
|
import { usePlayer } from '../../store/player.ts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ProgressBar',
|
name: 'ProgressBar',
|
||||||
computed: {
|
computed: {
|
||||||
player() {
|
...mapState(usePlayer, ['duration', 'currentTime']),
|
||||||
return this.$store.state.player
|
},
|
||||||
},
|
methods: {
|
||||||
|
...mapActions(usePlayer, ['seek']),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div v-if="currentTime && duration" class="root">
|
||||||
<span>{{ formatTimer(new Date(player.currentTime * 1000)) }}</span>
|
<span>{{ formatTimer(new Date(currentTime * 1000)) }}</span>
|
||||||
<span>/</span>
|
<span>/</span>
|
||||||
<span>{{ formatTimer(new Date(player.duration * 1000)) }}</span>
|
<span>{{ formatTimer(new Date(duration * 1000)) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import { formatTimer } from '../../utils/time.js'
|
import { formatTimer } from '../../utils/time.ts'
|
||||||
|
import { mapState } from 'pinia'
|
||||||
|
import { usePlayer } from '../../store/player.ts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Timer',
|
name: 'Timer',
|
||||||
computed: {
|
computed: {
|
||||||
player() {
|
...mapState(usePlayer, ['duration', 'currentTime']),
|
||||||
return this.$store.state.player
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formatTimer,
|
formatTimer,
|
||||||
@ -23,7 +23,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
div {
|
.root {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
|
@ -1,42 +1,50 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<VolumeHighIcon
|
<VolumeHighIcon
|
||||||
v-if="player.volume > 0.7"
|
v-if="volume > 0.7"
|
||||||
class="pointer"
|
class="pointer"
|
||||||
:size="30"
|
:size="30"
|
||||||
|
:title="t('repod', 'Mute')"
|
||||||
@click="mute" />
|
@click="mute" />
|
||||||
<VolumeLowIcon
|
<VolumeLowIcon
|
||||||
v-if="player.volume > 0 && player.volume <= 0.3"
|
v-if="volume > 0 && volume <= 0.3"
|
||||||
class="pointer"
|
class="pointer"
|
||||||
:size="30"
|
:size="30"
|
||||||
|
:title="t('repod', 'Mute')"
|
||||||
@click="mute" />
|
@click="mute" />
|
||||||
<VolumeMediumIcon
|
<VolumeMediumIcon
|
||||||
v-if="player.volume > 0.3 && player.volume <= 0.7"
|
v-if="volume > 0.3 && volume <= 0.7"
|
||||||
class="pointer"
|
class="pointer"
|
||||||
:size="30"
|
:size="30"
|
||||||
|
:title="t('repod', 'Mute')"
|
||||||
@click="mute" />
|
@click="mute" />
|
||||||
<VolumeMuteIcon
|
<VolumeMuteIcon
|
||||||
v-if="player.volume === 0"
|
v-if="volume === 0"
|
||||||
class="pointer"
|
class="pointer"
|
||||||
:size="30"
|
:size="30"
|
||||||
@click="$store.dispatch('player/volume', volumeMuted)" />
|
:title="t('repod', 'Unmute')"
|
||||||
|
@click="setVolume(volumeMuted)" />
|
||||||
<input
|
<input
|
||||||
max="1"
|
max="1"
|
||||||
min="0"
|
min="0"
|
||||||
step="0.1"
|
step="0.1"
|
||||||
type="range"
|
type="range"
|
||||||
:value="player.volume"
|
:value="volume"
|
||||||
@change="
|
@change="
|
||||||
(event) => $store.dispatch('player/volume', event.target.value)
|
(event) =>
|
||||||
|
setVolume(parseFloat((event.target as HTMLInputElement).value))
|
||||||
" />
|
" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
|
import { mapActions, mapState } from 'pinia'
|
||||||
import VolumeHighIcon from 'vue-material-design-icons/VolumeHigh.vue'
|
import VolumeHighIcon from 'vue-material-design-icons/VolumeHigh.vue'
|
||||||
import VolumeLowIcon from 'vue-material-design-icons/VolumeLow.vue'
|
import VolumeLowIcon from 'vue-material-design-icons/VolumeLow.vue'
|
||||||
import VolumeMediumIcon from 'vue-material-design-icons/VolumeMedium.vue'
|
import VolumeMediumIcon from 'vue-material-design-icons/VolumeMedium.vue'
|
||||||
import VolumeMuteIcon from 'vue-material-design-icons/VolumeMute.vue'
|
import VolumeMuteIcon from 'vue-material-design-icons/VolumeMute.vue'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
import { usePlayer } from '../../store/player.ts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Volume',
|
name: 'Volume',
|
||||||
@ -46,21 +54,19 @@ export default {
|
|||||||
VolumeMediumIcon,
|
VolumeMediumIcon,
|
||||||
VolumeMuteIcon,
|
VolumeMuteIcon,
|
||||||
},
|
},
|
||||||
data() {
|
data: () => ({
|
||||||
return {
|
volumeMuted: 0,
|
||||||
volumeMuted: 0,
|
}),
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
player() {
|
...mapState(usePlayer, ['volume']),
|
||||||
return this.$store.state.player
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapActions(usePlayer, ['setVolume']),
|
||||||
mute() {
|
mute() {
|
||||||
this.volumeMuted = this.player.volume
|
this.volumeMuted = this.volume
|
||||||
this.$store.dispatch('player/volume', 0)
|
this.setVolume(0)
|
||||||
},
|
},
|
||||||
|
t,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -8,10 +8,11 @@
|
|||||||
</NcAppNavigationItem>
|
</NcAppNavigationItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import ExportIcon from 'vue-material-design-icons/Export.vue'
|
import ExportIcon from 'vue-material-design-icons/Export.vue'
|
||||||
import { NcAppNavigationItem } from '@nextcloud/vue'
|
import { NcAppNavigationItem } from '@nextcloud/vue'
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Export',
|
name: 'Export',
|
||||||
@ -21,6 +22,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
generateUrl,
|
generateUrl,
|
||||||
|
t,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -5,40 +5,30 @@
|
|||||||
:name="t('repod', 'Filtering episodes')">
|
:name="t('repod', 'Filtering episodes')">
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<NcActionCheckbox
|
<NcActionCheckbox
|
||||||
:checked="all"
|
|
||||||
:disabled="all"
|
:disabled="all"
|
||||||
@update:checked="
|
:model-value="all"
|
||||||
(checked) =>
|
@change="
|
||||||
$store.commit('settings/filters', {
|
setFilters({
|
||||||
listened: checked,
|
listened: true,
|
||||||
listening: checked,
|
listening: true,
|
||||||
unlistened: checked,
|
unlistened: true,
|
||||||
})
|
})
|
||||||
">
|
">
|
||||||
{{ t('repod', 'Show all') }}
|
{{ t('repod', 'Show all') }}
|
||||||
</NcActionCheckbox>
|
</NcActionCheckbox>
|
||||||
<NcActionCheckbox
|
<NcActionCheckbox
|
||||||
:checked="filters.listened"
|
:model-value="filters.listened"
|
||||||
@update:checked="
|
@change="setFilters({ listened: !filters.listened })">
|
||||||
(checked) =>
|
|
||||||
$store.commit('settings/filters', { listened: checked })
|
|
||||||
">
|
|
||||||
{{ t('repod', 'Listened') }}
|
{{ t('repod', 'Listened') }}
|
||||||
</NcActionCheckbox>
|
</NcActionCheckbox>
|
||||||
<NcActionCheckbox
|
<NcActionCheckbox
|
||||||
:checked="filters.listening"
|
:model-value="filters.listening"
|
||||||
@update:checked="
|
@change="setFilters({ listening: !filters.listening })">
|
||||||
(checked) =>
|
|
||||||
$store.commit('settings/filters', { listening: checked })
|
|
||||||
">
|
|
||||||
{{ t('repod', 'Listening') }}
|
{{ t('repod', 'Listening') }}
|
||||||
</NcActionCheckbox>
|
</NcActionCheckbox>
|
||||||
<NcActionCheckbox
|
<NcActionCheckbox
|
||||||
:checked="filters.unlistened"
|
:model-value="filters.unlistened"
|
||||||
@update:checked="
|
@change="setFilters({ unlistened: !filters.unlistened })">
|
||||||
(checked) =>
|
|
||||||
$store.commit('settings/filters', { unlistened: checked })
|
|
||||||
">
|
|
||||||
{{ t('repod', 'Unlistened') }}
|
{{ t('repod', 'Unlistened') }}
|
||||||
</NcActionCheckbox>
|
</NcActionCheckbox>
|
||||||
</template>
|
</template>
|
||||||
@ -49,10 +39,13 @@
|
|||||||
</NcAppNavigationItem>
|
</NcAppNavigationItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import { NcActionCheckbox, NcAppNavigationItem } from '@nextcloud/vue'
|
import { NcActionCheckbox, NcAppNavigationItem } from '@nextcloud/vue'
|
||||||
|
import { mapActions, mapState } from 'pinia'
|
||||||
import FilterIcon from 'vue-material-design-icons/Filter.vue'
|
import FilterIcon from 'vue-material-design-icons/Filter.vue'
|
||||||
import FilterSettingsIcon from 'vue-material-design-icons/FilterSettings.vue'
|
import FilterSettingsIcon from 'vue-material-design-icons/FilterSettings.vue'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
import { useSettings } from '../../store/settings.ts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Filters',
|
name: 'Filters',
|
||||||
@ -63,6 +56,7 @@ export default {
|
|||||||
NcActionCheckbox,
|
NcActionCheckbox,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapState(useSettings, ['filters']),
|
||||||
all() {
|
all() {
|
||||||
return (
|
return (
|
||||||
this.filters.listened &&
|
this.filters.listened &&
|
||||||
@ -70,12 +64,10 @@ export default {
|
|||||||
this.filters.unlistened
|
this.filters.unlistened
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
filters() {
|
|
||||||
return this.$store.state.settings.filters
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
mounted() {
|
methods: {
|
||||||
this.$store.dispatch('settings/fetch')
|
...mapActions(useSettings, ['setFilters']),
|
||||||
|
t,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -29,12 +29,13 @@
|
|||||||
</NcAppNavigationItem>
|
</NcAppNavigationItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import { NcAppNavigationItem, NcModal } from '@nextcloud/vue'
|
import { NcAppNavigationItem, NcModal } from '@nextcloud/vue'
|
||||||
import ImportIcon from 'vue-material-design-icons/Import.vue'
|
import ImportIcon from 'vue-material-design-icons/Import.vue'
|
||||||
import Loading from '../Atoms/Loading.vue'
|
import Loading from '../Atoms/Loading.vue'
|
||||||
import axios from '@nextcloud/axios'
|
import axios from '@nextcloud/axios'
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Import',
|
name: 'Import',
|
||||||
@ -44,19 +45,19 @@ export default {
|
|||||||
NcAppNavigationItem,
|
NcAppNavigationItem,
|
||||||
NcModal,
|
NcModal,
|
||||||
},
|
},
|
||||||
data() {
|
data: () => ({
|
||||||
return {
|
loading: false,
|
||||||
loading: false,
|
modal: false,
|
||||||
modal: false,
|
}),
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
generateUrl,
|
generateUrl,
|
||||||
async importOpml(event) {
|
t,
|
||||||
|
async importOpml(event: Event) {
|
||||||
try {
|
try {
|
||||||
const formData = new FormData(event.target)
|
const target = event.target as HTMLFormElement
|
||||||
this.importLoading = true
|
const formData = new FormData(target)
|
||||||
await axios.post(event.target.action, formData)
|
this.loading = true
|
||||||
|
await axios.post(target.action, formData)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -8,9 +8,10 @@
|
|||||||
</NcAppNavigationItem>
|
</NcAppNavigationItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import { NcAppNavigationItem } from '@nextcloud/vue'
|
import { NcAppNavigationItem } from '@nextcloud/vue'
|
||||||
import StarIcon from 'vue-material-design-icons/Star.vue'
|
import StarIcon from 'vue-material-design-icons/Star.vue'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Rate',
|
name: 'Rate',
|
||||||
@ -18,5 +19,8 @@ export default {
|
|||||||
NcAppNavigationItem,
|
NcAppNavigationItem,
|
||||||
StarIcon,
|
StarIcon,
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
t,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
</NcAppNavigationSettings>
|
</NcAppNavigationSettings>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import Export from './Export.vue'
|
import Export from './Export.vue'
|
||||||
import Filters from './Filters.vue'
|
import Filters from './Filters.vue'
|
||||||
import Import from './Import.vue'
|
import Import from './Import.vue'
|
||||||
|
@ -3,27 +3,28 @@
|
|||||||
<template #extra>
|
<template #extra>
|
||||||
<div class="extra">
|
<div class="extra">
|
||||||
<MinusIcon class="pointer" :size="20" @click="changeRate(-0.1)" />
|
<MinusIcon class="pointer" :size="20" @click="changeRate(-0.1)" />
|
||||||
<NcCounterBubble class="counter">
|
<NcCounterBubble class="counter">x{{ rate }}</NcCounterBubble>
|
||||||
x{{ player.rate }}
|
|
||||||
</NcCounterBubble>
|
|
||||||
<PlusIcon class="pointer" :size="20" @click="changeRate(0.1)" />
|
<PlusIcon class="pointer" :size="20" @click="changeRate(0.1)" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<SpeedometerSlowIcon v-if="player.rate < 1" :size="20" />
|
<SpeedometerSlowIcon v-if="rate < 1" :size="20" />
|
||||||
<SpeedometerMediumIcon v-if="player.rate === 1" :size="20" />
|
<SpeedometerMediumIcon v-if="rate === 1" :size="20" />
|
||||||
<SpeedometerIcon v-if="player.rate > 1" :size="20" />
|
<SpeedometerIcon v-if="rate > 1" :size="20" />
|
||||||
</template>
|
</template>
|
||||||
</NcAppNavigationItem>
|
</NcAppNavigationItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import { NcAppNavigationItem, NcCounterBubble } from '@nextcloud/vue'
|
import { NcAppNavigationItem, NcCounterBubble } from '@nextcloud/vue'
|
||||||
|
import { mapActions, mapState } from 'pinia'
|
||||||
import MinusIcon from 'vue-material-design-icons/Minus.vue'
|
import MinusIcon from 'vue-material-design-icons/Minus.vue'
|
||||||
import PlusIcon from 'vue-material-design-icons/Plus.vue'
|
import PlusIcon from 'vue-material-design-icons/Plus.vue'
|
||||||
import SpeedometerIcon from 'vue-material-design-icons/Speedometer.vue'
|
import SpeedometerIcon from 'vue-material-design-icons/Speedometer.vue'
|
||||||
import SpeedometerMediumIcon from 'vue-material-design-icons/SpeedometerMedium.vue'
|
import SpeedometerMediumIcon from 'vue-material-design-icons/SpeedometerMedium.vue'
|
||||||
import SpeedometerSlowIcon from 'vue-material-design-icons/SpeedometerSlow.vue'
|
import SpeedometerSlowIcon from 'vue-material-design-icons/SpeedometerSlow.vue'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
import { usePlayer } from '../../store/player.ts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Speed',
|
name: 'Speed',
|
||||||
@ -37,17 +38,14 @@ export default {
|
|||||||
SpeedometerSlowIcon,
|
SpeedometerSlowIcon,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
player() {
|
...mapState(usePlayer, ['rate']),
|
||||||
return this.$store.state.player
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeRate(diff) {
|
...mapActions(usePlayer, ['setRate']),
|
||||||
const newRate = (this.player.rate + diff).toPrecision(2)
|
t,
|
||||||
this.$store.dispatch(
|
changeRate(diff: number) {
|
||||||
'player/rate',
|
const newRate = parseFloat((this.rate + diff).toPrecision(2))
|
||||||
newRate > 0 ? newRate : this.player.rate,
|
this.setRate(newRate > 0 ? newRate : this.rate)
|
||||||
)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,106 +0,0 @@
|
|||||||
<template>
|
|
||||||
<NcAppNavigationItem
|
|
||||||
:loading="loading"
|
|
||||||
:name="feed ? feed.title : url"
|
|
||||||
:to="hash">
|
|
||||||
<template #actions>
|
|
||||||
<NcActionButton
|
|
||||||
:aria-label="t(`core`, 'Delete')"
|
|
||||||
:name="t(`core`, 'Delete')"
|
|
||||||
:title="t(`core`, 'Delete')"
|
|
||||||
@click="deleteSubscription">
|
|
||||||
<template #icon>
|
|
||||||
<DeleteIcon :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcActionButton>
|
|
||||||
</template>
|
|
||||||
<template #icon>
|
|
||||||
<NcAvatar
|
|
||||||
v-if="feed"
|
|
||||||
:display-name="feed.author || feed.title"
|
|
||||||
:is-no-user="true"
|
|
||||||
:url="feed.imageUrl" />
|
|
||||||
<AlertIcon v-if="failed" />
|
|
||||||
</template>
|
|
||||||
</NcAppNavigationItem>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { NcActionButton, NcAppNavigationItem, NcAvatar } from '@nextcloud/vue'
|
|
||||||
import AlertIcon from 'vue-material-design-icons/Alert.vue'
|
|
||||||
import DeleteIcon from 'vue-material-design-icons/Delete.vue'
|
|
||||||
import axios from '@nextcloud/axios'
|
|
||||||
import { generateUrl } from '@nextcloud/router'
|
|
||||||
import { showError } from '@nextcloud/dialogs'
|
|
||||||
import { toUrl } from '../../utils/url.js'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Item',
|
|
||||||
components: {
|
|
||||||
AlertIcon,
|
|
||||||
DeleteIcon,
|
|
||||||
NcActionButton,
|
|
||||||
NcAppNavigationItem,
|
|
||||||
NcAvatar,
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
url: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
failed: false,
|
|
||||||
loading: true,
|
|
||||||
feed: null,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
hash() {
|
|
||||||
return toUrl(this.url)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
async mounted() {
|
|
||||||
try {
|
|
||||||
const podcastData = await axios.get(
|
|
||||||
generateUrl(
|
|
||||||
'/apps/gpoddersync/personal_settings/podcast_data?url={url}',
|
|
||||||
{
|
|
||||||
url: this.url,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
)
|
|
||||||
this.feed = podcastData.data.data
|
|
||||||
} catch (e) {
|
|
||||||
this.failed = true
|
|
||||||
console.error(e)
|
|
||||||
} finally {
|
|
||||||
this.loading = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async deleteSubscription() {
|
|
||||||
if (
|
|
||||||
confirm(
|
|
||||||
t('repod', 'Are you sure you want to delete this subscription?'),
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
try {
|
|
||||||
this.loading = true
|
|
||||||
await axios.post(
|
|
||||||
generateUrl('/apps/gpoddersync/subscription_change/create'),
|
|
||||||
{ add: [], remove: [this.url] },
|
|
||||||
)
|
|
||||||
} catch (e) {
|
|
||||||
console.error(e)
|
|
||||||
showError(t('repod', 'Error while removing the feed'))
|
|
||||||
} finally {
|
|
||||||
this.loading = false
|
|
||||||
this.$store.dispatch('subscriptions/fetch')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
151
src/components/Sidebar/Subscription.vue
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
<template>
|
||||||
|
<NcAppNavigationItem
|
||||||
|
:loading="loading"
|
||||||
|
:name="feed?.data?.title || url"
|
||||||
|
:to="toFeedUrl(url)">
|
||||||
|
<template #actions>
|
||||||
|
<NcActionButton
|
||||||
|
:aria-label="t('repod', 'Favorite')"
|
||||||
|
:model-value="feed?.isFavorite"
|
||||||
|
:name="t('repod', 'Favorite')"
|
||||||
|
:title="t('repod', 'Favorite')"
|
||||||
|
@update:modelValue="switchFavorite($event)">
|
||||||
|
<template #icon>
|
||||||
|
<StarPlusIcon v-if="!feed?.isFavorite" :size="20" />
|
||||||
|
<StarRemoveIcon v-if="feed?.isFavorite" :size="20" />
|
||||||
|
</template>
|
||||||
|
</NcActionButton>
|
||||||
|
<NcActionButton
|
||||||
|
:aria-label="t(`core`, 'Delete')"
|
||||||
|
:name="t(`core`, 'Delete')"
|
||||||
|
:title="t(`core`, 'Delete')"
|
||||||
|
@click="deleteSubscription">
|
||||||
|
<template #icon>
|
||||||
|
<DeleteIcon :size="20" />
|
||||||
|
</template>
|
||||||
|
</NcActionButton>
|
||||||
|
</template>
|
||||||
|
<template #icon>
|
||||||
|
<NcAvatar
|
||||||
|
:display-name="feed?.data?.author || feed?.data?.title"
|
||||||
|
:is-no-user="true"
|
||||||
|
:title="feed?.data?.author"
|
||||||
|
:url="feed?.data?.imageUrl" />
|
||||||
|
<StarIcon v-if="feed?.isFavorite" class="star" :size="20" />
|
||||||
|
<AlertIcon v-if="failed" />
|
||||||
|
</template>
|
||||||
|
</NcAppNavigationItem>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { NcActionButton, NcAppNavigationItem, NcAvatar } from '@nextcloud/vue'
|
||||||
|
import { mapActions, mapState } from 'pinia'
|
||||||
|
import AlertIcon from 'vue-material-design-icons/Alert.vue'
|
||||||
|
import DeleteIcon from 'vue-material-design-icons/Delete.vue'
|
||||||
|
import type { PersonalSettingsPodcastDataInterface } from '../../utils/types.ts'
|
||||||
|
import StarIcon from 'vue-material-design-icons/Star.vue'
|
||||||
|
import StarPlusIcon from 'vue-material-design-icons/StarPlus.vue'
|
||||||
|
import StarRemoveIcon from 'vue-material-design-icons/StarRemove.vue'
|
||||||
|
import axios from '@nextcloud/axios'
|
||||||
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
import { showError } from '../../utils/toast.ts'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
import { toFeedUrl } from '../../utils/url.ts'
|
||||||
|
import { useSubscriptions } from '../../store/subscriptions.ts'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Subscription',
|
||||||
|
components: {
|
||||||
|
AlertIcon,
|
||||||
|
DeleteIcon,
|
||||||
|
NcActionButton,
|
||||||
|
NcAppNavigationItem,
|
||||||
|
NcAvatar,
|
||||||
|
StarIcon,
|
||||||
|
StarPlusIcon,
|
||||||
|
StarRemoveIcon,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
url: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
failed: false,
|
||||||
|
loading: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(useSubscriptions, ['getSubByUrl', 'subs']),
|
||||||
|
feed() {
|
||||||
|
return this.getSubByUrl(this.url)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async mounted() {
|
||||||
|
try {
|
||||||
|
const podcastData =
|
||||||
|
await axios.get<PersonalSettingsPodcastDataInterface>(
|
||||||
|
generateUrl(
|
||||||
|
'/apps/gpoddersync/personal_settings/podcast_data?url={url}',
|
||||||
|
{
|
||||||
|
url: this.url,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
this.addMetadatas(this.url, podcastData.data.data)
|
||||||
|
} catch (e) {
|
||||||
|
this.failed = true
|
||||||
|
console.error(e)
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
...mapActions(useSubscriptions, ['fetch', 'addMetadatas', 'setFavorite']),
|
||||||
|
t,
|
||||||
|
toFeedUrl,
|
||||||
|
async deleteSubscription() {
|
||||||
|
if (
|
||||||
|
confirm(
|
||||||
|
t('repod', 'Are you sure you want to delete this subscription?'),
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
this.loading = true
|
||||||
|
await axios.post(
|
||||||
|
generateUrl('/apps/gpoddersync/subscription_change/create'),
|
||||||
|
{ add: [], remove: [this.url] },
|
||||||
|
)
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
|
showError(t('repod', 'Error while removing the feed'))
|
||||||
|
} finally {
|
||||||
|
this.setFavorite(this.url, false)
|
||||||
|
this.loading = false
|
||||||
|
this.fetch()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
switchFavorite(value: boolean) {
|
||||||
|
if (value) {
|
||||||
|
if (this.subs.filter((sub) => sub.isFavorite).length >= 10) {
|
||||||
|
showError(t('repod', 'You can only have 10 favorites'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.setFavorite(this.url, value)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.star {
|
||||||
|
bottom: 2px;
|
||||||
|
color: yellow;
|
||||||
|
left: 22px;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
</style>
|
@ -2,7 +2,7 @@
|
|||||||
<AppNavigation>
|
<AppNavigation>
|
||||||
<template #list>
|
<template #list>
|
||||||
<NcAppContentList>
|
<NcAppContentList>
|
||||||
<router-link to="/">
|
<router-link to="/discover">
|
||||||
<NcAppNavigationNew :text="t('repod', 'Add a podcast')">
|
<NcAppNavigationNew :text="t('repod', 'Add a podcast')">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<PlusIcon :size="20" />
|
<PlusIcon :size="20" />
|
||||||
@ -11,10 +11,14 @@
|
|||||||
</router-link>
|
</router-link>
|
||||||
<Loading v-if="loading" />
|
<Loading v-if="loading" />
|
||||||
<NcAppNavigationList v-if="!loading">
|
<NcAppNavigationList v-if="!loading">
|
||||||
<Item
|
<Subscription
|
||||||
v-for="subscriptionUrl of subscriptions"
|
v-for="sub of subs.filter((sub) => sub.isFavorite)"
|
||||||
:key="subscriptionUrl"
|
:key="sub.metrics.url"
|
||||||
:url="subscriptionUrl" />
|
:url="sub.metrics.url" />
|
||||||
|
<Subscription
|
||||||
|
v-for="sub of subs.filter((sub) => !sub.isFavorite)"
|
||||||
|
:key="sub.metrics.url"
|
||||||
|
:url="sub.metrics.url" />
|
||||||
</NcAppNavigationList>
|
</NcAppNavigationList>
|
||||||
</NcAppContentList>
|
</NcAppContentList>
|
||||||
</template>
|
</template>
|
||||||
@ -24,44 +28,43 @@
|
|||||||
</AppNavigation>
|
</AppNavigation>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import {
|
import {
|
||||||
NcAppContentList,
|
NcAppContentList,
|
||||||
NcAppNavigationList,
|
NcAppNavigationList,
|
||||||
NcAppNavigationNew,
|
NcAppNavigationNew,
|
||||||
} from '@nextcloud/vue'
|
} from '@nextcloud/vue'
|
||||||
|
import { mapActions, mapState } from 'pinia'
|
||||||
import AppNavigation from '../Atoms/AppNavigation.vue'
|
import AppNavigation from '../Atoms/AppNavigation.vue'
|
||||||
import Item from './Item.vue'
|
|
||||||
import Loading from '../Atoms/Loading.vue'
|
import Loading from '../Atoms/Loading.vue'
|
||||||
import PlusIcon from 'vue-material-design-icons/Plus.vue'
|
import PlusIcon from 'vue-material-design-icons/Plus.vue'
|
||||||
import Settings from '../Settings/Settings.vue'
|
import Settings from '../Settings/Settings.vue'
|
||||||
import { showError } from '@nextcloud/dialogs'
|
import Subscription from './Subscription.vue'
|
||||||
|
import { showError } from '../../utils/toast.ts'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
import { useSubscriptions } from '../../store/subscriptions.ts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Subscriptions',
|
name: 'Subscriptions',
|
||||||
components: {
|
components: {
|
||||||
AppNavigation,
|
AppNavigation,
|
||||||
Item,
|
|
||||||
Loading,
|
Loading,
|
||||||
NcAppContentList,
|
NcAppContentList,
|
||||||
NcAppNavigationList,
|
NcAppNavigationList,
|
||||||
NcAppNavigationNew,
|
NcAppNavigationNew,
|
||||||
PlusIcon,
|
PlusIcon,
|
||||||
Settings,
|
Settings,
|
||||||
|
Subscription,
|
||||||
},
|
},
|
||||||
data() {
|
data: () => ({
|
||||||
return {
|
loading: true,
|
||||||
loading: true,
|
}),
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
subscriptions() {
|
...mapState(useSubscriptions, ['subs']),
|
||||||
return this.$store.state.subscriptions.subscriptions
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
try {
|
try {
|
||||||
await this.$store.dispatch('subscriptions/fetch')
|
await this.fetch()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
showError(t('repod', 'Could not fetch subscriptions'))
|
showError(t('repod', 'Could not fetch subscriptions'))
|
||||||
@ -69,5 +72,9 @@ export default {
|
|||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
...mapActions(useSubscriptions, ['fetch']),
|
||||||
|
t,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
13
src/main.js
@ -1,13 +0,0 @@
|
|||||||
import { n, t } from '@nextcloud/l10n'
|
|
||||||
import App from './App.vue'
|
|
||||||
import Vue from 'vue'
|
|
||||||
import router from './router.js'
|
|
||||||
import store from './store/main.js'
|
|
||||||
|
|
||||||
Vue.mixin({ methods: { t, n } })
|
|
||||||
|
|
||||||
const View = Vue.extend(App)
|
|
||||||
new View({
|
|
||||||
router,
|
|
||||||
store,
|
|
||||||
}).$mount('#content')
|
|
12
src/main.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import '@formatjs/intl-segmenter/polyfill'
|
||||||
|
import App from './App.vue'
|
||||||
|
import { createApp } from 'vue'
|
||||||
|
import { createPinia } from 'pinia'
|
||||||
|
import router from './router.ts'
|
||||||
|
|
||||||
|
const Vue = createApp(App)
|
||||||
|
const pinia = createPinia()
|
||||||
|
|
||||||
|
Vue.use(pinia)
|
||||||
|
Vue.use(router)
|
||||||
|
Vue.mount('#content')
|
@ -1,23 +0,0 @@
|
|||||||
import Discover from './views/Discover.vue'
|
|
||||||
import Feed from './views/Feed.vue'
|
|
||||||
import Router from 'vue-router'
|
|
||||||
import Vue from 'vue'
|
|
||||||
import { generateUrl } from '@nextcloud/router'
|
|
||||||
|
|
||||||
Vue.use(Router)
|
|
||||||
|
|
||||||
const router = new Router({
|
|
||||||
base: generateUrl('apps/repod'),
|
|
||||||
routes: [
|
|
||||||
{
|
|
||||||
path: '/',
|
|
||||||
component: Discover,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/:url',
|
|
||||||
component: Feed,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
})
|
|
||||||
|
|
||||||
export default router
|
|
25
src/router.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { createRouter, createWebHistory } from 'vue-router'
|
||||||
|
import Discover from './views/Discover.vue'
|
||||||
|
import Feed from './views/Feed.vue'
|
||||||
|
import Home from './views/Home.vue'
|
||||||
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
|
||||||
|
const router = createRouter({
|
||||||
|
history: createWebHistory(generateUrl('apps/repod')),
|
||||||
|
routes: [
|
||||||
|
{
|
||||||
|
path: '/',
|
||||||
|
component: Home,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/discover',
|
||||||
|
component: Discover,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/feed/:url',
|
||||||
|
component: Feed,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})
|
||||||
|
|
||||||
|
export default router
|
@ -1,3 +0,0 @@
|
|||||||
import Vue from 'vue'
|
|
||||||
|
|
||||||
export const EventBus = new Vue()
|
|
@ -1,17 +0,0 @@
|
|||||||
import Vuex, { Store } from 'vuex'
|
|
||||||
import Vue from 'vue'
|
|
||||||
import { player } from './player.js'
|
|
||||||
import { settings } from './settings.js'
|
|
||||||
import { subscriptions } from './subscriptions.js'
|
|
||||||
|
|
||||||
Vue.use(Vuex)
|
|
||||||
|
|
||||||
const store = new Store({
|
|
||||||
modules: {
|
|
||||||
player,
|
|
||||||
settings,
|
|
||||||
subscriptions,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
export default store
|
|
@ -1,147 +0,0 @@
|
|||||||
import { EventBus } from './bus.js'
|
|
||||||
import axios from '@nextcloud/axios'
|
|
||||||
import { decodeUrl } from '../utils/url.js'
|
|
||||||
import { formatEpisodeTimestamp } from '../utils/time.js'
|
|
||||||
import { generateUrl } from '@nextcloud/router'
|
|
||||||
import router from '../router.js'
|
|
||||||
import store from './main.js'
|
|
||||||
|
|
||||||
const audio = new Audio()
|
|
||||||
audio.ondurationchange = () => store.commit('player/duration', audio.duration)
|
|
||||||
audio.onended = () => store.dispatch('player/stop')
|
|
||||||
audio.onloadeddata = () => store.commit('player/loaded', true)
|
|
||||||
audio.onplay = () => store.dispatch('player/play')
|
|
||||||
audio.onpause = () => store.dispatch('player/pause')
|
|
||||||
audio.onratechange = () => store.commit('player/rate', audio.playbackRate)
|
|
||||||
audio.onseeked = () => store.commit('player/currentTime', audio.currentTime)
|
|
||||||
audio.ontimeupdate = () => store.commit('player/currentTime', audio.currentTime)
|
|
||||||
audio.onvolumechange = () => store.commit('player/volume', audio.volume)
|
|
||||||
|
|
||||||
export const player = {
|
|
||||||
namespaced: true,
|
|
||||||
state: {
|
|
||||||
currentTime: null,
|
|
||||||
duration: null,
|
|
||||||
episode: null,
|
|
||||||
loaded: false,
|
|
||||||
paused: null,
|
|
||||||
podcastUrl: null,
|
|
||||||
volume: 1,
|
|
||||||
rate: 1,
|
|
||||||
started: 0,
|
|
||||||
},
|
|
||||||
mutations: {
|
|
||||||
action: (state, action) => {
|
|
||||||
state.episode.action = action
|
|
||||||
|
|
||||||
if (action && action.position && action.position < action.total) {
|
|
||||||
audio.currentTime = action.position
|
|
||||||
state.started = audio.currentTime
|
|
||||||
}
|
|
||||||
},
|
|
||||||
currentTime: (state, currentTime) => {
|
|
||||||
state.currentTime = currentTime
|
|
||||||
},
|
|
||||||
duration: (state, duration) => {
|
|
||||||
state.duration = duration
|
|
||||||
},
|
|
||||||
episode: (state, episode) => {
|
|
||||||
state.episode = episode
|
|
||||||
|
|
||||||
if (episode) {
|
|
||||||
state.podcastUrl = decodeUrl(router.currentRoute.params.url)
|
|
||||||
audio.src = episode.url
|
|
||||||
audio.load()
|
|
||||||
audio.play()
|
|
||||||
|
|
||||||
if (
|
|
||||||
episode.action &&
|
|
||||||
episode.action.position &&
|
|
||||||
episode.action.position < episode.action.total
|
|
||||||
) {
|
|
||||||
audio.currentTime = episode.action.position
|
|
||||||
state.started = audio.currentTime
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
state.loaded = false
|
|
||||||
state.podcastUrl = null
|
|
||||||
audio.src = ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
loaded: (state, loaded) => {
|
|
||||||
state.loaded = loaded
|
|
||||||
},
|
|
||||||
paused: (state, paused) => {
|
|
||||||
state.paused = paused
|
|
||||||
},
|
|
||||||
volume: (state, volume) => {
|
|
||||||
state.volume = volume
|
|
||||||
},
|
|
||||||
rate: (state, rate) => {
|
|
||||||
state.rate = rate
|
|
||||||
},
|
|
||||||
started: (state, started) => {
|
|
||||||
state.started = started
|
|
||||||
},
|
|
||||||
},
|
|
||||||
actions: {
|
|
||||||
load: async (context, episode) => {
|
|
||||||
context.commit('episode', episode)
|
|
||||||
try {
|
|
||||||
const action = await axios.get(
|
|
||||||
generateUrl('/apps/repod/episodes/action?url={url}', {
|
|
||||||
url: episode.url,
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
context.commit('action', action.data)
|
|
||||||
} catch {}
|
|
||||||
},
|
|
||||||
pause: (context) => {
|
|
||||||
audio.pause()
|
|
||||||
context.commit('paused', true)
|
|
||||||
context.dispatch('time')
|
|
||||||
},
|
|
||||||
play: (context) => {
|
|
||||||
audio.play()
|
|
||||||
context.commit('paused', false)
|
|
||||||
context.commit('started', audio.currentTime)
|
|
||||||
},
|
|
||||||
seek: (context, currentTime) => {
|
|
||||||
audio.currentTime = currentTime
|
|
||||||
context.dispatch('time')
|
|
||||||
},
|
|
||||||
stop: (context) => {
|
|
||||||
context.dispatch('pause')
|
|
||||||
context.commit('episode', null)
|
|
||||||
},
|
|
||||||
time: async (context) => {
|
|
||||||
const episode = context.state.episode
|
|
||||||
episode.action = {
|
|
||||||
podcast: context.state.podcastUrl,
|
|
||||||
episode: context.state.episode.url,
|
|
||||||
guid: context.state.episode.guid,
|
|
||||||
action: 'play',
|
|
||||||
timestamp: formatEpisodeTimestamp(new Date()),
|
|
||||||
started: Math.round(context.state.started),
|
|
||||||
position: Math.round(audio.currentTime),
|
|
||||||
total: Math.round(audio.duration),
|
|
||||||
}
|
|
||||||
axios.post(generateUrl('/apps/gpoddersync/episode_action/create'), [
|
|
||||||
episode.action,
|
|
||||||
])
|
|
||||||
EventBus.$emit('updateEpisodesList', episode)
|
|
||||||
},
|
|
||||||
volume: (_, volume) => {
|
|
||||||
audio.volume = volume
|
|
||||||
},
|
|
||||||
rate: (_, rate) => {
|
|
||||||
audio.playbackRate = rate
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
setInterval(() => {
|
|
||||||
if (player.state.paused === false) {
|
|
||||||
store.dispatch('player/time')
|
|
||||||
}
|
|
||||||
}, 40000)
|
|
137
src/store/player.ts
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
import type { EpisodeActionInterface, EpisodeInterface } from '../utils/types.ts'
|
||||||
|
import { getCookie, setCookie } from '../utils/cookies.ts'
|
||||||
|
import axios from '@nextcloud/axios'
|
||||||
|
import { defineStore } from 'pinia'
|
||||||
|
import { formatEpisodeTimestamp } from '../utils/time.ts'
|
||||||
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
import { showError } from '../utils/toast.ts'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
|
||||||
|
const audio = new Audio()
|
||||||
|
|
||||||
|
export const usePlayer = defineStore('player', {
|
||||||
|
state: () => ({
|
||||||
|
currentTime: null as number | null,
|
||||||
|
duration: null as number | null,
|
||||||
|
episode: null as EpisodeInterface | null,
|
||||||
|
loaded: false,
|
||||||
|
paused: true,
|
||||||
|
playCount: 0,
|
||||||
|
podcastUrl: null as string | null,
|
||||||
|
volume: 1,
|
||||||
|
rate: 1,
|
||||||
|
started: 0,
|
||||||
|
}),
|
||||||
|
actions: {
|
||||||
|
init() {
|
||||||
|
audio.playbackRate = parseFloat(getCookie('repod.rate') || '1')
|
||||||
|
audio.volume = parseFloat(getCookie('repod.volume') || '1')
|
||||||
|
|
||||||
|
audio.ondurationchange = () => (this.duration = audio.duration)
|
||||||
|
audio.onended = () => this.stop()
|
||||||
|
audio.onloadeddata = () => (this.loaded = true)
|
||||||
|
audio.onpause = () => this.pause()
|
||||||
|
audio.onplay = () => this.play()
|
||||||
|
audio.onratechange = () => (this.rate = audio.playbackRate)
|
||||||
|
audio.onseeked = () => (this.currentTime = audio.currentTime)
|
||||||
|
audio.ontimeupdate = () => (this.currentTime = audio.currentTime)
|
||||||
|
audio.onvolumechange = () => (this.volume = audio.volume)
|
||||||
|
|
||||||
|
setInterval(this.act, 40000)
|
||||||
|
setInterval(this.conflict, 1000)
|
||||||
|
},
|
||||||
|
act() {
|
||||||
|
if (this.paused === false) {
|
||||||
|
this.time()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
conflict() {
|
||||||
|
this.playCount = 0
|
||||||
|
},
|
||||||
|
async load(episode: EpisodeInterface | null, podcastUrl?: string) {
|
||||||
|
this.episode = episode
|
||||||
|
this.podcastUrl = podcastUrl || null
|
||||||
|
|
||||||
|
if (this.episode?.url) {
|
||||||
|
audio.src = this.episode.url
|
||||||
|
audio.load()
|
||||||
|
|
||||||
|
try {
|
||||||
|
const action = await axios.get<EpisodeActionInterface>(
|
||||||
|
generateUrl('/apps/repod/episodes/action?url={url}', {
|
||||||
|
url: this.episode.url,
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
this.episode.action = action.data
|
||||||
|
} catch {}
|
||||||
|
|
||||||
|
if (
|
||||||
|
this.episode.action &&
|
||||||
|
this.episode.action.position < this.episode.action.total
|
||||||
|
) {
|
||||||
|
audio.currentTime = this.episode.action.position
|
||||||
|
this.started = audio.currentTime
|
||||||
|
}
|
||||||
|
|
||||||
|
audio.play()
|
||||||
|
} else {
|
||||||
|
this.loaded = false
|
||||||
|
this.podcastUrl = null
|
||||||
|
audio.src = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pause() {
|
||||||
|
audio.pause()
|
||||||
|
this.paused = true
|
||||||
|
this.time()
|
||||||
|
},
|
||||||
|
play() {
|
||||||
|
this.playCount++
|
||||||
|
|
||||||
|
if (this.playCount > 10) {
|
||||||
|
showError(t('repod', 'A browser extension conflict with RePod'))
|
||||||
|
} else {
|
||||||
|
audio.play()
|
||||||
|
this.paused = false
|
||||||
|
this.started = audio.currentTime
|
||||||
|
}
|
||||||
|
},
|
||||||
|
seek(currentTime: number) {
|
||||||
|
audio.currentTime = currentTime
|
||||||
|
this.time()
|
||||||
|
},
|
||||||
|
stop() {
|
||||||
|
this.pause()
|
||||||
|
this.episode = null
|
||||||
|
},
|
||||||
|
time() {
|
||||||
|
if (!this.podcastUrl || !this.episode?.url) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
this.episode.action = {
|
||||||
|
podcast: this.podcastUrl,
|
||||||
|
episode: this.episode.url,
|
||||||
|
guid: this.episode.guid,
|
||||||
|
action: 'play',
|
||||||
|
timestamp: formatEpisodeTimestamp(new Date()),
|
||||||
|
started: Math.round(this.started),
|
||||||
|
position: Math.round(audio.currentTime),
|
||||||
|
total: Math.round(audio.duration),
|
||||||
|
}
|
||||||
|
|
||||||
|
axios.post(generateUrl('/apps/gpoddersync/episode_action/create'), [
|
||||||
|
this.episode.action,
|
||||||
|
])
|
||||||
|
},
|
||||||
|
setVolume(volume: number) {
|
||||||
|
audio.volume = volume
|
||||||
|
setCookie('repod.volume', volume.toString(), 365)
|
||||||
|
},
|
||||||
|
setRate(rate: number) {
|
||||||
|
audio.playbackRate = rate
|
||||||
|
setCookie('repod.rate', rate.toString(), 365)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
@ -1,28 +0,0 @@
|
|||||||
import { getCookie, setCookie } from '../utils/cookies.js'
|
|
||||||
|
|
||||||
export const settings = {
|
|
||||||
namespaced: true,
|
|
||||||
state: {
|
|
||||||
filters: {
|
|
||||||
listened: true,
|
|
||||||
listening: true,
|
|
||||||
unlistened: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mutations: {
|
|
||||||
filters: (state, filters) => {
|
|
||||||
state.filters = { ...state.filters, ...filters }
|
|
||||||
setCookie('repod.filters', JSON.stringify(state.filters), 365)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
actions: {
|
|
||||||
fetch: (context) => {
|
|
||||||
try {
|
|
||||||
const filters = getCookie('repod.filters')
|
|
||||||
context.commit('filters', JSON.parse(filters))
|
|
||||||
} catch (e) {
|
|
||||||
// nothing
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
37
src/store/settings.ts
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import { getCookie, setCookie } from '../utils/cookies.ts'
|
||||||
|
import type { FiltersInterface } from '../utils/types.ts'
|
||||||
|
import { defineStore } from 'pinia'
|
||||||
|
|
||||||
|
export const useSettings = defineStore('settings', {
|
||||||
|
state: () => {
|
||||||
|
try {
|
||||||
|
const filters = JSON.parse(getCookie('repod.filters') || '{}') || {}
|
||||||
|
|
||||||
|
if (!filters.length) {
|
||||||
|
throw new Error('Empty cookie')
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
listened: filters.listened,
|
||||||
|
listening: filters.listening,
|
||||||
|
unlistened: filters.unlistened,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
listened: true,
|
||||||
|
listening: true,
|
||||||
|
unlistened: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
setFilters(filters: Partial<FiltersInterface>) {
|
||||||
|
this.filters = { ...this.filters, ...filters }
|
||||||
|
setCookie('repod.filters', JSON.stringify(this.filters), 365)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
@ -1,28 +0,0 @@
|
|||||||
import axios from '@nextcloud/axios'
|
|
||||||
import { generateUrl } from '@nextcloud/router'
|
|
||||||
|
|
||||||
export const subscriptions = {
|
|
||||||
namespaced: true,
|
|
||||||
state: {
|
|
||||||
subscriptions: [],
|
|
||||||
},
|
|
||||||
mutations: {
|
|
||||||
set: (state, subscriptions) => {
|
|
||||||
state.subscriptions = subscriptions
|
|
||||||
},
|
|
||||||
},
|
|
||||||
actions: {
|
|
||||||
fetch: async (context) => {
|
|
||||||
const metrics = await axios.get(
|
|
||||||
generateUrl('/apps/gpoddersync/personal_settings/metrics'),
|
|
||||||
)
|
|
||||||
const subs = [...metrics.data.subscriptions].sort(
|
|
||||||
(a, b) => b.listenedSeconds - a.listenedSeconds,
|
|
||||||
)
|
|
||||||
context.commit(
|
|
||||||
'set',
|
|
||||||
subs.map((sub) => sub.url),
|
|
||||||
)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
59
src/store/subscriptions.ts
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
import type {
|
||||||
|
PersonalSettingsMetricsInterface,
|
||||||
|
PodcastDataInterface,
|
||||||
|
SubscriptionInterface,
|
||||||
|
} from '../utils/types.ts'
|
||||||
|
import { getCookie, setCookie } from '../utils/cookies.ts'
|
||||||
|
import axios from '@nextcloud/axios'
|
||||||
|
import { defineStore } from 'pinia'
|
||||||
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
|
||||||
|
export const useSubscriptions = defineStore('subscriptions', {
|
||||||
|
state: () => ({
|
||||||
|
subs: [] as SubscriptionInterface[],
|
||||||
|
}),
|
||||||
|
getters: {
|
||||||
|
getSubByUrl: (state) => (url: string) =>
|
||||||
|
state.subs.find((sub) => sub.metrics.url === url),
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
async fetch() {
|
||||||
|
let favorites: string[] = []
|
||||||
|
try {
|
||||||
|
favorites = JSON.parse(getCookie('repod.favorites') || '[]') || []
|
||||||
|
} catch {}
|
||||||
|
|
||||||
|
const metrics = await axios.get<PersonalSettingsMetricsInterface>(
|
||||||
|
generateUrl('/apps/gpoddersync/personal_settings/metrics'),
|
||||||
|
)
|
||||||
|
|
||||||
|
this.subs = [...metrics.data.subscriptions]
|
||||||
|
.sort((a, b) => b.listenedSeconds - a.listenedSeconds)
|
||||||
|
.map((sub) => ({
|
||||||
|
metrics: sub,
|
||||||
|
isFavorite: favorites.includes(sub.url),
|
||||||
|
data: this.getSubByUrl(sub.url)?.data,
|
||||||
|
}))
|
||||||
|
},
|
||||||
|
addMetadatas(link: string, data: PodcastDataInterface) {
|
||||||
|
this.subs = this.subs.map((sub) =>
|
||||||
|
sub.metrics.url === link ? { ...sub, data } : sub,
|
||||||
|
)
|
||||||
|
},
|
||||||
|
setFavorite(link: string, isFavorite: boolean) {
|
||||||
|
this.subs = this.subs.map((sub) =>
|
||||||
|
sub.metrics.url === link ? { ...sub, isFavorite } : sub,
|
||||||
|
)
|
||||||
|
|
||||||
|
setCookie(
|
||||||
|
'repod.favorites',
|
||||||
|
JSON.stringify(
|
||||||
|
this.subs
|
||||||
|
.filter((sub) => sub.isFavorite)
|
||||||
|
.map((sub) => sub.metrics.url),
|
||||||
|
),
|
||||||
|
365,
|
||||||
|
)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
@ -4,7 +4,7 @@
|
|||||||
* @param {string} name Nom du cookie à récupérer
|
* @param {string} name Nom du cookie à récupérer
|
||||||
* @return {string|null}
|
* @return {string|null}
|
||||||
*/
|
*/
|
||||||
export const getCookie = (name) => {
|
export const getCookie = (name: string): string | null => {
|
||||||
const cookies = document.cookie.split('; ')
|
const cookies = document.cookie.split('; ')
|
||||||
const value = cookies.find((c) => c.startsWith(name + '='))?.split('=')[1]
|
const value = cookies.find((c) => c.startsWith(name + '='))?.split('=')[1]
|
||||||
if (value === undefined) {
|
if (value === undefined) {
|
||||||
@ -19,7 +19,7 @@ export const getCookie = (name) => {
|
|||||||
* @param {string} value Value du cookie
|
* @param {string} value Value du cookie
|
||||||
* @param {number} days Durée de vie du cookie (en jours)
|
* @param {number} days Durée de vie du cookie (en jours)
|
||||||
*/
|
*/
|
||||||
export const setCookie = (name, value, days) => {
|
export const setCookie = (name: string, value: string, days: number) => {
|
||||||
const date = new Date()
|
const date = new Date()
|
||||||
date.setDate(date.getDate() + days)
|
date.setDate(date.getDate() + days)
|
||||||
document.cookie = `${name}=${encodeURIComponent(value)}; expires=${date.toUTCString()}; SameSite=Strict;`
|
document.cookie = `${name}=${encodeURIComponent(value)}; expires=${date.toUTCString()}; SameSite=Strict;`
|
@ -1,12 +0,0 @@
|
|||||||
// https://stackoverflow.com/a/53486112
|
|
||||||
export const debounce = (fn, delay) => {
|
|
||||||
let timeoutID = null
|
|
||||||
return function () {
|
|
||||||
clearTimeout(timeoutID)
|
|
||||||
const args = arguments
|
|
||||||
const that = this
|
|
||||||
timeoutID = setTimeout(function () {
|
|
||||||
fn.apply(that, args)
|
|
||||||
}, delay)
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +1,8 @@
|
|||||||
// https://stackoverflow.com/a/20732091
|
// https://stackoverflow.com/a/20732091
|
||||||
export const humanFileSize = (size) => {
|
export const humanFileSize = (size: number) => {
|
||||||
const i = size === 0 ? 0 : Math.floor(Math.log(size) / Math.log(1024))
|
const i = size === 0 ? 0 : Math.floor(Math.log(size) / Math.log(1024))
|
||||||
return (
|
return (
|
||||||
(size / Math.pow(1024, i)).toFixed(2) * 1 +
|
(size / Math.pow(1024, i)).toFixed(2) +
|
||||||
' ' +
|
' ' +
|
||||||
['B', 'kB', 'MB', 'GB', 'TB'][i]
|
['B', 'kB', 'MB', 'GB', 'TB'][i]
|
||||||
)
|
)
|
16
src/utils/status.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import type { EpisodeInterface } from './types'
|
||||||
|
|
||||||
|
export const hasEnded = (episode: EpisodeInterface) =>
|
||||||
|
episode.action &&
|
||||||
|
episode.action.action &&
|
||||||
|
(episode.action.action.toLowerCase() === 'delete' ||
|
||||||
|
(episode.action.position > 0 &&
|
||||||
|
episode.action.total > 0 &&
|
||||||
|
episode.action.position >= episode.action.total))
|
||||||
|
|
||||||
|
export const isListening = (episode: EpisodeInterface) =>
|
||||||
|
episode.action &&
|
||||||
|
episode.action.action &&
|
||||||
|
episode.action.action.toLowerCase() === 'play' &&
|
||||||
|
episode.action.position > 0 &&
|
||||||
|
!hasEnded(episode)
|
@ -1,7 +0,0 @@
|
|||||||
// https://stackoverflow.com/a/5002618
|
|
||||||
export const cleanHtml = (text) => {
|
|
||||||
const pre = document.createElement('pre')
|
|
||||||
pre.innerHTML = text.replace(/<br\s*\/?>/gm, '\n')
|
|
||||||
const strippedText = pre.textContent || pre.innerText || ''
|
|
||||||
return strippedText.replace(/\n/gm, '<br>')
|
|
||||||
}
|
|
@ -3,9 +3,9 @@
|
|||||||
* @param {Date} date The date
|
* @param {Date} date The date
|
||||||
* @return {string}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
export const formatTimer = (date) => {
|
export const formatTimer = (date: Date): string => {
|
||||||
const minutes = date.getUTCMinutes().toString().padStart(2, 0)
|
const minutes = date.getUTCMinutes().toString().padStart(2, '0')
|
||||||
const seconds = date.getUTCSeconds().toString().padStart(2, 0)
|
const seconds = date.getUTCSeconds().toString().padStart(2, '0')
|
||||||
let timer = `${minutes}:${seconds}`
|
let timer = `${minutes}:${seconds}`
|
||||||
|
|
||||||
if (date.getUTCHours()) {
|
if (date.getUTCHours()) {
|
||||||
@ -20,7 +20,7 @@ export const formatTimer = (date) => {
|
|||||||
* @param {Date} date The date
|
* @param {Date} date The date
|
||||||
* @return {string}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
export const formatEpisodeTimestamp = (date) => {
|
export const formatEpisodeTimestamp = (date: Date): string => {
|
||||||
const year = date.getFullYear()
|
const year = date.getFullYear()
|
||||||
const month = (date.getMonth() + 1).toString().padStart(2, '0')
|
const month = (date.getMonth() + 1).toString().padStart(2, '0')
|
||||||
const day = date.getDate().toString().padStart(2, '0')
|
const day = date.getDate().toString().padStart(2, '0')
|
||||||
@ -36,7 +36,7 @@ export const formatEpisodeTimestamp = (date) => {
|
|||||||
* @param {Date} date The date
|
* @param {Date} date The date
|
||||||
* @return {string}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
export const formatLocaleDate = (date) =>
|
export const formatLocaleDate = (date: Date): string =>
|
||||||
date.toLocaleDateString(undefined, { dateStyle: 'medium' })
|
date.toLocaleDateString(undefined, { dateStyle: 'medium' })
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -44,7 +44,7 @@ export const formatLocaleDate = (date) =>
|
|||||||
* @param {string} duration The duration feed's entry
|
* @param {string} duration The duration feed's entry
|
||||||
* @return {number}
|
* @return {number}
|
||||||
*/
|
*/
|
||||||
export const durationToSeconds = (duration) => {
|
export const durationToSeconds = (duration: string): number => {
|
||||||
const splitDuration = duration.split(':').reverse()
|
const splitDuration = duration.split(':').reverse()
|
||||||
let seconds = parseInt(splitDuration[0])
|
let seconds = parseInt(splitDuration[0])
|
||||||
seconds += splitDuration.length > 1 ? parseInt(splitDuration[1]) * 60 : 0
|
seconds += splitDuration.length > 1 ? parseInt(splitDuration[1]) * 60 : 0
|
14
src/utils/toast.ts
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import toastify from 'toastify-js'
|
||||||
|
|
||||||
|
export const showMessage = (text: string, backgroundColor: string) =>
|
||||||
|
toastify({
|
||||||
|
text,
|
||||||
|
backgroundColor,
|
||||||
|
}).showToast()
|
||||||
|
|
||||||
|
export const showError = (text: string) => showMessage(text, 'var(--color-error)')
|
||||||
|
export const showWarning = (text: string) =>
|
||||||
|
showMessage(text, 'var(--color-warning)')
|
||||||
|
export const showInfo = (text: string) => showMessage(text, 'var(--color-primary)')
|
||||||
|
export const showSuccess = (text: string) =>
|
||||||
|
showMessage(text, 'var(--color-success)')
|
73
src/utils/types.ts
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
export interface EpisodeActionInterface {
|
||||||
|
podcast: string
|
||||||
|
episode: string
|
||||||
|
action: string
|
||||||
|
timestamp: string
|
||||||
|
started: number
|
||||||
|
position: number
|
||||||
|
total: number
|
||||||
|
guid?: string
|
||||||
|
id?: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface EpisodeInterface {
|
||||||
|
title: string
|
||||||
|
url: string
|
||||||
|
name: string
|
||||||
|
link?: string
|
||||||
|
image?: string
|
||||||
|
description?: string
|
||||||
|
fetchedAtUnix: number
|
||||||
|
guid: string
|
||||||
|
type?: string
|
||||||
|
size?: number
|
||||||
|
pubDate?: {
|
||||||
|
date: string
|
||||||
|
timezone_type: number
|
||||||
|
timezone: string
|
||||||
|
}
|
||||||
|
duration?: string
|
||||||
|
action?: EpisodeActionInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface FiltersInterface {
|
||||||
|
listened: boolean
|
||||||
|
listening: boolean
|
||||||
|
unlistened: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PodcastDataInterface {
|
||||||
|
title: string
|
||||||
|
author?: string
|
||||||
|
link: string
|
||||||
|
description?: string
|
||||||
|
imageUrl?: string
|
||||||
|
fetchedAtUnix: number
|
||||||
|
imageBlob?: string | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PodcastMetricsInterface {
|
||||||
|
url: string
|
||||||
|
listenedSeconds: number
|
||||||
|
actionCounts: {
|
||||||
|
delete: number
|
||||||
|
download: number
|
||||||
|
flattr: number
|
||||||
|
new: number
|
||||||
|
play: number
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SubscriptionInterface {
|
||||||
|
data?: PodcastDataInterface
|
||||||
|
isFavorite?: boolean
|
||||||
|
metrics: PodcastMetricsInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PersonalSettingsMetricsInterface {
|
||||||
|
subscriptions: PodcastMetricsInterface[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PersonalSettingsPodcastDataInterface {
|
||||||
|
data: PodcastDataInterface
|
||||||
|
}
|
@ -1,3 +0,0 @@
|
|||||||
export const encodeUrl = (url) => encodeURIComponent(btoa(url))
|
|
||||||
export const decodeUrl = (url) => atob(decodeURIComponent(url))
|
|
||||||
export const toUrl = (url) => `/${encodeUrl(url)}`
|
|
5
src/utils/url.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export const encodeUrl = (url: string) => encodeURIComponent(btoa(url))
|
||||||
|
export const decodeUrl = (url: string) => atob(decodeURIComponent(url))
|
||||||
|
export const toFeedUrl = (url: string) => `/feed/${encodeUrl(url)}`
|
||||||
|
export const filenameFromUrl = (url: string) =>
|
||||||
|
new URL(url).pathname.split('/').pop()
|
@ -1,7 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppContent class="main">
|
<AppContent class="padding">
|
||||||
<NcTextField :label="t('repod', 'Find a podcast')" :value.sync="search">
|
<NcTextField v-model="search" :label="t('repod', 'Find a podcast')">
|
||||||
<Magnify :size="20" />
|
<template #icon>
|
||||||
|
<Magnify :size="20" />
|
||||||
|
</template>
|
||||||
</NcTextField>
|
</NcTextField>
|
||||||
<Search v-if="search" :value="search" />
|
<Search v-if="search" :value="search" />
|
||||||
<Toplist v-if="!search" type="hot" />
|
<Toplist v-if="!search" type="hot" />
|
||||||
@ -10,13 +12,14 @@
|
|||||||
</AppContent>
|
</AppContent>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import AddRss from '../components/Discover/AddRss.vue'
|
import AddRss from '../components/Discover/AddRss.vue'
|
||||||
import AppContent from '../components/Atoms/AppContent.vue'
|
import AppContent from '../components/Atoms/AppContent.vue'
|
||||||
import Magnify from 'vue-material-design-icons/Magnify.vue'
|
import Magnify from 'vue-material-design-icons/Magnify.vue'
|
||||||
import { NcTextField } from '@nextcloud/vue'
|
import { NcTextField } from '@nextcloud/vue'
|
||||||
import Search from '../components/Discover/Search.vue'
|
import Search from '../components/Discover/Search.vue'
|
||||||
import Toplist from '../components/Discover/Toplist.vue'
|
import Toplist from '../components/Discover/Toplist.vue'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Discover',
|
name: 'Discover',
|
||||||
@ -28,16 +31,17 @@ export default {
|
|||||||
Search,
|
Search,
|
||||||
Toplist,
|
Toplist,
|
||||||
},
|
},
|
||||||
data() {
|
data: () => ({
|
||||||
return {
|
search: '',
|
||||||
search: '',
|
}),
|
||||||
}
|
methods: {
|
||||||
|
t,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.main {
|
.padding {
|
||||||
padding: 15px 51px;
|
padding: 15px 51px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,35 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppContent>
|
<AppContent>
|
||||||
<Loading v-if="loading" />
|
<Loading v-if="loading" />
|
||||||
<NcEmptyContent
|
<EmptyContent v-if="failed" :name="t('repod', 'Error loading feed')">
|
||||||
v-if="failed"
|
|
||||||
class="error"
|
|
||||||
:name="t('repod', 'Error loading feed')">
|
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<Alert />
|
<Alert />
|
||||||
</template>
|
</template>
|
||||||
</NcEmptyContent>
|
</EmptyContent>
|
||||||
<Banner
|
<Banner v-if="feed" :feed="feed" />
|
||||||
v-if="feed"
|
|
||||||
:author="feed.author"
|
|
||||||
:description="feed.description"
|
|
||||||
:image-url="feed.imageUrl"
|
|
||||||
:link="feed.link"
|
|
||||||
:title="feed.title" />
|
|
||||||
<Episodes v-if="feed" />
|
<Episodes v-if="feed" />
|
||||||
</AppContent>
|
</AppContent>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import Alert from 'vue-material-design-icons/Alert.vue'
|
import Alert from 'vue-material-design-icons/Alert.vue'
|
||||||
import AppContent from '../components/Atoms/AppContent.vue'
|
import AppContent from '../components/Atoms/AppContent.vue'
|
||||||
import Banner from '../components/Feed/Banner.vue'
|
import Banner from '../components/Feed/Banner.vue'
|
||||||
|
import EmptyContent from '../components/Atoms/EmptyContent.vue'
|
||||||
import Episodes from '../components/Feed/Episodes.vue'
|
import Episodes from '../components/Feed/Episodes.vue'
|
||||||
import Loading from '../components/Atoms/Loading.vue'
|
import Loading from '../components/Atoms/Loading.vue'
|
||||||
import { NcEmptyContent } from '@nextcloud/vue'
|
import type { PodcastDataInterface } from '../utils/types.ts'
|
||||||
import axios from '@nextcloud/axios'
|
import axios from '@nextcloud/axios'
|
||||||
import { decodeUrl } from '../utils/url.js'
|
import { decodeUrl } from '../utils/url.ts'
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Feed',
|
name: 'Feed',
|
||||||
@ -37,25 +30,24 @@ export default {
|
|||||||
Alert,
|
Alert,
|
||||||
AppContent,
|
AppContent,
|
||||||
Banner,
|
Banner,
|
||||||
|
EmptyContent,
|
||||||
Episodes,
|
Episodes,
|
||||||
Loading,
|
Loading,
|
||||||
NcEmptyContent,
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
failed: false,
|
|
||||||
loading: true,
|
|
||||||
feed: null,
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
data: () => ({
|
||||||
|
failed: false,
|
||||||
|
loading: true,
|
||||||
|
feed: null as PodcastDataInterface | null,
|
||||||
|
}),
|
||||||
computed: {
|
computed: {
|
||||||
url() {
|
url() {
|
||||||
return decodeUrl(this.$route.params.url)
|
return decodeUrl(this.$route.params.url as string)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
try {
|
try {
|
||||||
const podcastData = await axios.get(
|
this.loading = true
|
||||||
|
const podcastData = await axios.get<PodcastDataInterface>(
|
||||||
generateUrl('/apps/repod/podcast?url={url}', { url: this.url }),
|
generateUrl('/apps/repod/podcast?url={url}', { url: this.url }),
|
||||||
)
|
)
|
||||||
this.feed = podcastData.data
|
this.feed = podcastData.data
|
||||||
@ -66,11 +58,8 @@ export default {
|
|||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
t,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.error {
|
|
||||||
margin: 2rem;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<NcAppContent class="content">
|
<AppContent>
|
||||||
<NcEmptyContent :name="t('repod', 'Missing required app')">
|
<EmptyContent :name="t('repod', 'Missing required app')">
|
||||||
<template #action>
|
<template #action>
|
||||||
<NcButton :href="gPodderSyncUrl">
|
<NcButton :href="gPodderSyncUrl">
|
||||||
{{ t('repod', 'Install GPodder Sync') }}
|
{{ t('repod', 'Install GPodder Sync') }}
|
||||||
@ -9,27 +9,33 @@
|
|||||||
<template #icon>
|
<template #icon>
|
||||||
<Alert />
|
<Alert />
|
||||||
</template>
|
</template>
|
||||||
</NcEmptyContent>
|
</EmptyContent>
|
||||||
</NcAppContent>
|
</AppContent>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import { NcAppContent, NcButton, NcEmptyContent } from '@nextcloud/vue'
|
|
||||||
import Alert from 'vue-material-design-icons/Alert.vue'
|
import Alert from 'vue-material-design-icons/Alert.vue'
|
||||||
|
import AppContent from '../components/Atoms/AppContent.vue'
|
||||||
|
import EmptyContent from '../components/Atoms/EmptyContent.vue'
|
||||||
|
import { NcButton } from '@nextcloud/vue'
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'GPodder',
|
name: 'GPodder',
|
||||||
components: {
|
components: {
|
||||||
Alert,
|
Alert,
|
||||||
NcAppContent,
|
AppContent,
|
||||||
|
EmptyContent,
|
||||||
NcButton,
|
NcButton,
|
||||||
NcEmptyContent,
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
gPodderSyncUrl() {
|
gPodderSyncUrl() {
|
||||||
return generateUrl('/settings/apps/installed/gpoddersync')
|
return generateUrl('/settings/apps/installed/gpoddersync')
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
t,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
55
src/views/Home.vue
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<template>
|
||||||
|
<AppContent>
|
||||||
|
<EmptyContent
|
||||||
|
v-if="!favorites.length"
|
||||||
|
class="padding"
|
||||||
|
:description="
|
||||||
|
t('repod', 'Pin some subscriptions to see their latest updates')
|
||||||
|
"
|
||||||
|
:name="t('repod', 'No favorites')">
|
||||||
|
<template #icon>
|
||||||
|
<StarOffIcon />
|
||||||
|
</template>
|
||||||
|
</EmptyContent>
|
||||||
|
<ul v-if="favorites.length">
|
||||||
|
<li v-for="favorite in favorites" :key="favorite.metrics.url">
|
||||||
|
<Favorite :feed="favorite" />
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</AppContent>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import AppContent from '../components/Atoms/AppContent.vue'
|
||||||
|
import EmptyContent from '../components/Atoms/EmptyContent.vue'
|
||||||
|
import Favorite from '../components/Feed/Favorite.vue'
|
||||||
|
import StarOffIcon from 'vue-material-design-icons/StarOff.vue'
|
||||||
|
import { mapState } from 'pinia'
|
||||||
|
import { t } from '@nextcloud/l10n'
|
||||||
|
import { useSubscriptions } from '../store/subscriptions.ts'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Home',
|
||||||
|
components: {
|
||||||
|
AppContent,
|
||||||
|
EmptyContent,
|
||||||
|
Favorite,
|
||||||
|
StarOffIcon,
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(useSubscriptions, ['subs']),
|
||||||
|
favorites() {
|
||||||
|
return this.subs.filter((sub) => sub.isFavorite)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
t,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.padding {
|
||||||
|
padding: 15px 51px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -6,7 +6,9 @@ namespace OCA\GPodderSync\Core\SubscriptionChange;
|
|||||||
|
|
||||||
class SubscriptionChangeRequestParser
|
class SubscriptionChangeRequestParser
|
||||||
{
|
{
|
||||||
public function __construct(private SubscriptionChangesReader $subscriptionChangeReader) {}
|
public function __construct(
|
||||||
|
private SubscriptionChangesReader $subscriptionChangeReader
|
||||||
|
) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return SubscriptionChange[]
|
* @return SubscriptionChange[]
|
||||||
|
@ -8,7 +8,9 @@ use OCA\GPodderSync\Core\EpisodeAction\EpisodeAction;
|
|||||||
|
|
||||||
class EpisodeActionRepository
|
class EpisodeActionRepository
|
||||||
{
|
{
|
||||||
public function __construct(private EpisodeActionMapper $episodeActionMapper) {}
|
public function __construct(
|
||||||
|
private EpisodeActionMapper $episodeActionMapper
|
||||||
|
) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return EpisodeAction[]
|
* @return EpisodeAction[]
|
||||||
|
@ -8,7 +8,9 @@ use OCP\DB\Exception;
|
|||||||
|
|
||||||
class EpisodeActionWriter
|
class EpisodeActionWriter
|
||||||
{
|
{
|
||||||
public function __construct(private EpisodeActionMapper $episodeActionMapper) {}
|
public function __construct(
|
||||||
|
private EpisodeActionMapper $episodeActionMapper
|
||||||
|
) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return EpisodeActionEntity
|
* @return EpisodeActionEntity
|
||||||
|
@ -6,7 +6,9 @@ namespace OCA\GPodderSync\Db\SubscriptionChange;
|
|||||||
|
|
||||||
class SubscriptionChangeRepository
|
class SubscriptionChangeRepository
|
||||||
{
|
{
|
||||||
public function __construct(private SubscriptionChangeMapper $subscriptionChangeMapper) {}
|
public function __construct(
|
||||||
|
private SubscriptionChangeMapper $subscriptionChangeMapper
|
||||||
|
) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return SubscriptionChangeEntity[]
|
* @return SubscriptionChangeEntity[]
|
||||||
|
@ -6,7 +6,9 @@ namespace OCA\GPodderSync\Db\SubscriptionChange;
|
|||||||
|
|
||||||
class SubscriptionChangeWriter
|
class SubscriptionChangeWriter
|
||||||
{
|
{
|
||||||
public function __construct(private SubscriptionChangeMapper $subscriptionChangeMapper) {}
|
public function __construct(
|
||||||
|
private SubscriptionChangeMapper $subscriptionChangeMapper
|
||||||
|
) {}
|
||||||
|
|
||||||
public function purge(): void {}
|
public function purge(): void {}
|
||||||
|
|
||||||
|
188
translationfiles/de/repod.po
Normal file
@ -0,0 +1,188 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||||
|
# This file is distributed under the same license as the Nextcloud package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Nextcloud 3.14159\n"
|
||||||
|
"Report-Msgid-Bugs-To: translations\\@example.com\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: OiledAmoeba <florian+crystalyx@ruhnke.cloud>\n"
|
||||||
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
"Language: de\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
|
msgid "RePod Subscriptions"
|
||||||
|
msgstr "RePod Abonnements"
|
||||||
|
|
||||||
|
msgid "Podcast"
|
||||||
|
msgstr "Podcast"
|
||||||
|
|
||||||
|
msgid "RePod"
|
||||||
|
msgstr "RePod"
|
||||||
|
|
||||||
|
msgid "🔊 Browse, manage and listen to podcasts"
|
||||||
|
msgstr "🔊 Suchen, Verwalten und Anhören von Podcasts"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"## Features\n"
|
||||||
|
"- 🔍 Browse and subscribe huge collection of podcasts\n"
|
||||||
|
"- 🔊 Listen to episodes directly in Nextcloud\n"
|
||||||
|
"- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/) and [other "
|
||||||
|
"apps](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-"
|
||||||
|
"gpoddersync)\n"
|
||||||
|
"- 📱 Mobile friendly interface\n"
|
||||||
|
"- 📡 Import and export your subscriptions\n"
|
||||||
|
"- ➡️ Full features comparison [here](https://git.crystalyx.net/Xefir/"
|
||||||
|
"repod#comparaison-with-similar-apps-for-nextcloud)\n"
|
||||||
|
"\n"
|
||||||
|
"## Requirements\n"
|
||||||
|
"You need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) "
|
||||||
|
"installed to use this app!"
|
||||||
|
msgstr ""
|
||||||
|
"## Funktionen\n"
|
||||||
|
"- 🔍 Durchsuchen und abonnieren einer großen Sammlung von Podcasts\n"
|
||||||
|
"- 🔊 Episoden direkt in Nextcloud anhören\n"
|
||||||
|
"- 🌐 Synchronisiere deine Aktivität mit [AntennaPod](https://antennapod.org/)\n"
|
||||||
|
"- 📱 Mobile-freundliche Schnittstelle\n"
|
||||||
|
"- 📡 Importieren und Exportieren Ihrer Abonnements\n"
|
||||||
|
"\n"
|
||||||
|
"## Voraussetzungen\n"
|
||||||
|
"Du musst [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) "
|
||||||
|
"installiert haben, um diese App zu benutzen!"
|
||||||
|
|
||||||
|
msgid "Download"
|
||||||
|
msgstr "Herunterladen"
|
||||||
|
|
||||||
|
msgid "Add a RSS link"
|
||||||
|
msgstr "Einen RSS-Link hinzufügen"
|
||||||
|
|
||||||
|
msgid "Subscribe"
|
||||||
|
msgstr "Abonnieren"
|
||||||
|
|
||||||
|
msgid "Error while adding the feed"
|
||||||
|
msgstr "Fehler beim Hinzufügen des Feeds"
|
||||||
|
|
||||||
|
msgid "Could not fetch search results"
|
||||||
|
msgstr "Suchergebnisse können nicht geladen werden"
|
||||||
|
|
||||||
|
msgid "New podcasts"
|
||||||
|
msgstr "Neue Podcasts"
|
||||||
|
|
||||||
|
msgid "Hot podcasts"
|
||||||
|
msgstr "Beliebte Podcasts"
|
||||||
|
|
||||||
|
msgid "Could not fetch tops"
|
||||||
|
msgstr "Titel können nicht abgerufen werden"
|
||||||
|
|
||||||
|
msgid "Copy feed"
|
||||||
|
msgstr "Feed kopieren"
|
||||||
|
|
||||||
|
msgid "Link copied to the clipboard"
|
||||||
|
msgstr "Der Link des Feeds wurde in die Zwischenablage kopiert"
|
||||||
|
|
||||||
|
msgid "Play"
|
||||||
|
msgstr "Abspielen"
|
||||||
|
|
||||||
|
msgid "Stop"
|
||||||
|
msgstr "Stopp"
|
||||||
|
|
||||||
|
msgid "Read"
|
||||||
|
msgstr "Gelesen"
|
||||||
|
|
||||||
|
msgid "Open website"
|
||||||
|
msgstr "Webseite aufrufen"
|
||||||
|
|
||||||
|
msgid "Could not change the status of the episode"
|
||||||
|
msgstr "Kann den Status der Folge nicht ändern"
|
||||||
|
|
||||||
|
msgid "Could not fetch episodes"
|
||||||
|
msgstr "Folgen können nicht abgerufen werden"
|
||||||
|
|
||||||
|
msgid "Rewind 10 seconds"
|
||||||
|
msgstr "10 Sekunden zurückspulen"
|
||||||
|
|
||||||
|
msgid "Pause"
|
||||||
|
msgstr "Pause"
|
||||||
|
|
||||||
|
msgid "Fast forward 30 seconds"
|
||||||
|
msgstr "30 Sekunden vorspulen"
|
||||||
|
|
||||||
|
msgid "Mute"
|
||||||
|
msgstr "Stumm"
|
||||||
|
|
||||||
|
msgid "Unmute"
|
||||||
|
msgstr "Stummschalten"
|
||||||
|
|
||||||
|
msgid "Export subscriptions"
|
||||||
|
msgstr "Abonnements exportieren"
|
||||||
|
|
||||||
|
msgid "Filtering episodes"
|
||||||
|
msgstr "Folgen filtern"
|
||||||
|
|
||||||
|
msgid "Show all"
|
||||||
|
msgstr "Zeige alles"
|
||||||
|
|
||||||
|
msgid "Listened"
|
||||||
|
msgstr "Gehört"
|
||||||
|
|
||||||
|
msgid "Listening"
|
||||||
|
msgstr "Läuft"
|
||||||
|
|
||||||
|
msgid "Unlistened"
|
||||||
|
msgstr "Nicht angehört"
|
||||||
|
|
||||||
|
msgid "Import subscriptions"
|
||||||
|
msgstr "Importiere Abonnements"
|
||||||
|
|
||||||
|
msgid "Import OPML file"
|
||||||
|
msgstr "Importiere OPML-Datei"
|
||||||
|
|
||||||
|
msgid "Rate RePod ❤️"
|
||||||
|
msgstr "Bewerte RePod ❤️"
|
||||||
|
|
||||||
|
msgid "Playback speed"
|
||||||
|
msgstr "Wiedergabegeschwindigkeit"
|
||||||
|
|
||||||
|
msgid "Favorite"
|
||||||
|
msgstr "Favorit"
|
||||||
|
|
||||||
|
msgid "Are you sure you want to delete this subscription?"
|
||||||
|
msgstr "Bist Du sicher, dass Du das Abonnement löschen möchtest?"
|
||||||
|
|
||||||
|
msgid "Error while removing the feed"
|
||||||
|
msgstr "Fehler beim Löschen des Feeds"
|
||||||
|
|
||||||
|
msgid "You can only have 10 favorites"
|
||||||
|
msgstr "Du kannst nur 10 Favoriten haben"
|
||||||
|
|
||||||
|
msgid "Add a podcast"
|
||||||
|
msgstr "Einen Podcast hinzufügen"
|
||||||
|
|
||||||
|
msgid "Could not fetch subscriptions"
|
||||||
|
msgstr "Abonnements können nicht abgerufen werden"
|
||||||
|
|
||||||
|
msgid "Find a podcast"
|
||||||
|
msgstr "Finde einen Podcast"
|
||||||
|
|
||||||
|
msgid "Error loading feed"
|
||||||
|
msgstr "Fehler beim Laden des Feeds"
|
||||||
|
|
||||||
|
msgid "Missing required app"
|
||||||
|
msgstr "Benötigte App fehlt"
|
||||||
|
|
||||||
|
msgid "Install GPodder Sync"
|
||||||
|
msgstr "Installiere GPodder Sync"
|
||||||
|
|
||||||
|
msgid "Pin some subscriptions to see their latest updates"
|
||||||
|
msgstr "Pinne einige Abonnements, um ihre neuesten Updates zu sehen"
|
||||||
|
|
||||||
|
msgid "No favorites"
|
||||||
|
msgstr "Keine Favoriten"
|
||||||
|
|
||||||
|
msgid "A browser extension conflict with RePod"
|
||||||
|
msgstr "Ein Browser-Erweiterungskonflikt mit RePod"
|
@ -9,9 +9,9 @@ msgstr ""
|
|||||||
"Project-Id-Version: Nextcloud 3.14159\n"
|
"Project-Id-Version: Nextcloud 3.14159\n"
|
||||||
"Report-Msgid-Bugs-To: translations\\@example.com\n"
|
"Report-Msgid-Bugs-To: translations\\@example.com\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: Michel Roux <xefir@crystalyx.net>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"Language: \n"
|
"Language: fr\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
@ -32,7 +32,13 @@ msgid ""
|
|||||||
"## Features\n"
|
"## Features\n"
|
||||||
"- 🔍 Browse and subscribe huge collection of podcasts\n"
|
"- 🔍 Browse and subscribe huge collection of podcasts\n"
|
||||||
"- 🔊 Listen to episodes directly in Nextcloud\n"
|
"- 🔊 Listen to episodes directly in Nextcloud\n"
|
||||||
"- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/)\n"
|
"- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/) and [other "
|
||||||
|
"apps](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-"
|
||||||
|
"gpoddersync)\n"
|
||||||
|
"- 📱 Mobile friendly interface\n"
|
||||||
|
"- 📡 Import and export your subscriptions\n"
|
||||||
|
"- ➡️ Full features comparison [here](https://git.crystalyx.net/Xefir/"
|
||||||
|
"repod#comparaison-with-similar-apps-for-nextcloud)\n"
|
||||||
"\n"
|
"\n"
|
||||||
"## Requirements\n"
|
"## Requirements\n"
|
||||||
"You need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) "
|
"You need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) "
|
||||||
@ -41,7 +47,13 @@ msgstr ""
|
|||||||
"## Fonctionnalités\n"
|
"## Fonctionnalités\n"
|
||||||
"- 🔍 Parcourir et s'abonner à une grande collections de podcasts\n"
|
"- 🔍 Parcourir et s'abonner à une grande collections de podcasts\n"
|
||||||
"- 🔊 Écouter vos épisodes directement sur Nextcloud\n"
|
"- 🔊 Écouter vos épisodes directement sur Nextcloud\n"
|
||||||
"- 🌐 Synchroniser son activité avec [AntennaPod](https://antennapod.org/)\n"
|
"- 🌐 Synchroniser son activité avec [AntennaPod](https://antennapod.org/) et d'autres "
|
||||||
|
"[applications](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-"
|
||||||
|
"gpoddersync)\n"
|
||||||
|
"- 📱 Interface optimisée pour mobiles et ordinateurs\n"
|
||||||
|
"- 📡 Import/export de ses abonnements\n"
|
||||||
|
"- ➡️ Tableau récapitulatif complet des fonctionnalitées [ici](https://git.crystalyx."
|
||||||
|
"net/Xefir/repod#comparaison-with-similar-apps-for-nextcloud)\n"
|
||||||
"\n"
|
"\n"
|
||||||
"## Pré-requis\n"
|
"## Pré-requis\n"
|
||||||
"Vous devez avoir [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) "
|
"Vous devez avoir [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) "
|
||||||
@ -74,26 +86,41 @@ msgstr "Impossible de récupérer les tops"
|
|||||||
msgid "Copy feed"
|
msgid "Copy feed"
|
||||||
msgstr "Copier le flux"
|
msgstr "Copier le flux"
|
||||||
|
|
||||||
|
msgid "Link copied to the clipboard"
|
||||||
|
msgstr "Lien vers le flux copié dans le presse-papiers"
|
||||||
|
|
||||||
msgid "Play"
|
msgid "Play"
|
||||||
msgstr "Lecture"
|
msgstr "Lecture"
|
||||||
|
|
||||||
msgid "Stop"
|
msgid "Stop"
|
||||||
msgstr "Arrêter"
|
msgstr "Arrêter"
|
||||||
|
|
||||||
msgid "Mark as read"
|
msgid "Read"
|
||||||
msgstr "Marquer comme lu"
|
msgstr "Lu"
|
||||||
|
|
||||||
msgid "Mark as unread"
|
|
||||||
msgstr "Marquer comme non lu"
|
|
||||||
|
|
||||||
msgid "Open website"
|
msgid "Open website"
|
||||||
msgstr "Ouvrir le site web"
|
msgstr "Ouvrir le site web"
|
||||||
|
|
||||||
|
msgid "Could not change the status of the episode"
|
||||||
|
msgstr "Impossible de changer le status de l'épisode"
|
||||||
|
|
||||||
msgid "Could not fetch episodes"
|
msgid "Could not fetch episodes"
|
||||||
msgstr "Impossible de récuprer les épisodes"
|
msgstr "Impossible de récuprer les épisodes"
|
||||||
|
|
||||||
msgid "Could not change the status of the episode"
|
msgid "Rewind 10 seconds"
|
||||||
msgstr "Impossible de changer le status de l'épisode"
|
msgstr "Retour rapide de 10 secondes"
|
||||||
|
|
||||||
|
msgid "Pause"
|
||||||
|
msgstr "Pause"
|
||||||
|
|
||||||
|
msgid "Fast forward 30 seconds"
|
||||||
|
msgstr "Avance rapide de 30 secondes"
|
||||||
|
|
||||||
|
msgid "Mute"
|
||||||
|
msgstr "Silencer"
|
||||||
|
|
||||||
|
msgid "Unmute"
|
||||||
|
msgstr "Paroler"
|
||||||
|
|
||||||
msgid "Export subscriptions"
|
msgid "Export subscriptions"
|
||||||
msgstr "Exporter les abonnements"
|
msgstr "Exporter les abonnements"
|
||||||
@ -125,12 +152,18 @@ msgstr "Donnez votre avis ❤️"
|
|||||||
msgid "Playback speed"
|
msgid "Playback speed"
|
||||||
msgstr "Vitesse de lecture"
|
msgstr "Vitesse de lecture"
|
||||||
|
|
||||||
|
msgid "Favorite"
|
||||||
|
msgstr "Favori"
|
||||||
|
|
||||||
msgid "Are you sure you want to delete this subscription?"
|
msgid "Are you sure you want to delete this subscription?"
|
||||||
msgstr "Êtes-vous sûr de vouloir supprimer ce flux ?"
|
msgstr "Êtes-vous sûr de vouloir supprimer ce flux ?"
|
||||||
|
|
||||||
msgid "Error while removing the feed"
|
msgid "Error while removing the feed"
|
||||||
msgstr "Erreur lors de la suppression du flux"
|
msgstr "Erreur lors de la suppression du flux"
|
||||||
|
|
||||||
|
msgid "You can only have 10 favorites"
|
||||||
|
msgstr "Vous ne pouvez avoir que 10 favoris"
|
||||||
|
|
||||||
msgid "Add a podcast"
|
msgid "Add a podcast"
|
||||||
msgstr "Ajouter un podcast"
|
msgstr "Ajouter un podcast"
|
||||||
|
|
||||||
@ -149,5 +182,11 @@ msgstr "Une application requise est manquante"
|
|||||||
msgid "Install GPodder Sync"
|
msgid "Install GPodder Sync"
|
||||||
msgstr "Installer GPodder Sync"
|
msgstr "Installer GPodder Sync"
|
||||||
|
|
||||||
msgid "Feed's link copied to the clipboard"
|
msgid "Pin some subscriptions to see their latest updates"
|
||||||
msgstr "Lien vers le flux copié dans le presse-papiers"
|
msgstr "Ajoutez des abonnements en favoris pour obtenir les dernières nouvelles ici"
|
||||||
|
|
||||||
|
msgid "No favorites"
|
||||||
|
msgstr "Aucun favoris"
|
||||||
|
|
||||||
|
msgid "A browser extension conflict with RePod"
|
||||||
|
msgstr "Une extension de votre navigateur entre en conflit avec RePod"
|
||||||
|
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Nextcloud 3.14159\n"
|
"Project-Id-Version: Nextcloud 3.14159\n"
|
||||||
"Report-Msgid-Bugs-To: translations\\@example.com\n"
|
"Report-Msgid-Bugs-To: translations\\@example.com\n"
|
||||||
"POT-Creation-Date: 2024-05-29 14:56+0000\n"
|
"POT-Creation-Date: 2024-11-08 23:27+0000\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -17,7 +17,7 @@ msgstr ""
|
|||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: /app/lib/Controller/OpmlController.php:44
|
#: /app/lib/Controller/OpmlController.php:46
|
||||||
msgid "RePod Subscriptions"
|
msgid "RePod Subscriptions"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -40,7 +40,13 @@ msgid ""
|
|||||||
"## Features\n"
|
"## Features\n"
|
||||||
"- 🔍 Browse and subscribe huge collection of podcasts\n"
|
"- 🔍 Browse and subscribe huge collection of podcasts\n"
|
||||||
"- 🔊 Listen to episodes directly in Nextcloud\n"
|
"- 🔊 Listen to episodes directly in Nextcloud\n"
|
||||||
"- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/)\n"
|
"- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/) and [other "
|
||||||
|
"apps](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-"
|
||||||
|
"gpoddersync)\n"
|
||||||
|
"- 📱 Mobile friendly interface\n"
|
||||||
|
"- 📡 Import and export your subscriptions\n"
|
||||||
|
"- ➡️ Full features comparison [here](https://git.crystalyx.net/Xefir/"
|
||||||
|
"repod#comparaison-with-similar-apps-for-nextcloud)\n"
|
||||||
"\n"
|
"\n"
|
||||||
"## Requirements\n"
|
"## Requirements\n"
|
||||||
"You need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) "
|
"You need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) "
|
||||||
@ -48,8 +54,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:1
|
#: /app/specialVueFakeDummyForL10nScript.js:1
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:27
|
#: /app/specialVueFakeDummyForL10nScript.js:24
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:28
|
#: /app/specialVueFakeDummyForL10nScript.js:25
|
||||||
msgid "Download"
|
msgid "Download"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -59,42 +65,46 @@ msgstr ""
|
|||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:3
|
#: /app/specialVueFakeDummyForL10nScript.js:3
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:4
|
#: /app/specialVueFakeDummyForL10nScript.js:4
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:11
|
#: /app/specialVueFakeDummyForL10nScript.js:5
|
||||||
|
#: /app/specialVueFakeDummyForL10nScript.js:12
|
||||||
msgid "Subscribe"
|
msgid "Subscribe"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:5
|
#: /app/specialVueFakeDummyForL10nScript.js:6
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:12
|
#: /app/specialVueFakeDummyForL10nScript.js:13
|
||||||
msgid "Error while adding the feed"
|
msgid "Error while adding the feed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:6
|
#: /app/specialVueFakeDummyForL10nScript.js:7
|
||||||
msgid "Could not fetch search results"
|
msgid "Could not fetch search results"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:7
|
#: /app/specialVueFakeDummyForL10nScript.js:8
|
||||||
msgid "New podcasts"
|
msgid "New podcasts"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:8
|
#: /app/specialVueFakeDummyForL10nScript.js:9
|
||||||
msgid "Hot podcasts"
|
msgid "Hot podcasts"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:9
|
#: /app/specialVueFakeDummyForL10nScript.js:10
|
||||||
msgid "Could not fetch tops"
|
msgid "Could not fetch tops"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:10
|
#: /app/specialVueFakeDummyForL10nScript.js:11
|
||||||
msgid "Copy feed"
|
msgid "Copy feed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:13
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:14
|
#: /app/specialVueFakeDummyForL10nScript.js:14
|
||||||
|
msgid "Link copied to the clipboard"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:15
|
#: /app/specialVueFakeDummyForL10nScript.js:15
|
||||||
|
#: /app/specialVueFakeDummyForL10nScript.js:16
|
||||||
|
#: /app/specialVueFakeDummyForL10nScript.js:31
|
||||||
msgid "Play"
|
msgid "Play"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:16
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:17
|
#: /app/specialVueFakeDummyForL10nScript.js:17
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:18
|
#: /app/specialVueFakeDummyForL10nScript.js:18
|
||||||
msgid "Stop"
|
msgid "Stop"
|
||||||
@ -103,96 +113,135 @@ msgstr ""
|
|||||||
#: /app/specialVueFakeDummyForL10nScript.js:19
|
#: /app/specialVueFakeDummyForL10nScript.js:19
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:20
|
#: /app/specialVueFakeDummyForL10nScript.js:20
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:21
|
#: /app/specialVueFakeDummyForL10nScript.js:21
|
||||||
msgid "Mark as read"
|
msgid "Read"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:22
|
#: /app/specialVueFakeDummyForL10nScript.js:22
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:23
|
#: /app/specialVueFakeDummyForL10nScript.js:23
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:24
|
|
||||||
msgid "Mark as unread"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:25
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:26
|
|
||||||
msgid "Open website"
|
msgid "Open website"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:29
|
#: /app/specialVueFakeDummyForL10nScript.js:26
|
||||||
msgid "Could not fetch episodes"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:30
|
|
||||||
msgid "Could not change the status of the episode"
|
msgid "Could not change the status of the episode"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:31
|
#: /app/specialVueFakeDummyForL10nScript.js:27
|
||||||
msgid "Export subscriptions"
|
#: /app/specialVueFakeDummyForL10nScript.js:28
|
||||||
|
msgid "Could not fetch episodes"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /app/specialVueFakeDummyForL10nScript.js:29
|
||||||
|
msgid "Rewind 10 seconds"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /app/specialVueFakeDummyForL10nScript.js:30
|
||||||
|
msgid "Pause"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:32
|
#: /app/specialVueFakeDummyForL10nScript.js:32
|
||||||
msgid "Filtering episodes"
|
msgid "Fast forward 30 seconds"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:33
|
#: /app/specialVueFakeDummyForL10nScript.js:33
|
||||||
msgid "Show all"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:34
|
#: /app/specialVueFakeDummyForL10nScript.js:34
|
||||||
msgid "Listened"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:35
|
#: /app/specialVueFakeDummyForL10nScript.js:35
|
||||||
msgid "Listening"
|
msgid "Mute"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:36
|
#: /app/specialVueFakeDummyForL10nScript.js:36
|
||||||
msgid "Unlistened"
|
msgid "Unmute"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:37
|
#: /app/specialVueFakeDummyForL10nScript.js:37
|
||||||
msgid "Import subscriptions"
|
msgid "Export subscriptions"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:38
|
#: /app/specialVueFakeDummyForL10nScript.js:38
|
||||||
msgid "Import OPML file"
|
msgid "Filtering episodes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:39
|
#: /app/specialVueFakeDummyForL10nScript.js:39
|
||||||
msgid "Rate RePod ❤️"
|
msgid "Show all"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:40
|
#: /app/specialVueFakeDummyForL10nScript.js:40
|
||||||
msgid "Playback speed"
|
msgid "Listened"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:41
|
#: /app/specialVueFakeDummyForL10nScript.js:41
|
||||||
msgid "Are you sure you want to delete this subscription?"
|
msgid "Listening"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:42
|
#: /app/specialVueFakeDummyForL10nScript.js:42
|
||||||
msgid "Error while removing the feed"
|
msgid "Unlistened"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:43
|
#: /app/specialVueFakeDummyForL10nScript.js:43
|
||||||
msgid "Add a podcast"
|
msgid "Import subscriptions"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:44
|
#: /app/specialVueFakeDummyForL10nScript.js:44
|
||||||
msgid "Could not fetch subscriptions"
|
msgid "Import OPML file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:45
|
#: /app/specialVueFakeDummyForL10nScript.js:45
|
||||||
msgid "Find a podcast"
|
msgid "Rate RePod ❤️"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:46
|
#: /app/specialVueFakeDummyForL10nScript.js:46
|
||||||
msgid "Error loading feed"
|
msgid "Playback speed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:47
|
#: /app/specialVueFakeDummyForL10nScript.js:47
|
||||||
|
#: /app/specialVueFakeDummyForL10nScript.js:48
|
||||||
|
#: /app/specialVueFakeDummyForL10nScript.js:49
|
||||||
|
msgid "Favorite"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /app/specialVueFakeDummyForL10nScript.js:50
|
||||||
|
msgid "Are you sure you want to delete this subscription?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /app/specialVueFakeDummyForL10nScript.js:51
|
||||||
|
msgid "Error while removing the feed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /app/specialVueFakeDummyForL10nScript.js:52
|
||||||
|
msgid "You can only have 10 favorites"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /app/specialVueFakeDummyForL10nScript.js:53
|
||||||
|
msgid "Add a podcast"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /app/specialVueFakeDummyForL10nScript.js:54
|
||||||
|
msgid "Could not fetch subscriptions"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /app/specialVueFakeDummyForL10nScript.js:55
|
||||||
|
msgid "Find a podcast"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /app/specialVueFakeDummyForL10nScript.js:56
|
||||||
|
msgid "Error loading feed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /app/specialVueFakeDummyForL10nScript.js:57
|
||||||
msgid "Missing required app"
|
msgid "Missing required app"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:48
|
#: /app/specialVueFakeDummyForL10nScript.js:58
|
||||||
msgid "Install GPodder Sync"
|
msgid "Install GPodder Sync"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: /app/specialVueFakeDummyForL10nScript.js:59
|
||||||
|
msgid "Pin some subscriptions to see their latest updates"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /app/specialVueFakeDummyForL10nScript.js:60
|
||||||
|
msgid "No favorites"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /app/src/store/player.ts:93
|
||||||
|
msgid "A browser extension conflict with RePod"
|
||||||
|
msgstr ""
|
||||||
|
15
tsconfig.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"extends": "@vue/tsconfig",
|
||||||
|
"include": ["./src/**/*.ts", "./src/**/*.vue", "**/*.ts"],
|
||||||
|
"compilerOptions": {
|
||||||
|
"allowImportingTsExtensions": true,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"target": "ESNext",
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "Bundler",
|
||||||
|
"noImplicitAny": false,
|
||||||
|
"rootDir": ".",
|
||||||
|
"strict": true,
|
||||||
|
"noEmit": true,
|
||||||
|
}
|
||||||
|
}
|
20
vite.config.ts
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import { join, resolve } from 'path'
|
||||||
|
import { createAppConfig } from '@nextcloud/vite-config'
|
||||||
|
import { defineConfig } from 'vite'
|
||||||
|
|
||||||
|
const config = defineConfig({
|
||||||
|
build: {
|
||||||
|
sourcemap: false,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
export default createAppConfig(
|
||||||
|
{
|
||||||
|
main: resolve(join('src', 'main.ts')),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
createEmptyCSSEntryPoints: true,
|
||||||
|
thirdPartyLicense: false,
|
||||||
|
},
|
||||||
|
)
|