Plugin Directory

Changeset 3190792


Ignore:
Timestamp:
11/17/2024 09:35:52 PM (16 months ago)
Author:
eteubert
Message:

Update to version 4.1.22 from GitHub

Location:
podlove-podcasting-plugin-for-wordpress
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • podlove-podcasting-plugin-for-wordpress/tags/4.1.22/lib/feeds/base.php

    r3188654 r3190792  
    173173            );
    174174        } else {
    175             if ($categories[$category_id]) {
     175            if (isset($categories[$category_id])) {
    176176                $category_html .= sprintf(
    177177                    '<itunes:category text="%s"><itunes:category text="%s"></itunes:category></itunes:category>%s',
  • podlove-podcasting-plugin-for-wordpress/tags/4.1.22/lib/modules/transcripts/renderer.php

    r3133408 r3190792  
    101101        }
    102102
    103         $transcript = Transcript::get_transcript($this->episode->id);
    104         $transcript = array_map(function ($t) use ($contributors_map) {
    105             if (!$t->voice) {
    106                 return null;
     103        $pretty_voice = function ($voice) use ($contributors_map) {
     104            $contributor = $contributors_map[$voice];
     105            $voice_title = ($contributor && $contributor->getName()) ? $contributor->getName() : $voice;
     106
     107            if ($voice_title) {
     108                return "<v {$voice_title}>";
    107109            }
    108110
    109             $contributor = $contributors_map[$t->voice];
    110 
    111             if (!$contributor) {
    112                 return null;
     111            if ($voice) {
     112                return "<v {$voice}>";
    113113            }
    114114
    115             $voice_title = ($contributor && $contributor->getName()) ? $contributor->getName() : $t->voice;
    116             $voice = $t->voice ? "<v {$voice_title}>" : '';
     115            return '';
     116        };
    117117
    118             return sprintf(
    119                 "%s --> %s\n%s%s",
    120                 self::format_time($t->start),
    121                 self::format_time($t->end),
    122                 $voice,
    123                 $t->content
    124             );
    125         }, $transcript);
     118        $transcript = array_map(fn ($entry) => sprintf(
     119            "%s --> %s\n%s%s",
     120            $entry['start'],
     121            $entry['end'],
     122            $pretty_voice($entry['voice']),
     123            $entry['text']
     124        ), $this->get_data());
    126125
    127126        $transcript = array_filter($transcript);
  • podlove-podcasting-plugin-for-wordpress/tags/4.1.22/lib/modules/transcripts/rest_api.php

    r2987303 r3190792  
    77use Podlove\Modules\Transcripts\Model\Transcript;
    88use Podlove\Modules\Transcripts\Model\VoiceAssignment;
    9 use WP_REST_Controller;
    10 use WP_REST_Server;
    119
    1210class REST_API
     
    9290}
    9391
    94 class WP_REST_PodloveTranscripts_Controller extends WP_REST_Controller
     92class WP_REST_PodloveTranscripts_Controller extends \WP_REST_Controller
    9593{
    9694    public function __construct()
     
    125123                    ]
    126124                ],
    127                 'methods' => WP_REST_Server::READABLE,
     125                'methods' => \WP_REST_Server::READABLE,
    128126                'callback' => [$this, 'get_items'],
    129127                'permission_callback' => [$this, 'get_item_permissions_check'],
     
    137135                    ]
    138136                ],
    139                 'methods' => WP_REST_Server::CREATABLE,
     137                'methods' => \WP_REST_Server::CREATABLE,
    140138                'callback' => [$this, 'create_item'],
    141139                'permission_callback' => [$this, 'create_item_permissions_check'],
     
    149147                    ]
    150148                ],
    151                 'methods' => WP_REST_Server::EDITABLE,
     149                'methods' => \WP_REST_Server::EDITABLE,
    152150                'callback' => [$this, 'update_item'],
    153151                'permission_callback' => [$this, 'update_item_permissions_check'],
    154152            ],
    155153            [
    156                 'methods' => WP_REST_Server::DELETABLE,
     154                'methods' => \WP_REST_Server::DELETABLE,
    157155                'callback' => [$this, 'delete_item'],
    158156                'permission_callback' => [$this, 'delete_item_permissions_check'],
     
    168166            ],
    169167            [
    170                 'methods' => WP_REST_Server::READABLE,
     168                'methods' => \WP_REST_Server::READABLE,
    171169                'callback' => [$this, 'get_item_voices'],
    172170                'permission_callback' => [$this, 'get_item_permissions_check'],
     
    183181                    ]
    184182                ],
    185                 'methods' => WP_REST_Server::EDITABLE,
     183                'methods' => \WP_REST_Server::EDITABLE,
    186184                'callback' => [$this, 'update_item_voices'],
    187185                'permission_callback' => [$this, 'update_item_permissions_check'],
     
    215213                    ]
    216214                ],
    217                 'methods' => WP_REST_Server::READABLE,
     215                'methods' => \WP_REST_Server::READABLE,
    218216                'callback' => [$this, 'get_item_transcripts'],
    219217                'permission_callback' => [$this, 'get_item_permissions_check'],
     
    237235                ],
    238236                'description' => __('Edit a chaption of the transcript', 'podlove-podcasting-plugin-for-wordpress'),
    239                 'methods' => WP_REST_Server::EDITABLE,
     237                'methods' => \WP_REST_Server::EDITABLE,
    240238                'callback' => [$this, 'update_item_transcripts'],
    241239                'permission_callback' => [$this, 'update_item_permissions_check'],
     
    243241            [
    244242                'description' => __('Delete a chaption of the transcript', 'podlove-podcasting-plugin-for-wordpress'),
    245                 'methods' => WP_REST_Server::DELETABLE,
     243                'methods' => \WP_REST_Server::DELETABLE,
    246244                'callback' => [$this, 'delete_item_transcripts'],
    247245                'permission_callback' => [$this, 'delete_item_permissions_check'],
     
    536534
    537535        if (isset($request['contributor_id'])) {
    538             $cid = $request['contributor_id'];
    539             $contributor = Contributor::find_by_id($cid);
    540             if (!$contributor) {
    541                 return new \Podlove\Api\Error\NotFound('not_found', 'Contributor is not found');
     536            $cid = (int) $request['contributor_id'];
     537            if ($cid > 0) {
     538                $contributor = Contributor::find_by_id($cid);
     539                if (!$contributor) {
     540                    return new \Podlove\Api\Error\NotFound('not_found', 'Contributor is not found');
     541                }
    542542            }
    543543        }
  • podlove-podcasting-plugin-for-wordpress/tags/4.1.22/podlove.php

    r3189566 r3190792  
    33 * Plugin Name: Podlove Podcast Publisher
    44 * Plugin URI:  https://podlove.org/podlove-podcast-publisher/
    5  * Version: 4.1.21
     5 * Version: 4.1.22
    66 * Requires at least: 4.9.6
    77 * Requires PHP: 8.0
  • podlove-podcasting-plugin-for-wordpress/tags/4.1.22/readme.txt

    r3189566 r3190792  
    44Tags: podlove, podcast, publishing, rss, audio
    55Tested up to: 6.7
    6 Stable tag: 4.1.21
     6Stable tag: 4.1.22
    77Requires at least: 4.9.6
    88Requires PHP: 8.0
     
    115115
    116116== Changelog ==
     117
     118= 4.1.22 =
     119
     120* fix: empty vtt transcripts (when no voices were assigned to contributors)
     121* fix: error when unsetting a transcript voice assignment
     122* fix: PHP warning while using a deprecated podcast category
    117123
    118124= 4.1.21 =
  • podlove-podcasting-plugin-for-wordpress/tags/4.1.22/vendor/composer/installed.php

    r3189566 r3190792  
    22    'root' => array(
    33        'name' => 'podlove/podcast-publisher',
    4         'pretty_version' => '4.1.21',
    5         'version' => '4.1.21.0',
    6         'reference' => 'c704fd3d2f5b9cc8967137efa5c841acfa544977',
     4        'pretty_version' => '4.1.22',
     5        'version' => '4.1.22.0',
     6        'reference' => '353fbccf5bb77d1b530ea479a51ff4d1e8f027ae',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    135135        ),
    136136        'podlove/podcast-publisher' => array(
    137             'pretty_version' => '4.1.21',
    138             'version' => '4.1.21.0',
    139             'reference' => 'c704fd3d2f5b9cc8967137efa5c841acfa544977',
     137            'pretty_version' => '4.1.22',
     138            'version' => '4.1.22.0',
     139            'reference' => '353fbccf5bb77d1b530ea479a51ff4d1e8f027ae',
    140140            'type' => 'library',
    141141            'install_path' => __DIR__ . '/../../',
  • podlove-podcasting-plugin-for-wordpress/trunk/lib/feeds/base.php

    r3188654 r3190792  
    173173            );
    174174        } else {
    175             if ($categories[$category_id]) {
     175            if (isset($categories[$category_id])) {
    176176                $category_html .= sprintf(
    177177                    '<itunes:category text="%s"><itunes:category text="%s"></itunes:category></itunes:category>%s',
  • podlove-podcasting-plugin-for-wordpress/trunk/lib/modules/transcripts/renderer.php

    r3133408 r3190792  
    101101        }
    102102
    103         $transcript = Transcript::get_transcript($this->episode->id);
    104         $transcript = array_map(function ($t) use ($contributors_map) {
    105             if (!$t->voice) {
    106                 return null;
     103        $pretty_voice = function ($voice) use ($contributors_map) {
     104            $contributor = $contributors_map[$voice];
     105            $voice_title = ($contributor && $contributor->getName()) ? $contributor->getName() : $voice;
     106
     107            if ($voice_title) {
     108                return "<v {$voice_title}>";
    107109            }
    108110
    109             $contributor = $contributors_map[$t->voice];
    110 
    111             if (!$contributor) {
    112                 return null;
     111            if ($voice) {
     112                return "<v {$voice}>";
    113113            }
    114114
    115             $voice_title = ($contributor && $contributor->getName()) ? $contributor->getName() : $t->voice;
    116             $voice = $t->voice ? "<v {$voice_title}>" : '';
     115            return '';
     116        };
    117117
    118             return sprintf(
    119                 "%s --> %s\n%s%s",
    120                 self::format_time($t->start),
    121                 self::format_time($t->end),
    122                 $voice,
    123                 $t->content
    124             );
    125         }, $transcript);
     118        $transcript = array_map(fn ($entry) => sprintf(
     119            "%s --> %s\n%s%s",
     120            $entry['start'],
     121            $entry['end'],
     122            $pretty_voice($entry['voice']),
     123            $entry['text']
     124        ), $this->get_data());
    126125
    127126        $transcript = array_filter($transcript);
  • podlove-podcasting-plugin-for-wordpress/trunk/lib/modules/transcripts/rest_api.php

    r2987303 r3190792  
    77use Podlove\Modules\Transcripts\Model\Transcript;
    88use Podlove\Modules\Transcripts\Model\VoiceAssignment;
    9 use WP_REST_Controller;
    10 use WP_REST_Server;
    119
    1210class REST_API
     
    9290}
    9391
    94 class WP_REST_PodloveTranscripts_Controller extends WP_REST_Controller
     92class WP_REST_PodloveTranscripts_Controller extends \WP_REST_Controller
    9593{
    9694    public function __construct()
     
    125123                    ]
    126124                ],
    127                 'methods' => WP_REST_Server::READABLE,
     125                'methods' => \WP_REST_Server::READABLE,
    128126                'callback' => [$this, 'get_items'],
    129127                'permission_callback' => [$this, 'get_item_permissions_check'],
     
    137135                    ]
    138136                ],
    139                 'methods' => WP_REST_Server::CREATABLE,
     137                'methods' => \WP_REST_Server::CREATABLE,
    140138                'callback' => [$this, 'create_item'],
    141139                'permission_callback' => [$this, 'create_item_permissions_check'],
     
    149147                    ]
    150148                ],
    151                 'methods' => WP_REST_Server::EDITABLE,
     149                'methods' => \WP_REST_Server::EDITABLE,
    152150                'callback' => [$this, 'update_item'],
    153151                'permission_callback' => [$this, 'update_item_permissions_check'],
    154152            ],
    155153            [
    156                 'methods' => WP_REST_Server::DELETABLE,
     154                'methods' => \WP_REST_Server::DELETABLE,
    157155                'callback' => [$this, 'delete_item'],
    158156                'permission_callback' => [$this, 'delete_item_permissions_check'],
     
    168166            ],
    169167            [
    170                 'methods' => WP_REST_Server::READABLE,
     168                'methods' => \WP_REST_Server::READABLE,
    171169                'callback' => [$this, 'get_item_voices'],
    172170                'permission_callback' => [$this, 'get_item_permissions_check'],
     
    183181                    ]
    184182                ],
    185                 'methods' => WP_REST_Server::EDITABLE,
     183                'methods' => \WP_REST_Server::EDITABLE,
    186184                'callback' => [$this, 'update_item_voices'],
    187185                'permission_callback' => [$this, 'update_item_permissions_check'],
     
    215213                    ]
    216214                ],
    217                 'methods' => WP_REST_Server::READABLE,
     215                'methods' => \WP_REST_Server::READABLE,
    218216                'callback' => [$this, 'get_item_transcripts'],
    219217                'permission_callback' => [$this, 'get_item_permissions_check'],
     
    237235                ],
    238236                'description' => __('Edit a chaption of the transcript', 'podlove-podcasting-plugin-for-wordpress'),
    239                 'methods' => WP_REST_Server::EDITABLE,
     237                'methods' => \WP_REST_Server::EDITABLE,
    240238                'callback' => [$this, 'update_item_transcripts'],
    241239                'permission_callback' => [$this, 'update_item_permissions_check'],
     
    243241            [
    244242                'description' => __('Delete a chaption of the transcript', 'podlove-podcasting-plugin-for-wordpress'),
    245                 'methods' => WP_REST_Server::DELETABLE,
     243                'methods' => \WP_REST_Server::DELETABLE,
    246244                'callback' => [$this, 'delete_item_transcripts'],
    247245                'permission_callback' => [$this, 'delete_item_permissions_check'],
     
    536534
    537535        if (isset($request['contributor_id'])) {
    538             $cid = $request['contributor_id'];
    539             $contributor = Contributor::find_by_id($cid);
    540             if (!$contributor) {
    541                 return new \Podlove\Api\Error\NotFound('not_found', 'Contributor is not found');
     536            $cid = (int) $request['contributor_id'];
     537            if ($cid > 0) {
     538                $contributor = Contributor::find_by_id($cid);
     539                if (!$contributor) {
     540                    return new \Podlove\Api\Error\NotFound('not_found', 'Contributor is not found');
     541                }
    542542            }
    543543        }
  • podlove-podcasting-plugin-for-wordpress/trunk/podlove.php

    r3189566 r3190792  
    33 * Plugin Name: Podlove Podcast Publisher
    44 * Plugin URI:  https://podlove.org/podlove-podcast-publisher/
    5  * Version: 4.1.21
     5 * Version: 4.1.22
    66 * Requires at least: 4.9.6
    77 * Requires PHP: 8.0
  • podlove-podcasting-plugin-for-wordpress/trunk/readme.txt

    r3189566 r3190792  
    44Tags: podlove, podcast, publishing, rss, audio
    55Tested up to: 6.7
    6 Stable tag: 4.1.21
     6Stable tag: 4.1.22
    77Requires at least: 4.9.6
    88Requires PHP: 8.0
     
    115115
    116116== Changelog ==
     117
     118= 4.1.22 =
     119
     120* fix: empty vtt transcripts (when no voices were assigned to contributors)
     121* fix: error when unsetting a transcript voice assignment
     122* fix: PHP warning while using a deprecated podcast category
    117123
    118124= 4.1.21 =
  • podlove-podcasting-plugin-for-wordpress/trunk/vendor/composer/installed.php

    r3189566 r3190792  
    22    'root' => array(
    33        'name' => 'podlove/podcast-publisher',
    4         'pretty_version' => '4.1.21',
    5         'version' => '4.1.21.0',
    6         'reference' => 'c704fd3d2f5b9cc8967137efa5c841acfa544977',
     4        'pretty_version' => '4.1.22',
     5        'version' => '4.1.22.0',
     6        'reference' => '353fbccf5bb77d1b530ea479a51ff4d1e8f027ae',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    135135        ),
    136136        'podlove/podcast-publisher' => array(
    137             'pretty_version' => '4.1.21',
    138             'version' => '4.1.21.0',
    139             'reference' => 'c704fd3d2f5b9cc8967137efa5c841acfa544977',
     137            'pretty_version' => '4.1.22',
     138            'version' => '4.1.22.0',
     139            'reference' => '353fbccf5bb77d1b530ea479a51ff4d1e8f027ae',
    140140            'type' => 'library',
    141141            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.