Skip to content

Commit

Permalink
Merge pull request #875 from owncloud/feature/786_podcasts
Browse files Browse the repository at this point in the history
Add podcast support
  • Loading branch information
paulijar authored Aug 20, 2021
2 parents 9c910e5 + aa174fe commit d5b8efb
Show file tree
Hide file tree
Showing 84 changed files with 5,083 additions and 744 deletions.
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ build:
analysis:
dependencies:
before:
- composer require --dev "christophwurst/nextcloud ^12.0.0"
- composer require --dev "christophwurst/nextcloud ^13.0.0"
- composer require --dev doctrine/dbal
tests:
override:
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,21 @@
### Added
- Scrolling to the album by clicking the album name or image on the album details pane
- Scrolling to the artist by clicking the artist name or image on the artist details pane
- Support for podcasts
[#875](https://github.com/owncloud/music/pull/875)
* Dedicated view on the web UI
* Check for new episodes manually or automatically on the background by schedule
* Details pane for podcast channels and episodes
* Searching/filtering in the podcasts view by channel and episode titles
* Subsonic API including methods `getPodcasts`, `getNewestPodcasts`, `refreshPodcasts`, `createPodcastChannel`, `deletePodcastChannel`
* Ampache API including methods `podcasts`, `podcast`, `podcast_create`, `podcast_delete`, `podcast_episodes`, `podcast_episode`, `update_podcast`
* `occ` commands `music:podcast-add`, `music:podcast-reset`, `music:podcast-update`

### Changed
- Show the play icon overlay on album cover also in the Albums compact layout while in search mode
- Show icon also for the playlists in the navigation pane
- Subsonic API version updated to 1.13.0
- Ampache API version updated to 4.4.0 (aka 440000)

### Fixed
- Performance problem on Subsonic actions `getAlbumList` and `getAlbumList2` with huge libraries
Expand Down
7 changes: 6 additions & 1 deletion appinfo/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@
});

/**
* register regular task
* register regular tasks
*/
\OC::$server->getJobList()->add('OC\BackgroundJob\Legacy\RegularJob', ['OCA\Music\Backgroundjob\Cleanup', 'run']);
\OC::$server->getJobList()->add('OC\BackgroundJob\Legacy\RegularJob', ['OCA\Music\Backgroundjob\PodcastUpdateCheck', 'run']);

