Rise-Software / Rise-Media-Player

One media player for everything you own or stream; whether it's music or videos, online or offline Rise Media Player does it all. And it's beautiful and native with the latest version of WinUI.
GNU General Public License v3.0
1.06k stars 76 forks source link

Switch to MediaPlaybackItem for queues and playback #198

Closed YourOrdinaryCat closed 1 year ago

YourOrdinaryCat commented 1 year ago

Resolved / Related Issues Items resolved / related issues by this PR.

Details of Changes The app currently uses the IMediaItem interface (implemented by SongViewModel and VideoViewModel) to handle media playback and information about currently playing media. However, this is problematic due to the conversions that have to happen between IMediaItem and MediaPlaybackItem to be able to start media playback. With the current architecture, any scenario where the app has to play media directly from a StorageFile (e.g drag & drop, file associations) is not possible unless the file is coming from the user's library, which isn't always the case.

Validation

Screenshots / Videos (optional) HQ thumbnails in Now Playing: image image

itsWindows11 commented 1 year ago

image

Also it should show "Unknown Artist" for unrecognized artists and hide that for videos.

itsWindows11 commented 1 year ago

Playing music then playing a video seems to crash the app with a null reference exception.

YourOrdinaryCat commented 1 year ago

Playing music then playing a video seems to crash the app with a null reference exception.

Can't reproduce here, got exception logs? Or maybe more concrete steps, just playing a song then a video works fine here.

itsWindows11 commented 1 year ago

Nevermind, fixed it myself, this PR can be merged as-is now.