Support » Plugin: Seriously Simple Podcasting » Repeating Episodes on new import

  • Resolved edumusa

    (@edumusa)


    Hello,
    great plugin, simple as it says..

    I’m running a podcast with anchor.fm, and using this plugin to import the episodes to a custom post type.
    Works fine at first, but when i post a new episode at anchor, and need to import it to my website, the feed pulls all episodes again from anchor, creating duplicated posts.
    How can i avoid that issue please?

    regards,

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Jonathan Bossenger

    (@psykro)

    Hi @edumusa

    When you import, are you using the RSS import tool to pull in the new episodes from anchor.fm?

    This tool was developed to import all episodes from a service like anchor.fm in one shot, not to update new episodes each time you release them.

    Hello,
    Thank you for the response.

    Yes, I’m using the import tool from the plugin.
    I just need it to make new imports only with episodes not yet imported.

    maybe i’ll try another method then…

    Regards

    Plugin Support Eileen Violini

    (@iviolini)

    Hello,

    As Jonathan mentioned above the RSS import feature imports all episodes and does not filter out for existing episodes. We will add this to our list of new features for consideration. Thanks for reaching out to us with your suggestion.

    Cheers!

    edumusa

    (@edumusa)

    well, i’m very glad to hear that!

    best wishes!

    Hello @edumusa ,

    I have updated the plugin to import only updated episodes, I have extend the SSP importer function for it.

    File:/seriously-simple-podcasting/php/classes/importers/class-rss-importer.php

    In line 100:
    public function import_rss_feed() {
    ….
    ….
    replace count( $this->feed_object->channel->item );
    with
    $this->podcast_count = $this->feed_podcast_count();

    }

    public function feed_podcast_count() {
    $podcast_count = count( $this->feed_object->channel->item ); // Get the count of podcast from feed
    if ( ! empty( $this->series ) ) {
    $previous_episodes = count(
    get_posts(
    [
    ‘post_type’ => $this->post_type,
    ‘post_status’ => ‘publish’,
    ‘fields’ => ‘ids’,
    ‘numberposts’ => -1,
    ‘tax_query’ => [
    [
    ‘taxonomy’ => ‘series’,
    ‘field’ => ‘id’,
    ‘terms’ => $this->series,
    ‘include_children’ => false
    ]
    ]
    ]
    )
    ); // Get the episodes count from DB.
    if( !empty($previous_episodes) ){
    if($previous_episodes < $podcast_count){
    $podcast_count = $podcast_count – $previous_episodes;
    } elseif($previous_episodes >= $podcast_count) {
    $podcast_count = 0;
    }
    }
    }
    return $podcast_count;
    }

    @iviolini , @psykro Please take a look into it’s working for me if you wanna add these feature I can commit the code.

    Plugin Author Jonathan Bossenger

    (@psykro)

    Thanks @pratikalaan

    Please feel free to open this as a pull request on our GitHub repository and well give it the proper consideration there, thanks

    https://github.com/TheCraigHewitt/Seriously-Simple-Podcasting

    Hi @psykro,

    I have created a pull request and Fixed GUID issue too.

    Plugin Author Jonathan Bossenger

    (@psykro)

    @pratikalaan thank you.

    Pull requests can take a few weeks to get reviewed and merged, so please bear with us.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.