-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add podcast support #875
Add podcast support #875
Commits on Jul 29, 2021
-
Draft an API and a mock-up back-end for the podcasts
For now, the back-end is just able to return two hard-coded podcast channels when all the channels are requested. Everything else is "TODO".
Configuration menu - View commit details
-
Copy full SHA for 1f3255b - Browse repository at this point
Copy the full SHA 1f3255bView commit details -
First draft of the Podcasts view
The view can show the podcast channels and episoded provided by the back-end but cannot play them yet. The file podcastsviewcontroller.js still contains a lot of copy-pasted code from the albumsviewcontroller.js which should be refitted or removed.
Configuration menu - View commit details
-
Copy full SHA for ba3cc50 - Browse repository at this point
Copy the full SHA ba3cc50View commit details -
Fix podcast channel titles not showing up completely
The listheading widget was being rendered incorrectly in case the element had no details button enabled.
Configuration menu - View commit details
-
Copy full SHA for 436d77e - Browse repository at this point
Copy the full SHA 436d77eView commit details -
Configuration menu - View commit details
-
Copy full SHA for bffd406 - Browse repository at this point
Copy the full SHA bffd406View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6112c49 - Browse repository at this point
Copy the full SHA 6112c49View commit details -
Proper information for podcasts in the player control bar and popups
The podcast episode, channnel, and image are now properly shown in the player control bar, in the mediaSession integration, and in the desktop notification.
Configuration menu - View commit details
-
Copy full SHA for 81c9612 - Browse repository at this point
Copy the full SHA 81c9612View commit details -
Configuration menu - View commit details
-
Copy full SHA for 08e1d68 - Browse repository at this point
Copy the full SHA 08e1d68View commit details
Commits on Aug 1, 2021
-
DB tables, entities, mappers, and business layers for podcasts
All these new classes and definitions are not yet used for anything.
Configuration menu - View commit details
-
Copy full SHA for b779869 - Browse repository at this point
Copy the full SHA b779869View commit details -
Enable populating and clearing the podcast tables with
occ
The `occ` command `music:podcast-add` can now be used to add a single podcast channel from a RSS feed and the command `music:podcast-reset` can be used to reset all the previously added channels along with their episodes.
Configuration menu - View commit details
-
Copy full SHA for a7c6bd2 - Browse repository at this point
Copy the full SHA a7c6bd2View commit details
Commits on Aug 2, 2021
-
Proper implementation for the API method getting the podcasts
Get the data from the database tables instead of fetching it on the fly from a few hard-coded RSS feed URLs.
Configuration menu - View commit details
-
Copy full SHA for aadd77c - Browse repository at this point
Copy the full SHA aadd77cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7fe7451 - Browse repository at this point
Copy the full SHA 7fe7451View commit details -
Implement the rest of the previously drafted podcast REST API
Implemented REST API endpoints to subscribe to a podcast channel, to unsubscribe it, to get an individual podcast channel and to reset all the subscribed channels.
Configuration menu - View commit details
-
Copy full SHA for fe61f9c - Browse repository at this point
Copy the full SHA fe61f9cView commit details -
Include
channel_id
into the unique index of theepisodes
DB tableIt is at least theoretically possible that there would we identical podcast channels with differing RSS feed URLs. In such case, we should allow duplicate episode `guid`s to exist.
Configuration menu - View commit details
-
Copy full SHA for 226c8e0 - Browse repository at this point
Copy the full SHA 226c8e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6fb3861 - Browse repository at this point
Copy the full SHA 6fb3861View commit details -
Configuration menu - View commit details
-
Copy full SHA for ce9f148 - Browse repository at this point
Copy the full SHA ce9f148View commit details
Commits on Aug 3, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 8f4c224 - Browse repository at this point
Copy the full SHA 8f4c224View commit details -
Configuration menu - View commit details
-
Copy full SHA for f9d8eba - Browse repository at this point
Copy the full SHA f9d8ebaView commit details
Commits on Aug 4, 2021
-
Add an option on the web UI to update all the podcast channels
As part of this change, a new module podcstService was created to host the new functions. Also the handling of the creating/subscribing a new podcast channel was moved from navigationController to this new service.
Configuration menu - View commit details
-
Copy full SHA for 872961c - Browse repository at this point
Copy the full SHA 872961cView commit details
Commits on Aug 5, 2021
-
Web UI options for reloading and removing an individual podcast channel
To achieve this, a support had to be added to the listHeading directive to attach an actions menu. The menu contents are injected when instantiating the directive.
Configuration menu - View commit details
-
Copy full SHA for f026eea - Browse repository at this point
Copy the full SHA f026eeaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 95c51fe - Browse repository at this point
Copy the full SHA 95c51feView commit details -
Configuration menu - View commit details
-
Copy full SHA for be9b06d - Browse repository at this point
Copy the full SHA be9b06dView commit details -
Fix the operation of the inViewObserver when a new podcast channel added
The new instance used to be always appended to the end of all instances although often this was not the correct place, according the order of the elements on the UI. Hence, the lazy loading didn't work correctly before reinitializing the view by navigating to another view and back.
Configuration menu - View commit details
-
Copy full SHA for b8b1798 - Browse repository at this point
Copy the full SHA b8b1798View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c03bad - Browse repository at this point
Copy the full SHA 6c03badView commit details -
Do not parse channel lastBuildDate or include it in the channel hash
On some podcast channels, the <lastBuildDate> tag changes very often, e.g. once every 15 minutes. This caused a lot of unnecessary updates on the database contents with such channels.
Configuration menu - View commit details
-
Copy full SHA for 427590a - Browse repository at this point
Copy the full SHA 427590aView commit details -
Improvements on the
occ music:podcast-add
command- The command now supports defining multiple RSS feed URLs at once - When adding a feed for multiple users, the feed is now fetched and parsed only once, and not separately for each user
Configuration menu - View commit details
-
Copy full SHA for 7b8be7c - Browse repository at this point
Copy the full SHA 7b8be7cView commit details
Commits on Aug 6, 2021
-
Move the core parts of logic from PodcastApiController to PodcastService
This facilitates code reuse when adding the podcast support for the Subsonic and Ampache APIs: The class PodcastService contains API-agnostic logic while PodcastApiController is just a thin wrapper for it, providing the adaptation to the REST API provided for the web UI.
Configuration menu - View commit details
-
Copy full SHA for 234574d - Browse repository at this point
Copy the full SHA 234574dView commit details -
Configuration menu - View commit details
-
Copy full SHA for fa64769 - Browse repository at this point
Copy the full SHA fa64769View commit details -
Configuration menu - View commit details
-
Copy full SHA for 69f31f7 - Browse repository at this point
Copy the full SHA 69f31f7View commit details -
Move Subsonic API converters to PodcastChannel and PodcastEpisode
The entity classes PodcastChannel and PodcastEpisode now have functions called toSubsonicApi. These replace the former functions SubsonicController::podcastChannelToApi and SubsonicController::podcastChannelToApi. Similar design was previously applied to the Ampache API conversion of the podcast entity types. The target of this refactoring is to reduce the size of the monolithic SubsonicController. Similar refactoring should be eventually made to the other entity types, too, but that does not belong under this feature branch.
Configuration menu - View commit details
-
Copy full SHA for af69100 - Browse repository at this point
Copy the full SHA af69100View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6732c46 - Browse repository at this point
Copy the full SHA 6732c46View commit details
Commits on Aug 7, 2021
-
Fix a problem in the albums compact layout caused by f026eea
After setting the position of the <h2> element as 'relative', also the position of the neighboring .albumart element must be 'relative'. Otherwise, the padding of the <h2> will shadow the .albumart element, making it impossible for the element to receive hover and click events.
Configuration menu - View commit details
-
Copy full SHA for 72964ba - Browse repository at this point
Copy the full SHA 72964baView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e3bb11 - Browse repository at this point
Copy the full SHA 5e3bb11View commit details -
Ampache/Subsonic: Support starring/flagging also podcasts and episodes
- The Subsonic API specification doesn't mention anything about starring with podcasts, but at least DSub and Ultrasonic allow starring podcast episodes and that seems to work with the official Subsonic demo server. Our implementation now supports starring also podcast channels, although no known client does that. - The Ampache API specification defines flagging support for both podcast channels and episodes, and this is now implemented - The Ampache API specification does not define support for podcasts on the action `stats` which can be used, among other things, to fetch the flagged entities. However, we support the types `podcast` and `podcast_episode` also here, as an extension to the specified API. - The property `flag` was added to all Ampache results containing flaggable entities. This has probably been added to the spec in some 4.x version.
Configuration menu - View commit details
-
Copy full SHA for da27953 - Browse repository at this point
Copy the full SHA da27953View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81a57ab - Browse repository at this point
Copy the full SHA 81a57abView commit details -
Subsonic: Enable use of bookmarks also with podcast episodes
Note: This change required incompatible changes on the database table `oc_music_bookmarks`. Hence, all previous bookmarks need to be dropped when updating the application.
Configuration menu - View commit details
-
Copy full SHA for 426725b - Browse repository at this point
Copy the full SHA 426725bView commit details
Commits on Aug 8, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 9814c8a - Browse repository at this point
Copy the full SHA 9814c8aView commit details -
Subsonic: Include properties
suffix
andbitRate
on podcast episodesThese pieces of information are not directly available in the RSS feed but they can usually be evaluated from the available information. The major motivator for this improvement was that the Jamstash client depends on the `suffix` field to be able to play the episode at all. Also, Ultrasonic client showed an ugly looking "-1 kbps" on each episode while there was no bitRate available.
Configuration menu - View commit details
-
Copy full SHA for 5eb2d31 - Browse repository at this point
Copy the full SHA 5eb2d31View commit details -
Add command
occ music:podcast-update
The command may be used to refresh podcasts of one or several users from their respective sources.
Configuration menu - View commit details
-
Copy full SHA for 3536c92 - Browse repository at this point
Copy the full SHA 3536c92View commit details -
Option to
podcast-update
to only target channels not recently checkedGiving the option `--older-than=<HOURS>` for `occ music:podcast-update` has the effect of skipping all channels which have been checked for updates within the last <HOURS> hours. The <HOURS> may be a floating point value, allowing sub-hour resolution.
Configuration menu - View commit details
-
Copy full SHA for fb8d759 - Browse repository at this point
Copy the full SHA fb8d759View commit details -
- Null-coalescing operator doesn't work with method calls, we would need the null-safe operator ?-> but that comes only with PHP8.0 - Parameter default value was forgotten from PodcastService::updateAllChannels - Added more type declarations to CoverHelper and removed the type-hinting from the method ::getHashKey as that confused Scrutinizer (the tool assumed that type-hinting is somehow enforced, and the `else` branch on argument type checking would be dead code)
Configuration menu - View commit details
-
Copy full SHA for 3917cde - Browse repository at this point
Copy the full SHA 3917cdeView commit details -
Check podcast channels for updates in the background job
By default, each channel is checked for updates every 24 hours. This interval may be altered by setting another value in config.php with the key `music.podcast_auto_update_interval`. The automatic checking may also be disabled altogether by setting a negative value for the previously mentioned key.
Configuration menu - View commit details
-
Copy full SHA for 37128be - Browse repository at this point
Copy the full SHA 37128beView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4795642 - Browse repository at this point
Copy the full SHA 4795642View commit details
Commits on Aug 13, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 066f777 - Browse repository at this point
Copy the full SHA 066f777View commit details
Commits on Aug 14, 2021
-
Extract a reusable directive
collapsible-html
This same piece of logic, truncating a long HTML description and expanding it on click, was repeated three times in the various details templates. Now it is a reusable directive which opens the road to apply it also on the podcast descriptions (which is not done yet).
Configuration menu - View commit details
-
Copy full SHA for 3a9a52d - Browse repository at this point
Copy the full SHA 3a9a52dView commit details -
Truncate long podcast descriptions by default
The full description may be viewed by clicking the truncated description.
Configuration menu - View commit details
-
Copy full SHA for 30025c6 - Browse repository at this point
Copy the full SHA 30025c6View commit details -
Add option
--force
for the commandocc music:podcast-update
The option may be give to force the updating of the episodes of all the targeted podcast channels, even when the podcast feed has not changed at all since the previous update. This may be desirable during the development when the parsing of the feed is changed by any means. It might be useful for the end-user, too, in case the database update somehow got unexpectedly aborted during the previous attempt.
Configuration menu - View commit details
-
Copy full SHA for b0b11f0 - Browse repository at this point
Copy the full SHA b0b11f0View commit details -
Show episode (and season) number on the podcast episodes
- Extract also the season number from the podcast feed if available - The episode number is shown in the Podcasts view for each episode where available. If there is also a season number, the episode number is prefixed with it like "season-episode", e.g. "3-14.". - Sometimes also the title field in the RSS field contains the episode numbers. If the same number is present separately and as part of the title, then attempt to strip it off the title. - The season number was added to the episode details pane, too - The episode number was added to the Subsonic responses as property `track`. According to the Subsonic XML schema, the podcast episodes may contain all the same properties as the "normal" audio tracks. However, the tested clients (DSub and Ultrasonic) didn't seem to show the `track` property on episodes.
Configuration menu - View commit details
-
Copy full SHA for 0767244 - Browse repository at this point
Copy the full SHA 0767244View commit details -
Add podcast episodes to DB in chronological order
When subscribing to a podcast channel, add the available episodes to the DB in reverse order compared to the order of the RSS feed. Typically, the most recent episode is the first in the list, so this means adding the episodes from oldest to newest. Then, when new episodes are published, they will obviously be added after the first patch of the episodes, maintaining the same "oldest to newest" logic. Then, when returning the episodes through the REST API, the list is reversed once more to get the newest episodes first.
Configuration menu - View commit details
-
Copy full SHA for d2c9c47 - Browse repository at this point
Copy the full SHA d2c9c47View commit details -
Fix play icon not showing on playing podcast episode after 066f777
The play (or pause) icon was not shown in the episode list on the Podcasts view in front of the currently playing (or paused) episode.
Configuration menu - View commit details
-
Copy full SHA for d8f3509 - Browse repository at this point
Copy the full SHA d8f3509View commit details -
Fix quite a few DB columns in podcast tables being accidentally "not …
…null" Many columns were accidentally marked as "not null" although they may quite well be missing in the RSS feed. This didn't break the application because the implementation details in the BusinessLayer were such that empty strings got stored instead of null values.
Configuration menu - View commit details
-
Copy full SHA for 77b4414 - Browse repository at this point
Copy the full SHA 77b4414View commit details -
Fix some issues detected by Scrutinizer
The`occ music:podcast-add` was actually totally broken because of a copy-paste error.
Configuration menu - View commit details
-
Copy full SHA for 289482e - Browse repository at this point
Copy the full SHA 289482eView commit details
Commits on Aug 15, 2021
-
Enable playing all podcasts with the play icon on navigation pane
This is probably rarely useful but should be there for consistency of the UX with all the other views.
Configuration menu - View commit details
-
Copy full SHA for 79ed12e - Browse repository at this point
Copy the full SHA 79ed12eView commit details -
When playing a whole podcast channel, enqueue the episodes chronologi…
…cally When clicking the title or image of a podcast channel, the contained episodes are now enqueue to the play queue in chronological order. That is, they are played from bottom to top.
Configuration menu - View commit details
-
Copy full SHA for fcfa7e8 - Browse repository at this point
Copy the full SHA fcfa7e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 100fb85 - Browse repository at this point
Copy the full SHA 100fb85View commit details -
Subsonic: Support method
getNewestPodcasts
It's not quite clear if this method should return the episodes according to their original publish dates or by the order in which they have been added to the database. Now it's doing the latter which was a bit easier to achieve. The Subsonic API version has been bumbed to 1.13.0 to advertise the availability of this method; at least DSub uses only methods belonging to the claimed API version. The other new methods from v1.12.0 and 1.13.0 are `getTopSongs`, `getPlayQueue`, and `savePlayQueue`, which have been stubbed for now.
Configuration menu - View commit details
-
Copy full SHA for 8c58bb7 - Browse repository at this point
Copy the full SHA 8c58bb7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 506fb18 - Browse repository at this point
Copy the full SHA 506fb18View commit details -
Configuration menu - View commit details
-
Copy full SHA for bd5aec3 - Browse repository at this point
Copy the full SHA bd5aec3View commit details -
Fix potential mix-up on the web UI between track and podcast episode IDs
There's no technical reason, why there couldn't be collisions between track IDs and podcast episode IDs. This has to be taken into account when evaluating if a track should be visualized as the "current track" or not.
Configuration menu - View commit details
-
Copy full SHA for 90f87c0 - Browse repository at this point
Copy the full SHA 90f87c0View commit details
Commits on Aug 16, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 33d4151 - Browse repository at this point
Copy the full SHA 33d4151View commit details
Commits on Aug 17, 2021
-
Fix the layout of the podcast channel actions menu on ownCloud
NC core provides suitable styling for this but OC core does not. Hence, we need to define the style on our own. The correct kind of styling already existed in style-navigation.css but that was applied only within the actions menu. These style definitions were now moved to their own file style-actions-menu.css, and they were made to apply both on the navigation pane and elsewhere within the Music app.
Configuration menu - View commit details
-
Copy full SHA for 9734d10 - Browse repository at this point
Copy the full SHA 9734d10View commit details -
Prevent clicking of "Reload channels" when it's disabled
Previously, while there were no podcast channels, the actions menu item "Reload channels" only appeared disabled but it could actually be clicked. This triggered a toast with text "All channels were already up-to-date".
Configuration menu - View commit details
-
Copy full SHA for fd18a42 - Browse repository at this point
Copy the full SHA fd18a42View commit details -
Add loading spinner to the podcast details pane
Shown while waiting for the contents for the pane.
Configuration menu - View commit details
-
Copy full SHA for adbd252 - Browse repository at this point
Copy the full SHA adbd252View commit details -
Fix flickering on the details pane
When the details pane (for any content type) was closed and then opened again for any content type requiring closing, there was a flicker when the previous content was visible on the screen for a fraction of a second before being replaced by the loading spinner. This was visible at least when opening details pane for a podcast channel/episode, a track, or an album.
Configuration menu - View commit details
-
Copy full SHA for 1db3523 - Browse repository at this point
Copy the full SHA 1db3523View commit details
Commits on Aug 18, 2021
-
When updating/deleting a channel, show a load spinner next to its title
Also, when creating the first channel, there is now a loading spinner shown in the view. To facilitate all this, all methods of PodcastService were modified to return promises. This replaced signaling via $rootScope.$emit which was really designed only to be used when triggering operations from the navigation pane actions menu.
Configuration menu - View commit details
-
Copy full SHA for 2abc0b2 - Browse repository at this point
Copy the full SHA 2abc0b2View commit details
Commits on Aug 19, 2021
-
Ampache: Use ISO 8601 format for all podcast timestamps
The same format is used also on the response of the Ampache action `handshake`. The example responses in the Ampache API documentation actually use the American format like "08/19/21 22:53 PM" but I hope that this is just an error in the spec and/or in Ampache SW since using ambiguous format like that in any API makes no sense.
Configuration menu - View commit details
-
Copy full SHA for baf035a - Browse repository at this point
Copy the full SHA baf035aView commit details -
Extract and store lastBuildDate from podcasts after all
This timestamp is part of the specified Ampache podcast responses so we need it after all. It is now also included in the channel details shown on the web UI. This field is still excluded when judging if the RSS feed has actually changed after the previous podcast update (because on some channels, the lastBuildDate changes very ofter without any other changes). This means that if only the lastBuildDate is updated in the feed, then the user will not see this even with manual update from the UI.
Configuration menu - View commit details
-
Copy full SHA for ba6bd9f - Browse repository at this point
Copy the full SHA ba6bd9fView commit details -
Better handling for
occ music:podcast-update --force
The `--force` flag now forces an update also on the data stored in the oc_music_podcast_channels table. Previously, the forcing was applied only on the episodes table.
Configuration menu - View commit details
-
Copy full SHA for a609d5a - Browse repository at this point
Copy the full SHA a609d5aView commit details
Commits on Aug 20, 2021
-
Update changelog and a workaround for a Scrutinizer issue
Scrutinizer doesn't know that object of type SimpleXMLElement may be evaluated as false, hence claim that the argument could be actually null.
Configuration menu - View commit details
-
Copy full SHA for df86c04 - Browse repository at this point
Copy the full SHA df86c04View commit details -
Ampache: Support podcasts on the method
get_art
The support was almost there, but enabling it for this content type had been forgotten previously.
Configuration menu - View commit details
-
Copy full SHA for aa174fe - Browse repository at this point
Copy the full SHA aa174feView commit details