Skip to content

Commit

Permalink
Fix thumbnail not updating in Media Library
Browse files Browse the repository at this point in the history
  • Loading branch information
donnapep committed Jun 9, 2017
1 parent 111b7d3 commit 93ac3a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions client/my-sites/media/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,19 +152,19 @@ class Media extends Component {
this.setState( { currentDetail: this.state.editedVideoItem, editedVideoItem: null } );
};

onVideoEditorUpdatePoster( { ID, poster } ) {
onVideoEditorUpdatePoster( { ID, posterUrl } ) {
const site = this.props.sites.getSelectedSite();

// Photon does not support URLs with a querystring component.
poster = poster.split( '?' )[ 0 ];
posterUrl = posterUrl && posterUrl.split( '?' )[ 0 ];

if ( site ) {
MediaActions.edit( site.ID, {
ID,
thumbnails: {
fmt_hd: poster,
fmt_dvd: poster,
fmt_std: poster,
fmt_hd: posterUrl,
fmt_dvd: posterUrl,
fmt_std: posterUrl,
}
} );
}
Expand Down
2 changes: 1 addition & 1 deletion client/post-editor/media-modal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export class EditorMediaModal extends Component {
const { site } = this.props;

// Photon does not support URLs with a querystring component.
posterUrl = posterUrl.split( '?' )[ 0 ];
posterUrl = posterUrl && posterUrl.split( '?' )[ 0 ];

if ( site ) {
MediaActions.edit( site.ID, {
Expand Down

0 comments on commit 93ac3a7

Please sign in to comment.