Songs Position ID and URL JS

0
Hi Germi,

Just a small question for once...

In which file are the songs_position_id & songs_position_url scripts added to MC pages?

Many thanks,

Gez
Responses (11)
  • Accepted Answer

    Thursday, May 31 2012, 10:40 AM - #Permalink
    0
    It's OK, I got it!

    views/album/view.html.php right?

    Gez
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, May 31 2012, 10:44 AM - #Permalink
    0
    yes, in this one, but also in /playlist and /songs and /search :)
    (basically, in every page that needs a list of songs)
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, May 31 2012, 10:45 AM - #Permalink
    0
    Great - thanks Germi!
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, May 31 2012, 11:13 AM - #Permalink
    0
    @germi

    Hi Germi,

    I have a small issue in that the songs_position_url seems to prepend '/songs/' to the path so that a song 'songs/ev-rct11/s/1-03 Love the Food, Hate the Waste.m4a' in the JS of a given page ends up as '/songs//songs/ev-rct11/s/1-03 Love the Food, Hate the Waste.m4a'.

    Songs are playing fine however, I'm not using HTML5 player yet and I'm mindful that when I do, I'm going to run into an issue with this.

    Where can I change this?

    Usure if this is in anyway related but, in my XSPF helper, I had to change the item->location using a string replace in order to get the streaming working for flash player like;

    $data->items[$i]->location = str_replace("/songs",$songs_lts,$data->items[$i]->location);


    Many thanks,

    Gez
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, May 31 2012, 11:14 AM - #Permalink
    0
    Just to clarify, $songs_lts ='songs'
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, May 31 2012, 12:11 PM - #Permalink
    0
    Hi Germi,

    It's OK, I got it - it's in the helper.php.

    I'd previously changed bits of this for streaming too!

    Thanks,

    Gez
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, May 31 2012, 12:13 PM - #Permalink
    0
    hello!

    yes :) the song path is processed in the helpers :) you got that right as usual!! :lol:
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, May 31 2012, 01:14 PM - #Permalink
    0
    Hi Germi,

    Thanks!

    For some reason, I can't get this to work properly - I must be missing something.

    There are 2 helper functions that I'm editing at the moment... The 'getSongFileURL' & 'getSongFileURLslashes'...

    For the moment, as I sort of know what I'm doing and for debugging, I've commented out everything inside of both functions and am just returning $song_path_complet as follows;

    function getSongFileURL($song){
    $song_path_complet = "songs/" . $song->filename ;
    return $song_path_complet ;

    }


    this means of course, that I'm hardcoding the songs folder which isn't a problem just for testing. However, somehow, 'songs/' is getting prepended to it still so that files in'songs/1/' become 'songs/songs/1'.

    Even stranger is the fact that the XSPF feed for the album that I'm looking at displays it correctly and it plays fine however, in the JS array of songs (songs_position_url) it has the extra 'songs/' prepended to the path????

    Very strange!

    I can't work out what's going on here...

    Many thanks,

    Gez

    P.S. If you need to see my site to debug, please could you email me your IP address so I can add it to HTACCESS? I'll send you an email so you got my address to hand. Thanks, Gez
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, May 31 2012, 01:28 PM - #Permalink
    0
    Hi Germi,

    Just to clarify a bit further, all of my media is initially uploaded to [root]/songs/ on my server. Then, the songs directory and all of it's contents gets sync'd to cloudfront with the same relative folder structure as on my site.. Since I'm streaming at the moment, I don't need to add my base URL to the filename as the streamer variable serves the same purpose.

    When I come to setup HTML5, I'm going to prepend my amazon S3 server URL to the filenames so that rather than Flash streaming, it will use progressive download to play the media from my bucket instead. Since this S3 bucket is the source of my Cloudfront distribution, the files and dirs are also all relative to my web servers directories.

    Thanks, Gez
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, June 02 2012, 04:32 PM - #Permalink
    0
    hello Gez!

    well, if you see the /songs part repeated, that means that $song->filename already includes it... doesn't it? I mean, have you tried, on that function, to see what it contains calling print_r($song) ?
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, June 02 2012, 04:58 PM - #Permalink
    0
    Hi Germi,

    No, I haven't printed the song array to check as such but, as I said, the strange thing is that the filename/path in the XSPF view of the album is correct... It's just the link in the JS stuff where I get 'songs/songs/...'

    Any ideas?

    Thanks Gez!

    BTW I almost have my MC JW player module docked in fixed location. Now I'm working on a bit of JS to resize the player so I can toggle the screen, control bar and playlist elements separately.

    I will post this once I'm done - prob next week some time
    The reply is currently minimized Show
Your Reply