1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-05 19:41:55 +02:00

Fix podcast global sync link (fix #1068)

This commit is contained in:
Afterster 2015-12-23 19:56:28 +01:00
parent 7d3c2354b4
commit 47a2c7a73d
4 changed files with 15 additions and 7 deletions

View file

@ -30,16 +30,24 @@ if (!defined('AJAX_INCLUDE')) {
switch ($_REQUEST['action']) {
case 'sync':
if (!Access::check('interface','75')) {
debug_event('DENIED', $GLOBALS['user']->username . ' attempted to sync podcast', '1');
debug_event('DENIED', $GLOBALS['user']->username . ' attempted to sync podcast', 1);
exit;
}
if (isset($_REQUEST['podcast_id'])) {
$podcast = new Podcast($_REQUEST['podcast_id']);
$podcast->sync_episodes(true);
if ($podcast->id) {
$podcast->sync_episodes(true);
} else {
debug_event('podcast', 'Cannot found podcast', 1);
}
} elseif (isset($_REQUEST['podcast_episode_id'])) {
$episode = new Podcast_Episode($_REQUEST['podcast_episode_id']);
$episode->gather();
if ($episode->id) {
$episode->gather();
} else {
debug_event('podcast', 'Cannot found podcast episode', 1);
}
}
$results['rfc3514'] = '0x1';
break;