Changeset 20b02ab8c9d50b794ba6515ba3bbcc0acc3a7294
- Timestamp:
- 15/01/08 14:45:41
(11 months ago)
- Author:
- Rafaël Carré <funman@videolan.org>
- git-committer:
- Rafaël Carré <funman@videolan.org> 1200404741 +0000
- git-parent:
[0d0ad1638c3e659a682a49c94851710ffc9ff285]
- git-author:
- Rafaël Carré <funman@videolan.org> 1200404741 +0000
- Message:
audioscrobbler: do not use mdate() when the real date is needed
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r910dd49 |
r20b02ab |
|
| 31 | 31 | *****************************************************************************/ |
|---|
| 32 | 32 | |
|---|
| | 33 | #if defined( WIN32 ) |
|---|
| | 34 | #include <time.h> |
|---|
| | 35 | #endif |
|---|
| | 36 | |
|---|
| 33 | 37 | #include <vlc/vlc.h> |
|---|
| 34 | 38 | #include <vlc_interface.h> |
|---|
| … | … | |
| 55 | 59 | int i_l; /**< track length */ |
|---|
| 56 | 60 | char *psz_m; /**< musicbrainz id */ |
|---|
| 57 | | mtime_t date; /**< date since epoch */ |
|---|
| | 61 | time_t date; /**< date since epoch */ |
|---|
| 58 | 62 | } audioscrobbler_song_t; |
|---|
| 59 | 63 | |
|---|
| … | … | |
| 259 | 263 | |
|---|
| 260 | 264 | /* main loop */ |
|---|
| 261 | | while( !p_intf->b_die && !p_intf->p_libvlc->b_die ) |
|---|
| | 265 | while( !intf_ShouldDie( p_intf ) ) |
|---|
| 262 | 266 | { |
|---|
| 263 | 267 | /* waiting for data to submit, if waiting interval is elapsed */ |
|---|
| … | … | |
| 345 | 349 | "&n%%5B%d%%5D=%s&m%%5B%d%%5D=%s", |
|---|
| 346 | 350 | i_song, p_song->psz_a, i_song, p_song->psz_t, |
|---|
| 347 | | i_song, (uintmax_t)(p_song->date / 1000000), i_song, i_song, |
|---|
| | 351 | i_song, (uintmax_t)p_song->date, i_song, i_song, |
|---|
| 348 | 352 | i_song, p_song->i_l, i_song, p_song->psz_b, |
|---|
| 349 | 353 | i_song, p_song->psz_n, i_song, p_song->psz_m |
|---|
| … | … | |
| 533 | 537 | |
|---|
| 534 | 538 | p_sys->time_total_pauses = 0; |
|---|
| 535 | | p_sys->p_current_song.date = mdate(); |
|---|
| | 539 | time( &p_sys->p_current_song.date ); |
|---|
| 536 | 540 | |
|---|
| 537 | 541 | var_AddCallback( p_input, "state", PlayingChange, p_intf ); |
|---|
| … | … | |
| 693 | 697 | { |
|---|
| 694 | 698 | char *psz_username, *psz_password; |
|---|
| 695 | | mtime_t timestamp; |
|---|
| | 699 | time_t timestamp; |
|---|
| 696 | 700 | char psz_timestamp[33]; |
|---|
| 697 | 701 | |
|---|
| … | … | |
| 728 | 732 | } |
|---|
| 729 | 733 | |
|---|
| 730 | | timestamp = mdate(); |
|---|
| | 734 | time( ×tamp ); |
|---|
| 731 | 735 | |
|---|
| 732 | 736 | /* generates a md5 hash of the password */ |
|---|
| … | … | |
| 744 | 748 | } |
|---|
| 745 | 749 | |
|---|
| 746 | | snprintf( psz_timestamp, 33, "%llu", (uintmax_t)(timestamp / 1000000) ); |
|---|
| | 750 | snprintf( psz_timestamp, 33, "%llu", (uintmax_t)timestamp ); |
|---|
| 747 | 751 | |
|---|
| 748 | 752 | /* generates a md5 hash of : |
|---|