Example #1
0
<?php

if (array_key_exists('populate', $_REQUEST)) {
    chdir('..');
    include "includes/vars.php";
    include "includes/functions.php";
    include "includes/podcastfunctions.php";
    include "international.php";
    $dtz = ini_get('date.timezone');
    if (!$dtz) {
        date_default_timezone_set('UTC');
    }
    if (array_key_exists('url', $_REQUEST)) {
        getNewPodcast(rawurldecode($_REQUEST['url']));
    } else {
        if (array_key_exists('refresh', $_REQUEST)) {
            refreshPodcast($_REQUEST['refresh']);
        } else {
            if (array_key_exists('remove', $_REQUEST)) {
                removePodcast($_REQUEST['remove']);
            } else {
                if (array_key_exists('listened', $_REQUEST)) {
                    markAsListened($_REQUEST['listened'], rawurldecode($_REQUEST['location']));
                } else {
                    if (array_key_exists('removetrack', $_REQUEST)) {
                        deleteTrack($_REQUEST['removetrack'], $_REQUEST['channel']);
                    } else {
                        if (array_key_exists('downloadtrack', $_REQUEST)) {
                            downloadTrack($_REQUEST['downloadtrack'], $_REQUEST['channel']);
                        } else {
                            if (array_key_exists('markaslistened', $_REQUEST)) {
Example #2
0
function refreshPodcast($name)
{
    debuglog("Refreshing podcast " . $name, "PODCASTS");
    $x = simplexml_load_file('prefs/podcasts/' . $name . '/info.xml');
    $url = $x->feedurl;
    getNewPodcast(htmlspecialchars_decode($url));
}