Changeset 3190792
- Timestamp:
- 11/17/2024 09:35:52 PM (16 months ago)
- Location:
- podlove-podcasting-plugin-for-wordpress
- Files:
-
- 12 edited
- 1 copied
-
tags/4.1.22 (copied) (copied from podlove-podcasting-plugin-for-wordpress/trunk)
-
tags/4.1.22/lib/feeds/base.php (modified) (1 diff)
-
tags/4.1.22/lib/modules/transcripts/renderer.php (modified) (1 diff)
-
tags/4.1.22/lib/modules/transcripts/rest_api.php (modified) (11 diffs)
-
tags/4.1.22/podlove.php (modified) (1 diff)
-
tags/4.1.22/readme.txt (modified) (2 diffs)
-
tags/4.1.22/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/lib/feeds/base.php (modified) (1 diff)
-
trunk/lib/modules/transcripts/renderer.php (modified) (1 diff)
-
trunk/lib/modules/transcripts/rest_api.php (modified) (11 diffs)
-
trunk/podlove.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
podlove-podcasting-plugin-for-wordpress/tags/4.1.22/lib/feeds/base.php
r3188654 r3190792 173 173 ); 174 174 } else { 175 if ( $categories[$category_id]) {175 if (isset($categories[$category_id])) { 176 176 $category_html .= sprintf( 177 177 '<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 101 101 } 102 102 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}>"; 107 109 } 108 110 109 $contributor = $contributors_map[$t->voice]; 110 111 if (!$contributor) { 112 return null; 111 if ($voice) { 112 return "<v {$voice}>"; 113 113 } 114 114 115 $voice_title = ($contributor && $contributor->getName()) ? $contributor->getName() : $t->voice;116 $voice = $t->voice ? "<v {$voice_title}>" : '';115 return ''; 116 }; 117 117 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()); 126 125 127 126 $transcript = array_filter($transcript); -
podlove-podcasting-plugin-for-wordpress/tags/4.1.22/lib/modules/transcripts/rest_api.php
r2987303 r3190792 7 7 use Podlove\Modules\Transcripts\Model\Transcript; 8 8 use Podlove\Modules\Transcripts\Model\VoiceAssignment; 9 use WP_REST_Controller;10 use WP_REST_Server;11 9 12 10 class REST_API … … 92 90 } 93 91 94 class WP_REST_PodloveTranscripts_Controller extends WP_REST_Controller92 class WP_REST_PodloveTranscripts_Controller extends \WP_REST_Controller 95 93 { 96 94 public function __construct() … … 125 123 ] 126 124 ], 127 'methods' => WP_REST_Server::READABLE,125 'methods' => \WP_REST_Server::READABLE, 128 126 'callback' => [$this, 'get_items'], 129 127 'permission_callback' => [$this, 'get_item_permissions_check'], … … 137 135 ] 138 136 ], 139 'methods' => WP_REST_Server::CREATABLE,137 'methods' => \WP_REST_Server::CREATABLE, 140 138 'callback' => [$this, 'create_item'], 141 139 'permission_callback' => [$this, 'create_item_permissions_check'], … … 149 147 ] 150 148 ], 151 'methods' => WP_REST_Server::EDITABLE,149 'methods' => \WP_REST_Server::EDITABLE, 152 150 'callback' => [$this, 'update_item'], 153 151 'permission_callback' => [$this, 'update_item_permissions_check'], 154 152 ], 155 153 [ 156 'methods' => WP_REST_Server::DELETABLE,154 'methods' => \WP_REST_Server::DELETABLE, 157 155 'callback' => [$this, 'delete_item'], 158 156 'permission_callback' => [$this, 'delete_item_permissions_check'], … … 168 166 ], 169 167 [ 170 'methods' => WP_REST_Server::READABLE,168 'methods' => \WP_REST_Server::READABLE, 171 169 'callback' => [$this, 'get_item_voices'], 172 170 'permission_callback' => [$this, 'get_item_permissions_check'], … … 183 181 ] 184 182 ], 185 'methods' => WP_REST_Server::EDITABLE,183 'methods' => \WP_REST_Server::EDITABLE, 186 184 'callback' => [$this, 'update_item_voices'], 187 185 'permission_callback' => [$this, 'update_item_permissions_check'], … … 215 213 ] 216 214 ], 217 'methods' => WP_REST_Server::READABLE,215 'methods' => \WP_REST_Server::READABLE, 218 216 'callback' => [$this, 'get_item_transcripts'], 219 217 'permission_callback' => [$this, 'get_item_permissions_check'], … … 237 235 ], 238 236 'description' => __('Edit a chaption of the transcript', 'podlove-podcasting-plugin-for-wordpress'), 239 'methods' => WP_REST_Server::EDITABLE,237 'methods' => \WP_REST_Server::EDITABLE, 240 238 'callback' => [$this, 'update_item_transcripts'], 241 239 'permission_callback' => [$this, 'update_item_permissions_check'], … … 243 241 [ 244 242 'description' => __('Delete a chaption of the transcript', 'podlove-podcasting-plugin-for-wordpress'), 245 'methods' => WP_REST_Server::DELETABLE,243 'methods' => \WP_REST_Server::DELETABLE, 246 244 'callback' => [$this, 'delete_item_transcripts'], 247 245 'permission_callback' => [$this, 'delete_item_permissions_check'], … … 536 534 537 535 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 } 542 542 } 543 543 } -
podlove-podcasting-plugin-for-wordpress/tags/4.1.22/podlove.php
r3189566 r3190792 3 3 * Plugin Name: Podlove Podcast Publisher 4 4 * Plugin URI: https://podlove.org/podlove-podcast-publisher/ 5 * Version: 4.1.2 15 * Version: 4.1.22 6 6 * Requires at least: 4.9.6 7 7 * Requires PHP: 8.0 -
podlove-podcasting-plugin-for-wordpress/tags/4.1.22/readme.txt
r3189566 r3190792 4 4 Tags: podlove, podcast, publishing, rss, audio 5 5 Tested up to: 6.7 6 Stable tag: 4.1.2 16 Stable tag: 4.1.22 7 7 Requires at least: 4.9.6 8 8 Requires PHP: 8.0 … … 115 115 116 116 == 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 117 123 118 124 = 4.1.21 = -
podlove-podcasting-plugin-for-wordpress/tags/4.1.22/vendor/composer/installed.php
r3189566 r3190792 2 2 'root' => array( 3 3 'name' => 'podlove/podcast-publisher', 4 'pretty_version' => '4.1.2 1',5 'version' => '4.1.2 1.0',6 'reference' => ' c704fd3d2f5b9cc8967137efa5c841acfa544977',4 'pretty_version' => '4.1.22', 5 'version' => '4.1.22.0', 6 'reference' => '353fbccf5bb77d1b530ea479a51ff4d1e8f027ae', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 135 135 ), 136 136 'podlove/podcast-publisher' => array( 137 'pretty_version' => '4.1.2 1',138 'version' => '4.1.2 1.0',139 'reference' => ' c704fd3d2f5b9cc8967137efa5c841acfa544977',137 'pretty_version' => '4.1.22', 138 'version' => '4.1.22.0', 139 'reference' => '353fbccf5bb77d1b530ea479a51ff4d1e8f027ae', 140 140 'type' => 'library', 141 141 'install_path' => __DIR__ . '/../../', -
podlove-podcasting-plugin-for-wordpress/trunk/lib/feeds/base.php
r3188654 r3190792 173 173 ); 174 174 } else { 175 if ( $categories[$category_id]) {175 if (isset($categories[$category_id])) { 176 176 $category_html .= sprintf( 177 177 '<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 101 101 } 102 102 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}>"; 107 109 } 108 110 109 $contributor = $contributors_map[$t->voice]; 110 111 if (!$contributor) { 112 return null; 111 if ($voice) { 112 return "<v {$voice}>"; 113 113 } 114 114 115 $voice_title = ($contributor && $contributor->getName()) ? $contributor->getName() : $t->voice;116 $voice = $t->voice ? "<v {$voice_title}>" : '';115 return ''; 116 }; 117 117 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()); 126 125 127 126 $transcript = array_filter($transcript); -
podlove-podcasting-plugin-for-wordpress/trunk/lib/modules/transcripts/rest_api.php
r2987303 r3190792 7 7 use Podlove\Modules\Transcripts\Model\Transcript; 8 8 use Podlove\Modules\Transcripts\Model\VoiceAssignment; 9 use WP_REST_Controller;10 use WP_REST_Server;11 9 12 10 class REST_API … … 92 90 } 93 91 94 class WP_REST_PodloveTranscripts_Controller extends WP_REST_Controller92 class WP_REST_PodloveTranscripts_Controller extends \WP_REST_Controller 95 93 { 96 94 public function __construct() … … 125 123 ] 126 124 ], 127 'methods' => WP_REST_Server::READABLE,125 'methods' => \WP_REST_Server::READABLE, 128 126 'callback' => [$this, 'get_items'], 129 127 'permission_callback' => [$this, 'get_item_permissions_check'], … … 137 135 ] 138 136 ], 139 'methods' => WP_REST_Server::CREATABLE,137 'methods' => \WP_REST_Server::CREATABLE, 140 138 'callback' => [$this, 'create_item'], 141 139 'permission_callback' => [$this, 'create_item_permissions_check'], … … 149 147 ] 150 148 ], 151 'methods' => WP_REST_Server::EDITABLE,149 'methods' => \WP_REST_Server::EDITABLE, 152 150 'callback' => [$this, 'update_item'], 153 151 'permission_callback' => [$this, 'update_item_permissions_check'], 154 152 ], 155 153 [ 156 'methods' => WP_REST_Server::DELETABLE,154 'methods' => \WP_REST_Server::DELETABLE, 157 155 'callback' => [$this, 'delete_item'], 158 156 'permission_callback' => [$this, 'delete_item_permissions_check'], … … 168 166 ], 169 167 [ 170 'methods' => WP_REST_Server::READABLE,168 'methods' => \WP_REST_Server::READABLE, 171 169 'callback' => [$this, 'get_item_voices'], 172 170 'permission_callback' => [$this, 'get_item_permissions_check'], … … 183 181 ] 184 182 ], 185 'methods' => WP_REST_Server::EDITABLE,183 'methods' => \WP_REST_Server::EDITABLE, 186 184 'callback' => [$this, 'update_item_voices'], 187 185 'permission_callback' => [$this, 'update_item_permissions_check'], … … 215 213 ] 216 214 ], 217 'methods' => WP_REST_Server::READABLE,215 'methods' => \WP_REST_Server::READABLE, 218 216 'callback' => [$this, 'get_item_transcripts'], 219 217 'permission_callback' => [$this, 'get_item_permissions_check'], … … 237 235 ], 238 236 'description' => __('Edit a chaption of the transcript', 'podlove-podcasting-plugin-for-wordpress'), 239 'methods' => WP_REST_Server::EDITABLE,237 'methods' => \WP_REST_Server::EDITABLE, 240 238 'callback' => [$this, 'update_item_transcripts'], 241 239 'permission_callback' => [$this, 'update_item_permissions_check'], … … 243 241 [ 244 242 'description' => __('Delete a chaption of the transcript', 'podlove-podcasting-plugin-for-wordpress'), 245 'methods' => WP_REST_Server::DELETABLE,243 'methods' => \WP_REST_Server::DELETABLE, 246 244 'callback' => [$this, 'delete_item_transcripts'], 247 245 'permission_callback' => [$this, 'delete_item_permissions_check'], … … 536 534 537 535 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 } 542 542 } 543 543 } -
podlove-podcasting-plugin-for-wordpress/trunk/podlove.php
r3189566 r3190792 3 3 * Plugin Name: Podlove Podcast Publisher 4 4 * Plugin URI: https://podlove.org/podlove-podcast-publisher/ 5 * Version: 4.1.2 15 * Version: 4.1.22 6 6 * Requires at least: 4.9.6 7 7 * Requires PHP: 8.0 -
podlove-podcasting-plugin-for-wordpress/trunk/readme.txt
r3189566 r3190792 4 4 Tags: podlove, podcast, publishing, rss, audio 5 5 Tested up to: 6.7 6 Stable tag: 4.1.2 16 Stable tag: 4.1.22 7 7 Requires at least: 4.9.6 8 8 Requires PHP: 8.0 … … 115 115 116 116 == 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 117 123 118 124 = 4.1.21 = -
podlove-podcasting-plugin-for-wordpress/trunk/vendor/composer/installed.php
r3189566 r3190792 2 2 'root' => array( 3 3 'name' => 'podlove/podcast-publisher', 4 'pretty_version' => '4.1.2 1',5 'version' => '4.1.2 1.0',6 'reference' => ' c704fd3d2f5b9cc8967137efa5c841acfa544977',4 'pretty_version' => '4.1.22', 5 'version' => '4.1.22.0', 6 'reference' => '353fbccf5bb77d1b530ea479a51ff4d1e8f027ae', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 135 135 ), 136 136 'podlove/podcast-publisher' => array( 137 'pretty_version' => '4.1.2 1',138 'version' => '4.1.2 1.0',139 'reference' => ' c704fd3d2f5b9cc8967137efa5c841acfa544977',137 'pretty_version' => '4.1.22', 138 'version' => '4.1.22.0', 139 'reference' => '353fbccf5bb77d1b530ea479a51ff4d1e8f027ae', 140 140 'type' => 'library', 141 141 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.