Skip to content

Commit

Permalink
Fixed build.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 committed Apr 28, 2024
1 parent bb0a27c commit cca6546
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/components/HiddenAudioPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ export const HiddenAudioPlayer: FC<HiddenAudioPlayerProps> = ({ refItem, setAudi
duration: e.currentTarget.duration,
percentage: 0
})

if (isNaN(e.currentTarget.duration)) {
// Need alternative method of getting duration
// Firefox doesn't load the entire file before playing
// causing a changing duration, but the onLoadedMetadata event
// is only called once rendering the progressbar useless
axios.get('/podcast/episode/' + podcastEpisode.episode_id)
axios.get('/podcast/episode/' + podcastEpisode!.episode_id)
.then((response: AxiosResponse<PodcastWatchedModel>) => {
setMetadata({
currentTime: e.currentTarget.currentTime,
Expand Down
2 changes: 2 additions & 0 deletions ui/src/models/PodcastWatchedModel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ export interface PodcastWatchedModel {
episodeId: number,
watchedTime: number,
date: String
total: number
position: number
}

0 comments on commit cca6546

Please sign in to comment.