/**
* register hooks
Expand Down Expand Up @@ -87,6 +88,10 @@ function adjustCsp(IAppContainer $container) {
$policy->addAllowedMediaDomain('blob:');
}

// Allow loading (podcast cover) images from external sources
$policy->addAllowedImageDomain('http://*:*');
$policy->addAllowedImageDomain('https://*:*');

$container->getServer()->getContentSecurityPolicyManager()->addDefaultPolicy($policy);
}
}
Expand Down
281 changes: 278 additions & 3 deletions appinfo/database.xml
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,271 @@
</declaration>
</table>

<table>
<name>*dbprefix*music_podcast_channels</name>
<declaration>
<field>
<name>id</name>
<type>integer</type>
<notnull>true</notnull>
<autoincrement>true</autoincrement>
<unsigned>true</unsigned>
<primary>true</primary>
</field>
<field>
<name>user_id</name>
<type>text</type>
<notnull>true</notnull>
<length>64</length>
</field>
<field>
<name>rss_url</name>
<type>text</type>
<notnull>true</notnull>
<length>2048</length>
</field>
<field>
<name>rss_hash</name>
<type>text</type>
<notnull>true</notnull>
<length>64</length>
</field>
<field>
<name>content_hash</name>
<type>text</type>
<notnull>true</notnull>
<length>64</length>
</field>
<field>
<name>update_checked</name>
<type>timestamp</type>
<notnull>true</notnull>
</field>
<field>
<name>published</name>
<type>timestamp</type>
<notnull>false</notnull>
</field>
<field>
<name>last_build_date</name>
<type>timestamp</type>
<notnull>false</notnull>
</field>
<field>
<name>title</name>
<type>text</type>
<notnull>false</notnull>
<length>256</length>
</field>
<field>
<name>link_url</name>
<type>text</type>
<notnull>false</notnull>
<length>2048</length>
</field>
<field>
<name>language</name>
<type>text</type>
<notnull>false</notnull>
<length>32</length>
</field>
<field>
<name>copyright</name>
<type>text</type>
<notnull>false</notnull>
<length>256</length>
</field>
<field>
<name>author</name>
<type>text</type>
<notnull>false</notnull>
<length>256</length>
</field
> <field>
<name>description</name>
<type>clob</type>
<notnull>false</notnull>
</field>
<field>
<name>image_url</name>
<type>text</type>
<notnull>false</notnull>
<length>2048</length>
</field>
<field>
<name>category</name>
<type>text</type>
<notnull>false</notnull>
<length>256</length>
</field>
<field>
<name>starred</name>
<type>timestamp</type>
<notnull>false</notnull>
</field>
<field>
<name>created</name>
<type>timestamp</type>
<notnull>false</notnull>
</field>
<field>
<name>updated</name>
<type>timestamp</type>
<notnull>false</notnull>
</field>

<index>
<name>music_podcast_channels_index</name>
<unique>true</unique>
<field>
<name>rss_hash</name>
</field>
<field>
<name>user_id</name>
</field>
</index>
</declaration>
</table>

<table>
<name>*dbprefix*music_podcast_episodes</name>
<declaration>
<field>
<name>id</name>
<type>integer</type>
<notnull>true</notnull>
<autoincrement>true</autoincrement>
<unsigned>true</unsigned>
<primary>true</primary>
</field>
<field>
<name>user_id</name>
<type>text</type>
<notnull>true</notnull>
<length>64</length>
</field>
<field>
<name>channel_id</name>
<type>integer</type>
<notnull>true</notnull>
<unsigned>true</unsigned>
</field>
<field>
<name>stream_url</name>
<type>text</type>
<notnull>false</notnull>
<length>2048</length>
</field>
<field>
<name>mimetype</name>
<type>text</type>
<notnull>false</notnull>
<length>256</length>
</field>
<field>
<name>size</name>
<type>integer</type>
<notnull>false</notnull>
</field>
<field>
<name>duration</name>
<type>integer</type>
<notnull>false</notnull>
</field>
<field>
<name>guid</name>
<type>text</type>
<notnull>true</notnull>
<length>2048</length>
</field>
<field>
<name>guid_hash</name>
<type>text</type>
<notnull>true</notnull>
<length>64</length>
</field>
<field>
<name>title</name>
<type>text</type>
<notnull>false</notnull>
<length>256</length>
</field>
<field>
<name>episode</name>
<type>integer</type>
<notnull>false</notnull>
</field>
<field>
<name>season</name>
<type>integer</type>
<notnull>false</notnull>
</field>
<field>
<name>link_url</name>
<type>text</type>
<notnull>false</notnull>
<length>2048</length>
</field>
<field>
<name>published</name>
<type>timestamp</type>
<notnull>false</notnull>
</field>
<field>
<name>keywords</name>
<type>text</type>
<notnull>false</notnull>
<length>256</length>
</field>
<field>
<name>copyright</name>
<type>text</type>
<notnull>false</notnull>
<length>256</length>
</field>
<field>
<name>author</name>
<type>text</type>
<notnull>false</notnull>
<length>256</length>
</field
> <field>
<name>description</name>
<type>clob</type>
<notnull>false</notnull>
</field>
<field>
<name>starred</name>
<type>timestamp</type>
<notnull>false</notnull>
</field>
<field>
<name>created</name>
<type>timestamp</type>
<notnull>false</notnull>
</field>
<field>
<name>updated</name>
<type>timestamp</type>
<notnull>false</notnull>
</field>

<index>
<name>music_podcast_episodes_index</name>
<unique>true</unique>
<field>
<name>guid_hash</name>
</field>
<field>
<name>channel_id</name>
</field>
<field>
<name>user_id</name>
</field>
</index>
</declaration>
</table>

<table>
<name>*dbprefix*music_ampache_sessions</name>
<declaration>
Expand Down Expand Up @@ -584,6 +849,7 @@
</index>
</declaration>
</table>

<table>
<name>*dbprefix*music_bookmarks</name>
<declaration>
Expand All @@ -602,10 +868,16 @@
<length>64</length>
</field>
<field>
<name>track_id</name>
<name>type</name>
<type>integer</type>
<notnull>true</notnull>
</field>
<field>
<name>entry_id</name>
<type>integer</type>
<notnull>true</notnull>
<comments>ID of a track or a podcast episode, depending on the column 'type'</comments>
</field>
<field>
<name>position</name>
<type>integer</type>
Expand All @@ -629,13 +901,16 @@
</field>

<index>
<name>music_bookmarks_user_track</name>
<name>music_bookmarks_index</name>
<unique>true</unique>
<field>
<name>user_id</name>
</field>
<field>
<name>track_id</name>
<name>type</name>
</field>
<field>
<name>entry_id</name>
</field>
</index>
</declaration>
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Limitations: The app can handle libraries of more than 50´000 tracks on modern
<author>Pauli Järvinen (current author)</author>
<author>Morris Jobke (original author)</author>
<author>Jan-Christoph Borchardt (original design)</author>
<version>1.2.1</version>
<version>1.3.0-alpha4</version>
<category>multimedia</category>
<screenshot>https://user-images.githubusercontent.com/8565946/107080070-6b523780-67f9-11eb-8adc-314059b04c1d.png</screenshot>
<screenshot>https://user-images.githubusercontent.com/8565946/107083303-17961d00-67fe-11eb-8b1c-5ad94b08a7bb.png</screenshot>
Expand Down
16 changes: 16 additions & 0 deletions appinfo/register_command.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,19 @@
$application->add(new OCA\Music\Command\Cleanup(
$c->query('Maintenance')
));
$application->add(new OCA\Music\Command\PodcastAdd(
$c->query('UserManager'),
$c->query('GroupManager'),
$c->query('PodcastChannelBusinessLayer'),
$c->query('PodcastEpisodeBusinessLayer')
));
$application->add(new OCA\Music\Command\PodcastReset(
$c->query('UserManager'),
$c->query('GroupManager'),
$c->query('PodcastService')
));
$application->add(new OCA\Music\Command\PodcastUpdate(
$c->query('UserManager'),
$c->query('GroupManager'),
$c->query('PodcastService')
));
Loading

0 comments on commit d5b8efb

Please sign in to comment.