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 - 91 through 100 (of 176 total)
  • Author
    Posts
  • #14779
    Iris
    Participant

    Well, prior to v1.19 with the exception of the “Added” and “Played” charts all others were generating in under 10 secs too. With v1.19 I am getting charting for “Added” and “Played” – so some progress has made there with whatever changes you made but now the time to generate any chart has increased to probably an average of 25 secs. The “Summary” page still throws the error:

    Warning: Invalid argument supplied for foreach() in /shares/mss-hdd/Public/Our Sites/stats/summary.php on line 72

    The “Added” and “Refresh Charts” throws the error:

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

    The “Played” which of course I didn’t have a time for before took 17.938653 seconds.

    So, we’re getting closer. 😀

    Iris

    #14780
    sonichouse
    Participant

    Hi Iris,

    I jusy don’t understand the timings on your machine, mine are all under 10 seconds.

    I know that sqlite2 is slower than sqlite3, that might explain the reasons.

    Anyway, I have changed summary.php to give some error reports.

    The only change was to add the distinct albums played – you might want to comment that bit out to test.

    Version 1.20 up there now.

    /Steve

    #14781
    Iris
    Participant

    Okay, Steve

    Once I added set_time_limit(60); and was able to “Refresh Charts” without it crashing my times dropped to <5 secs with the exception of "Added" 35.825750 seconds and "Played" 16.197334 seconds. I don't know if that's something that can be improved upon. I've always had the impression that the MSS in general had better response times than the Slug but maybe not.

    The error on the summary page still exists though!

    Before, I try 1.20 does this added info help or should I install 1.20

    Iris

    #14782
    sonichouse
    Participant

    @Iris wrote:

    Okay, Steve

    Once I added set_time_limit(60); and was able to “Refresh Charts” without it crashing my times dropped to <5 secs with the exception of "Added" 35.825750 seconds and "Played" 16.197334 seconds. I don't know if that's something that can be improved upon. I've always had the impression that the MSS in general had better response times than the Slug but maybe not.

    The error on the summary page still exists though!

    Before, I try 1.20 does this added info help or should I install 1.20

    Iris

    I wonder if we need to add an index on play_count .

    create index idx_played on songs(id, play_count);

    Go with 1.20

    #14783
    Iris
    Participant

    I just update summary.php and here’s the error:

    Unable to execute: select 'Songs' as Item,count(1) as Desc from songs union all select 'Playlists' as Item, count(1) as Desc from playlists union all select 'Albums' as Item, count(distinct album) as Desc from songs union all select 'Albums Played' as Item, count(distinct Album) as Desc from songs where play_count>0 union all select 'Songs Played' as Item, sum(play_count) as Desc from songs where play_count>0 union all select 'Unique Songs Played' as Item, count(1) as Desc from songs where play_count>0 ;

    HY000 1 near "distinct": syntax error

    Iris

    #14784
    greenleaf
    Participant

    I just downloaded and set up firestats and it’s looking great, except I’m getting the following error on most every page instead of a graph:

    Warning: copy(img/Albums.png) [function.copy]: failed to open stream: Permission denied in /var/www/firestats/functions.php on line 314

    I’m pretty much a n00b when it comes to anything more complex than the simplest PHP, so I have no clue how to fix it myself.

    My server’s running Ubuntu Feisty, with Firefly build svn-1376 and PHP both installed using apt, and Firestats 1.19.

    #14785
    Iris
    Participant

    Greenleaf: I thinkyou need a moe up-to-date version of Firefly.

    Steve: This is a suggestion now. I actually think reading the posts that you had the recently played chart as a bar chart and I think that would be my preference over the line chart. What would really add some zing would be a stacked bar chart that would be breakdown the number played by codec.

    Just an idea.

    Iris

    #14786
    sonichouse
    Participant

    @Iris wrote:

    I just update summary.php and here’s the error:

    Unable to execute: select 'Songs' as Item,count(1) as Desc from songs union all select 'Playlists' as Item, count(1) as Desc from playlists union all select 'Albums' as Item, count(distinct album) as Desc from songs union all select 'Albums Played' as Item, count(distinct Album) as Desc from songs where play_count>0 union all select 'Songs Played' as Item, sum(play_count) as Desc from songs where play_count>0 union all select 'Unique Songs Played' as Item, count(1) as Desc from songs where play_count>0 ;

    HY000 1 near "distinct": syntax error

    Iris

    Hi Iris,

    sqlite2 does not like the

    select 'Albums Played' as Item, count(distinct Album) as Desc from songs where play_count>0

    bit in that sql. I will find an approach that does work – for now can you just comment out that one sql statement ?

    #14787
    sonichouse
    Participant

    @greenleaf wrote:

    I just downloaded and set up firestats and it’s looking great, except I’m getting the following error on most every page instead of a graph:

    Warning: copy(img/Albums.png) [function.copy]: failed to open stream: Permission denied in /var/www/firestats/functions.php on line 314

    I’m pretty much a n00b when it comes to anything more complex than the simplest PHP, so I have no clue how to fix it myself.

    My server’s running Ubuntu Feisty, with Firefly build svn-1376 and PHP both installed using apt, and Firestats 1.19.

    It is trying to pull the .png file from google API to the img directory.

    Is that directory writable ?

    #14788
    sonichouse
    Participant

    @Iris wrote:

    Steve: This is a suggestion now. I actually think reading the posts that you had the recently played chart as a bar chart and I think that would be my preference over the line chart. What would really add some zing would be a stacked bar chart that would be breakdown the number played by codec.

    Interesting thought.. I’ll have a look at that.

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