Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
20b02ab8
Commit
20b02ab8
authored
Jan 15, 2008
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audioscrobbler: do not use mdate() when the real date is needed
parent
0d0ad163
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
modules/misc/audioscrobbler.c
modules/misc/audioscrobbler.c
+11
-7
No files found.
modules/misc/audioscrobbler.c
View file @
20b02ab8
...
...
@@ -30,6 +30,10 @@
* Preamble
*****************************************************************************/
#if defined( WIN32 )
#include <time.h>
#endif
#include <vlc/vlc.h>
#include <vlc_interface.h>
#include <vlc_meta.h>
...
...
@@ -54,7 +58,7 @@ typedef struct audioscrobbler_song_t
char
*
psz_n
;
/**< track number */
int
i_l
;
/**< track length */
char
*
psz_m
;
/**< musicbrainz id */
mtime_t
date
;
/**< date since epoch */
time_t
date
;
/**< date since epoch */
}
audioscrobbler_song_t
;
struct
intf_sys_t
...
...
@@ -258,7 +262,7 @@ static void Run( intf_thread_t *p_intf )
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
/* main loop */
while
(
!
p_intf
->
b_die
&&
!
p_intf
->
p_libvlc
->
b_die
)
while
(
!
intf_ShouldDie
(
p_intf
)
)
{
/* waiting for data to submit, if waiting interval is elapsed */
vlc_object_lock
(
p_intf
);
...
...
@@ -344,7 +348,7 @@ static void Run( intf_thread_t *p_intf )
"&l%%5B%d%%5D=%d&b%%5B%d%%5D=%s"
"&n%%5B%d%%5D=%s&m%%5B%d%%5D=%s"
,
i_song
,
p_song
->
psz_a
,
i_song
,
p_song
->
psz_t
,
i_song
,
(
uintmax_t
)
(
p_song
->
date
/
1000000
)
,
i_song
,
i_song
,
i_song
,
(
uintmax_t
)
p_song
->
date
,
i_song
,
i_song
,
i_song
,
p_song
->
i_l
,
i_song
,
p_song
->
psz_b
,
i_song
,
p_song
->
psz_n
,
i_song
,
p_song
->
psz_m
)
)
...
...
@@ -532,7 +536,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
}
p_sys
->
time_total_pauses
=
0
;
p_sys
->
p_current_song
.
date
=
mdate
(
);
time
(
&
p_sys
->
p_current_song
.
date
);
var_AddCallback
(
p_input
,
"state"
,
PlayingChange
,
p_intf
);
p_sys
->
b_state_cb
=
VLC_TRUE
;
...
...
@@ -692,7 +696,7 @@ static int ParseURL( char *psz_url, char **psz_host, char **psz_file,
static
int
Handshake
(
intf_thread_t
*
p_this
)
{
char
*
psz_username
,
*
psz_password
;
mtime_t
timestamp
;
time_t
timestamp
;
char
psz_timestamp
[
33
];
struct
md5_s
p_struct_md5
;
...
...
@@ -727,7 +731,7 @@ static int Handshake( intf_thread_t *p_this )
return
VLC_ENOVAR
;
}
time
stamp
=
mdate
(
);
time
(
&
timestamp
);
/* generates a md5 hash of the password */
InitMD5
(
&
p_struct_md5
);
...
...
@@ -743,7 +747,7 @@ static int Handshake( intf_thread_t *p_this )
return
VLC_ENOMEM
;
}
snprintf
(
psz_timestamp
,
33
,
"%llu"
,
(
uintmax_t
)
(
timestamp
/
1000000
)
);
snprintf
(
psz_timestamp
,
33
,
"%llu"
,
(
uintmax_t
)
timestamp
);
/* generates a md5 hash of :
* - md5 hash of the password, plus
...
...
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