Discussions
Activity
Sign In
How it works
Airtime Development
current song metadata "album"
Vote Up
0
Vote Down
bardia
September 2014
Posts: 6
Member
hi,
i'm trying to get the album from current song...
my problem is, i ve 2 folder one for singles and one for albums...
so i m trying to wrtie an simple IF to show the right image of current song.
actually i use for singles this code in the jquery.showinfo.js:
btw: every single song contains in album-meta-tag this value "single".
if(sd.currentTrack.getTitle().length > 0){
song = sd.currentTrack.getTitle().split(' - ');
//single URL
uri = '/artists/'+ song[0][0] +'/'+ song[0] +'/'+ sd.currentTrack.getTitle() +'.jpg';
$('img.image').attr({src: uri});
obj.empty();
}
And this is what i want:
if(sd.currentTrack.getTitle().length > 0){
song = sd.currentTrack.getTitle().split(' - ');
if(
album-meta-tag
=="single"){
//single URL
uri = '/artists/'+ song[0][0] +'/'+ song[0] +'/'+ sd.currentTrack.getTitle() +'.jpg';
}else{
//album URL
uri= '/albums/'+ song[0][0] +'/'+ song[0] +'/'+ (
album-name)
+'/'+ song[0] +'.jpg';
}
$('img.image').attr({src: uri});
obj.empty();
}
is there any solution to add the album name in
/api/live-info/?callback
?
or maybe to ignore a folder and search every folder for the right name like this:
uri= '../../albums/'+ song[0][0] +'/'+ song[0] +'/'+ (
album-name)
+'/'+ song[0] +'.jpg';
ty
Add a Comment
Start a New Discussion
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
8,397
Sourcefabric
↳
Announcements
25
Newscoop
↳
Newscoop Support
2,189
↳
Newscoop Development
722
↳
Newscoop Security
13
↳
Newscoop Documentation
17
↳
Newscoop Themes
69
Airtime
↳
Airtime Support
3,139
↳
Airtime Development
1,286
↳
Airtime Français
146
↳
Airtime Documentation
14
↳
Airtime Hacks
102
↳
Promote your station!
37
↳
Airtime Security
11
Booktype
↳
Booktype Support
277
↳
Booktype Development
55
↳
Booktype Documentation
7
Superdesk
↳
Superdesk Development
264
↳
Web Publisher
21
Poll
No poll attached to this discussion.
Top Posters
Albert FR
1978
Martin Konecny
1860
Andrey Podshivalov
1526
Voisses Tech
1423
John Chewter
899
Daniel James
844
Roger Wilco
784
hoerich
627
Paul Baranowski
389
Cliff Wang
339