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
0c596874
Commit
0c596874
authored
Feb 02, 2008
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
growl: better formatting of notification, depending which metadata is available
parent
43c75f9d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
8 deletions
+27
-8
modules/misc/notify/growl.c
modules/misc/notify/growl.c
+27
-8
No files found.
modules/misc/notify/growl.c
View file @
0c596874
...
@@ -139,15 +139,34 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
...
@@ -139,15 +139,34 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
free
(
psz_name
);
free
(
psz_name
);
/* Playing something ... */
/* Playing something ... */
psz_artist
=
input_item_GetArtist
(
input_GetItem
(
p_input
)
);
input_item_t
*
p_item
=
input_GetItem
(
p_input
);
if
(
psz_artist
==
NULL
)
psz_artist
=
strdup
(
""
);
psz_
album
=
input_item_GetAlbum
(
input_GetItem
(
p_input
)
)
;
psz_
title
=
input_item_GetTitle
(
p_item
)
;
if
(
psz_
album
==
NULL
)
psz_album
=
strdup
(
""
);
if
(
psz_
title
==
NULL
||
EMPTY_STR
(
psz_title
)
)
psz_title
=
input_item_GetTitle
(
input_GetItem
(
p_input
)
);
{
if
(
psz_title
==
NULL
)
free
(
psz_title
);
psz_title
=
input_item_GetName
(
input_GetItem
(
p_input
)
);
psz_title
=
input_item_GetName
(
input_GetItem
(
p_input
)
);
snprintf
(
psz_tmp
,
GROWL_MAX_LENGTH
,
"%s %s %s"
,
if
(
psz_title
==
NULL
||
EMPTY_STR
(
psz_title
)
)
{
free
(
psz_title
);
vlc_object_release
(
p_input
);
return
VLC_SUCCESS
;
}
}
psz_artist
=
input_item_GetArtist
(
p_item
);
if
(
EMPTY_STR
(
psz_artist
)
)
FREENULL
(
psz_artist
);
psz_album
=
input_item_GetAlbum
(
p_item
)
;
if
(
EMPTY_STR
(
psz_album
)
)
FREENULL
(
psz_album
);
if
(
psz_artist
&&
psz_album
)
snprintf
(
psz_tmp
,
GROWL_MAX_LENGTH
,
"%s
\n
%s [%s]"
,
psz_title
,
psz_artist
,
psz_album
);
psz_title
,
psz_artist
,
psz_album
);
else
if
(
psz_artist
)
snprintf
(
psz_tmp
,
GROWL_MAX_LENGTH
,
"%s
\n
%s"
,
psz_title
,
psz_artist
);
else
snprintf
(
psz_tmp
,
GROWL_MAX_LENGTH
,
"%s"
,
psz_title
);
free
(
psz_title
);
free
(
psz_title
);
free
(
psz_artist
);
free
(
psz_artist
);
free
(
psz_album
);
free
(
psz_album
);
...
...
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