Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
91d19753
Commit
91d19753
authored
May 14, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: update art requests to use updated API
parent
41af9ab2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
6 deletions
+26
-6
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+1
-1
modules/gui/qt4/components/playlist/vlc_model.cpp
modules/gui/qt4/components/playlist/vlc_model.cpp
+1
-1
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+5
-3
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+1
-1
src/playlist/fetcher.c
src/playlist/fetcher.c
+18
-0
No files found.
modules/gui/qt4/components/interface_widgets.cpp
View file @
91d19753
...
...
@@ -705,7 +705,7 @@ void CoverArtLabel::showArtUpdate( input_item_t *_p_item )
void
CoverArtLabel
::
askForUpdate
()
{
THEMIM
->
getIM
()
->
requestArtUpdate
(
p_item
);
THEMIM
->
getIM
()
->
requestArtUpdate
(
p_item
,
true
);
}
void
CoverArtLabel
::
setArtFromFile
()
...
...
modules/gui/qt4/components/playlist/vlc_model.cpp
View file @
91d19753
...
...
@@ -206,7 +206,7 @@ void VLCModel::ensureArtRequested( const QModelIndex &index )
{
child
=
index
.
child
(
row
,
COLUMN_COVER
);
if
(
child
.
isValid
()
&&
child
.
data
().
toString
().
isEmpty
()
)
THEMIM
->
getIM
()
->
requestArtUpdate
(
getInputItem
(
child
)
);
THEMIM
->
getIM
()
->
requestArtUpdate
(
getInputItem
(
child
)
,
false
);
}
}
}
...
...
modules/gui/qt4/input_manager.cpp
View file @
91d19753
...
...
@@ -636,7 +636,7 @@ void InputManager::UpdateCaching()
}
}
void
InputManager
::
requestArtUpdate
(
input_item_t
*
p_item
)
void
InputManager
::
requestArtUpdate
(
input_item_t
*
p_item
,
bool
b_forced
)
{
bool
b_current_item
=
false
;
if
(
!
p_item
&&
hasInput
()
)
...
...
@@ -648,13 +648,15 @@ void InputManager::requestArtUpdate( input_item_t *p_item )
if
(
p_item
)
{
/* check if it has already been enqueued */
if
(
p_item
->
p_meta
)
if
(
p_item
->
p_meta
&&
!
b_forced
)
{
int
status
=
vlc_meta_GetStatus
(
p_item
->
p_meta
);
if
(
status
&
(
ITEM_ART_NOTFOUND
|
ITEM_ART_FETCHED
)
)
return
;
}
libvlc_ArtRequest
(
p_intf
->
p_libvlc
,
p_item
,
META_REQUEST_OPTION_NONE
);
libvlc_ArtRequest
(
p_intf
->
p_libvlc
,
p_item
,
(
b_forced
)
?
META_REQUEST_OPTION_ANY
:
META_REQUEST_OPTION_NONE
);
/* No input will signal the cover art to update,
* let's do it ourself */
if
(
b_current_item
)
...
...
modules/gui/qt4/input_manager.hpp
View file @
91d19753
...
...
@@ -141,7 +141,7 @@ public:
bool
hasAudio
();
bool
hasVideo
()
{
return
hasInput
()
&&
b_video
;
}
bool
hasVisualisation
();
void
requestArtUpdate
(
input_item_t
*
p_item
);
void
requestArtUpdate
(
input_item_t
*
p_item
,
bool
b_forced
);
void
setArt
(
input_item_t
*
p_item
,
QString
fileUrl
);
QString
getName
()
{
return
oldName
;
}
...
...
src/playlist/fetcher.c
View file @
91d19753
...
...
@@ -385,6 +385,23 @@ static void *Thread( void *p_data )
if
(
!
p_item
)
break
;
meta_fetcher_scope_t
e_prev_scope
=
p_fetcher
->
e_scope
;
/* scope override */
switch
(
i_options
)
{
case
META_REQUEST_OPTION_ANY
:
p_fetcher
->
e_scope
=
FETCHER_SCOPE_ANY
;
break
;
case
META_REQUEST_OPTION_LOCAL
:
p_fetcher
->
e_scope
=
FETCHER_SCOPE_LOCAL
;
break
;
case
META_REQUEST_OPTION_NETWORK
:
p_fetcher
->
e_scope
=
FETCHER_SCOPE_NETWORK
;
break
;
case
META_REQUEST_OPTION_NONE
:
default:
break
;
}
/* Triggers "meta fetcher", eventually fetch meta on the network.
* They are identical to "meta reader" expect that may actually
* takes time. That's why they are running here.
...
...
@@ -396,6 +413,7 @@ static void *Thread( void *p_data )
if
(
i_ret
==
1
)
i_ret
=
DownloadArt
(
p_fetcher
,
p_item
);
p_fetcher
->
e_scope
=
e_prev_scope
;
/* */
char
*
psz_name
=
input_item_GetName
(
p_item
);
if
(
!
i_ret
)
/* Art is now in cache */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment