Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
03ee7b3a
Commit
03ee7b3a
authored
Sep 18, 2006
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
It's still ugly as hell but a bit more accurate. (This is a *test* plugin)
parent
51b923f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
modules/misc/musicbrainz.c
modules/misc/musicbrainz.c
+11
-5
No files found.
modules/misc/musicbrainz.c
View file @
03ee7b3a
...
@@ -77,7 +77,6 @@ static int Open( vlc_object_t *p_this )
...
@@ -77,7 +77,6 @@ static int Open( vlc_object_t *p_this )
var_AddCallback
(
p_playlist
,
"item-change"
,
ItemChange
,
p_intf
);
var_AddCallback
(
p_playlist
,
"item-change"
,
ItemChange
,
p_intf
);
var_AddCallback
(
p_playlist
,
"playlist-current"
,
ItemChange
,
p_intf
);
var_AddCallback
(
p_playlist
,
"playlist-current"
,
ItemChange
,
p_intf
);
pl_Release
(
p_intf
);
pl_Release
(
p_intf
);
fprintf
(
stdout
,
"POUET POUET
\n
POUET POEUT
\n
POUET POUET
\n
"
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
@@ -129,13 +128,13 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
...
@@ -129,13 +128,13 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
psz_album
=
p_input
->
input
.
p_item
->
p_meta
->
psz_album
;
psz_album
=
p_input
->
input
.
p_item
->
p_meta
->
psz_album
;
psz_title
=
p_input
->
input
.
p_item
->
psz_name
;
psz_title
=
p_input
->
input
.
p_item
->
psz_name
;
if
(
psz_artist
&&
psz_album
&&
psz_title
)
if
(
psz_artist
&&
psz_album
/* && psz_title */
)
{
{
musicbrainz_t
p_mb
;
musicbrainz_t
p_mb
;
char
psz_buf
[
256
];
char
psz_buf
[
256
];
char
psz_data
[
256
];
char
psz_data
[
256
];
char
i_album_count
,
i
;
char
i_album_count
,
i
;
char
*
ppsz_args
[
2
];
char
*
ppsz_args
[
4
];
fprintf
(
stdout
,
"[33;1m--> %s %s %s[0m
\n
"
,
psz_artist
,
psz_album
,
psz_title
);
fprintf
(
stdout
,
"[33;1m--> %s %s %s[0m
\n
"
,
psz_artist
,
psz_album
,
psz_title
);
p_mb
=
mb_New
();
p_mb
=
mb_New
();
...
@@ -144,8 +143,15 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
...
@@ -144,8 +143,15 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
#endif
#endif
mb_SetDepth
(
p_mb
,
2
);
mb_SetDepth
(
p_mb
,
2
);
ppsz_args
[
0
]
=
psz_album
;
ppsz_args
[
0
]
=
psz_album
;
ppsz_args
[
1
]
=
NULL
;
ppsz_args
[
1
]
=
psz_artist
;
if
(
!
mb_QueryWithArgs
(
p_mb
,
MBQ_FindAlbumByName
,
ppsz_args
)
)
ppsz_args
[
2
]
=
NULL
;
if
(
!
mb_QueryWithArgs
(
p_mb
,
"<mq:FindAlbum>
\n
"
\
" <mq:depth>@DEPTH@</mq:depth>
\n
"
\
" <mq:maxItems>@MAX_ITEMS@</mq:maxItems>
\n
"
\
" <mq:albumName>@1@</mq:albumName>
\n
"
\
" <mq:artistName>@2@</mq:artistName>
\n
"
\
"</mq:FindAlbum>
\n
"
,
ppsz_args
)
)
{
{
mb_GetQueryError
(
p_mb
,
psz_buf
,
256
);
mb_GetQueryError
(
p_mb
,
psz_buf
,
256
);
msg_Err
(
p_intf
,
"Query failed: %s
\n
"
,
psz_buf
);
msg_Err
(
p_intf
,
"Query failed: %s
\n
"
,
psz_buf
);
...
...
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