Skip to content

Commit

Permalink
Thumbnail issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhikachhawa24 committed May 30, 2024
1 parent 134a13b commit 30eb515
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/app/pages/mypitara/mypitara.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ export class MyPitaraPage implements OnTabViewWillEnter{
this.contentList = result;
this.contentList.forEach((ele: any) => {
if (ele.metaData.mimetype === PlayerType.YOUTUBE) {
ele.metaData['thumbnail'] = this.loadYoutubeImg(ele.metaData)
// ele.metaData['thumbnail'] = this.loadYoutubeImg(ele.metaData.thumbnail)
ele.metaData['thumbnail'] = ele.metaData.thumbnail;
} else {
ele.metaData['thumbnail'] = (ele.metaData.thumbnail && !ele?.metaData.identifier?.startsWith('do_')) ? ele.metaData.thumbnail : ContentUtil.getImagePath(ele.metaData.mimeType || ele.metaData.mimetype)
}
})
console.log('contentList', this.contentList);
}).catch((err) => {
console.log('error', err)
}).catch((err) => {
console.log('error', err)
})
}

Expand Down
5 changes: 3 additions & 2 deletions src/app/pages/view-all/view-all.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ export class ViewAllPage implements OnInit {
getContentImgPath(contents: Array<any>, isSelected?: boolean) : Array<any>{
contents.forEach((ele) => {
if (ele.metaData.mimetype === PlayerType.YOUTUBE) {
ele.metaData['thumbnail'] = this.loadYoutubeImg(ele.metaData.thumbnail);
// ele.metaData['thumbnail'] = this.loadYoutubeImg(ele.metaData.thumbnail)
ele.metaData['thumbnail'] = ele.metaData.thumbnail;
} else {
ele.metaData['thumbnail'] = (ele.metaData.thumbnail && !ele?.metaData.identifier?.startsWith('do_')) ? ele.mediaData.thumbnail : ContentUtil.getImagePath(ele.metaData.mimetype || ele.metaData.mimeType)
}
Expand Down Expand Up @@ -341,7 +342,7 @@ export class ViewAllPage implements OnInit {
metaData: {
identifier: content?.identifier,
name: content?.name,
thumbnail: content?.posterImage,
thumbnail: content?.thumbnail,
description: content?.name,
mimetype: content?.mimetype || content?.mimeType,
url: content?.streamingUrl,
Expand Down

0 comments on commit 30eb515

Please sign in to comment.