mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-19 13:01:19 +00:00
fix(analytics): set initial value for duration and bandwidth
This commit is contained in:
parent
06279cd90f
commit
ee50539591
@ -50,8 +50,8 @@ class AddAnalyticsPodcastsProcedure extends Migration
|
||||
SET @current_hour = HOUR(@current_datetime);
|
||||
|
||||
IF NOT `p_bot` THEN
|
||||
INSERT INTO `{$prefix}analytics_podcasts`(`podcast_id`, `date`)
|
||||
VALUES (p_podcast_id, @current_date)
|
||||
INSERT INTO `{$prefix}analytics_podcasts`(`podcast_id`, `date`, `duration`, `bandwidth`)
|
||||
VALUES (p_podcast_id, @current_date, `p_duration`, `p_filesize`)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
`duration`=`duration`+`p_duration`,
|
||||
`bandwidth`=`bandwidth`+`p_filesize`,
|
||||
|
Loading…
x
Reference in New Issue
Block a user