FireStats – Top 40 php script (now with added charts)

FireFly Media Server Firefly Media Server Forums Firefly Media Server Add-on Software FireStats – Top 40 php script (now with added charts)

Viewing 10 posts - 81 through 90 (of 176 total)
  • Author
    Posts
  • #14769
    Iris
    Participant

    @sonichouse wrote:

    If you were running 1.18, it should show an error message rather than the one displayed.

    Can you check the first few lines of QuerytoTable (line 100)

    It should say

    function QueryToTable($dbh, $query, $output=1, $title=null, $mode=null,$graph=0)
    {
    $imgDir="img/";
    $minScale=0;
    $maxScale=10;

    // Execute Query
    $result=$dbh->query($query);

    // Check for valid result set
    if(!$result)
    {
    print("

    Unable to execute: $query


    ");
    return;
    }

    No it doesn’t – I even re-downloaded.

    And, Functions.PHP at the top defines the version variable as 1.17?

    Maybe upload a fresh zip.

    Iris

    #14770
    sonichouse
    Participant

    Just downloaded it to a seperate machine – was fine.

    try this one functions.php

    #14771
    Iris
    Participant

    Correct version now. Error reads:

    Unable to execute: select Date, sum(Added) as Added from ( select date(time_added, ‘unixepoch’, ‘localtime’) as “Date”, count(*) as Added from songs where date(time_added, ‘unixepoch’, ‘localtime’) between date(‘now’ , ‘-14 day’, ‘localtime’) and date(‘now’ , ‘localtime’) group by 1 union all select date(‘now’ , ‘-00 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-01 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-02 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-03 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-04 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-05 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-06 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-07 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-08 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-09 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-10 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-11 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-12 day’, ‘localtime’), 0 union all select date(‘now’ , ‘-13 day’, ‘localtime’), 0 ) group by 1 order by 1 desc;

    Iris

    #14772
    sonichouse
    Participant

    That query works fine for me on my machine.

    can you try

    select date(time_added, 'unixepoch', 'localtime') as "Date", count(*) as Added from songs where date(time_added, 'unixepoch', 'localtime') between date('now' , '-14 day', 'localtime') and date('now' , 'localtime') group by 1;

    in sqlite on yours ?

    /Steve

    #14773
    Iris
    Participant

    I haven’t done direct querys to sqlite before? I’m just wondering, I see you’re using v1696 and I’m on 1586 – could that be the prob? I had tried 1696 but had to revert back due to those memory leaks Ron was trying to get a handle on. Edit: Can someone else on 1586 try this?

    Iris

    #14774
    sonichouse
    Participant

    @Iris wrote:

    I haven’t done direct querys to sqlite before? I’m just wondering, I see you’re using v1696 and I’m on 1586 – could that be the prob? I had tried 1696 but had to revert back due to those memory leaks Ron was trying to get a handle on. Edit: Can someone else on 1586 try this?

    Iris

    The database structure is the same AFAIK betweeen the two builds.

    The last played time was fixed in 1587 I think, but the date added should still work.

    I am re-building my datbase in sqlite2 as we speak, see if that makes any difference.

    #14775
    Iris
    Participant

    Sonic,

    I’m being summoned to get off the computer and go out so I’ll have to catch up with you later. Thanks for the help so far – like the stats.

    Iris

    #14776
    sonichouse
    Participant

    @Iris wrote:

    Sonic,

    I’m being summoned to get off the computer and go out so I’ll have to catch up with you later. Thanks for the help so far – like the stats.

    Iris

    Have a good night 🙂

    This is a sqlite2 sql column alias issue.

    Version 1.19 zipped and posted fixes this.

    #14777
    Iris
    Participant

    Okay, I’m getting a timeout when doing the initial generation.

    Fatal error: Maximum execution time of 30 seconds exceeded in /shares/mss-hdd/Public/Our Sites/stats/functions.php on line 108

    I tried to find the value to increase to 60 secs but couldn’t. Could you take a look or suggest something I can do.

    Iris

    #14778
    sonichouse
    Participant

    @Iris wrote:

    Okay, I’m getting a timeout when doing the initial generation.

    Fatal error: Maximum execution time of 30 seconds exceeded in /shares/mss-hdd/Public/Our Sites/stats/functions.php on line 108

    I tried to find the value to increase to 60 secs but couldn’t. Could you take a look or suggest something I can do.

    Iris

    On the line before try

    set_time_limit(60);

    All my queries return in less than 10 seconds on my slug – which one is failing on your machine ?

Viewing 10 posts - 81 through 90 (of 176 total)
  • The forum ‘Add-on Software’ is closed to new topics and replies.