Played videos statistics (log files?) (1 Viewer)

urij2000

Portal Member
June 28, 2006
8
0
Hi,

I would like to collect info/stats on which video file was played when.
I don't mind grabbing the info a-la "grep" from log files.
I see there are lines containing
VideoPlayer:play
in the MediaPortal.log, but it doesn't seem to go back a lot - this file seems to be rotated/deleted too often

1) Is there a better place to look for such info (what file was played when)?
2) If not, is there a way to control the size of the log file, or how often it is rotated/deleted?

thanks

P.S: MP 1.0.2.0, Standalone as video/music player
 

rekenaar

Retired Team Member
  • Premium Supporter
  • December 17, 2006
    4,421
    805
    Home Country
    South Africa South Africa
    Hi :)

    Mediaportal creates new log file everytime it is started.

    One option is to remove your mediaportal shortcut and create a new shortcut to the batch file mp.cmd to start mediaportal.

    Just change the hardcoded logsDir and mpDir and give it a try. It will basically copy the log files to a date directory and append the time to the filename. Then start mediaportal.

    Code:
    rem @echo off
    rem ******************************
    rem ** configure directories here
    rem ******************************
    set logsDir=C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\log
    set mpDir=C:\Program Files\Team MediaPortal\MediaPortal
    rem ******************************
    c:
    cd %logsDir%
    
    for /f "tokens=1-3 delims=/- " %%a in ('date /t') do set XDate=%%a-%%b-%%c
    
    for /f "tokens=1-2 delims=: " %%a in ('time /t') do set XTime=%%a.%%b
    
    echo %XDate% %Xtime%
    md "%xdate%"
    copy mediaportal.log "%xdate%"\mediaportal_"%xtime%".log 
    
    START "MP" "%mpDir%\mediaportal.exe"
    EXIT
     

    Attachments

    • mp.zip
      419 bytes

    Users who are viewing this thread

    Top Bottom