summaryrefslogtreecommitdiffstats
path: root/apps/media/ajax
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-07-28 20:59:36 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-07-28 20:59:36 +0200
commitbc51425bb753d7a5adffe707053b6186a4de7bba (patch)
tree513260893bf9cc5514280f834c59231cbe0a16e5 /apps/media/ajax
parent7d15a45e09bfa27597a1169e12ba79b6e5221946 (diff)
downloadnextcloud-server-bc51425bb753d7a5adffe707053b6186a4de7bba.tar.gz
nextcloud-server-bc51425bb753d7a5adffe707053b6186a4de7bba.zip
keep track of playcount as last played time of music files
Diffstat (limited to 'apps/media/ajax')
-rw-r--r--apps/media/ajax/api.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/media/ajax/api.php b/apps/media/ajax/api.php
index 0ccfb63f418..84d5dd17882 100644
--- a/apps/media/ajax/api.php
+++ b/apps/media/ajax/api.php
@@ -105,6 +105,9 @@ if($arguments['action']){
$ftype=OC_FILESYSTEM::getMimeType( $arguments['path'] );
+ $songId=OC_MEDIA_COLLECTION::getSongByPath($arguments['path']);
+ OC_MEDIA_COLLECTION::registerPlay($songId);
+
header('Content-Type:'.$ftype);
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');