Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
8c98ea2d by Fatih Uzunoglu at 2026-01-08T07:02:53+00:00
qml: use player controller to probe meta data in `Player.qml`
Using playlist controller's current item is not a good idea
here because if the item is preparsed after it is read in
QML, the details are not updated since `PlaylistItem` is
a gadget and can not signal changes (and the item itself
does not change).
We can instead use player controller's meta data properties
directly, which makes more sense for the player view anyway.
- - - - -
1 changed file:
- modules/gui/qt/player/qml/Player.qml
Changes:
=====================================
modules/gui/qt/player/qml/Player.qml
=====================================
@@ -41,13 +41,13 @@ FocusScope {
readonly property int positionSliderY: controlBar.y + controlBar.sliderY
readonly property string coverSource: {
- if (MainPlaylistController.currentItem.artwork &&
- MainPlaylistController.currentItem.artwork.toString())
- MainPlaylistController.currentItem.artwork
+ if (Player.artwork &&
+ Player.artwork.toString())
+ return Player.artwork
else if (Player.hasVideoOutput)
- VLCStyle.noArtVideoCover
+ return VLCStyle.noArtVideoCover
else
- VLCStyle.noArtAlbumCover
+ return VLCStyle.noArtAlbumCover
}
// Private
@@ -482,7 +482,7 @@ FocusScope {
value: centerContent.height > (albumLabel.y +
albumLabel.height)
}
- text: MainPlaylistController.currentItem.album
+ text: Player.album
font.pixelSize: VLCStyle.fontSize_xxlarge
horizontalAlignment: Text.AlignHCenter
color: centerTheme.fg.primary
@@ -507,7 +507,7 @@ FocusScope {
value: centerContent.height > (artistLabel.y +
artistLabel.height)
}
- text: MainPlaylistController.currentItem.artist
+ text: Player.artist
font.weight: Font.Light
horizontalAlignment: Text.AlignHCenter
color: centerTheme.fg.primary
@@ -632,7 +632,7 @@ FocusScope {
resumeVisible)
focus: true
- title: MainPlaylistController.currentItem.title
+ title: Player.title
pinControls: MainCtx.pinVideoControls
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/8c98ea2d43b4f4440b3c8ed9b51744e923d7de6d
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/8c98ea2d43b4f4440b3c8ed9b51744e923d7de6d
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits