User avatar
Pernod
Moderator
Moderator
Posts: 290
Joined: Thu Jun 21, 2012 2:21 pm
Country: United Kingdom
Location: UK
Contact: Website

Retrieve YouTube Videos

Tue Jul 10, 2012 10:13 am

What I'd like to implement in a front-end is a feature that will play all videos associated with a users music library, or even by selected artists only. To even consider doing this at the moment I would have to search by artist name to get the TADB_Artist_ID, then retrieve the artists albums by TADB_Album_ID, then retrieve all tracks in each individual album by TADB_Album_ID and look for strMusicVid being set in each. This is three API requests for each artist in a users library, quite cumbersome.

I'd like a simpler request sequence specifically for videos, or even add all artists videos to the artist request?

I'm open to discussion on this suggestion :)

User avatar
zag
Site Admin
Site Admin
Posts: 1249
Joined: Wed Jun 06, 2012 9:19 am
Country: United Kingdom

Re: Retrieve YouTube Videos

Tue Jul 10, 2012 12:21 pm

Yes I was thinking the same thing.

Music vids are a nice application.

I'll see what I can come up with. I was thinking a simple return Youtube URL on name or id search.

User avatar
zag
Site Admin
Site Admin
Posts: 1249
Joined: Wed Jun 06, 2012 9:19 am
Country: United Kingdom

Re: Retrieve YouTube Videos

Tue Jul 10, 2012 10:21 pm

Pernod wrote:I'd like a simpler request sequence specifically for videos, or even add all artists videos to the artist request?

I'm open to discussion on this suggestion :)


*Done*

I've implemented the 1st Music Vid Method. Tell me what you think. It still requires you to know the Artist ID, but I think it takes away at least one step.

Music Videos
Return individual track Mvid Names and Youtube Links for a known TADB_Artist_ID
http://www.theaudiodb.com/api/v1/json/{APIKEY}/mvid.php?i=(artistid}

User avatar
Pernod
Moderator
Moderator
Posts: 290
Joined: Thu Jun 21, 2012 2:21 pm
Country: United Kingdom
Location: UK
Contact: Website

Re: Retrieve YouTube Videos

Tue Jul 10, 2012 11:58 pm

zag wrote:I've implemented the 1st Music Vid Method. Tell me what you think. It still requires you to know the Artist ID, but I think it takes away at least one step.

Music Videos
Return individual track Mvid Names and Youtube Links for a known TADB_Artist_ID
http://www.theaudiodb.com/api/v1/json/{APIKEY}/mvid.php?i=(artistid}

Excellent! A minor comment would be that the results are returned as artists/artist when videos/video (or similar) would be more appropriate.

Code: Select all

{

    "artists": [
        {
            "artist": {
                "strTrack": "Music",
                "strMusicVid": "http://www.youtube.com/watch?v=SKwm7dd0vIE"
            }
        }

Could you also include the single image as it would be useful to display as a link to the video?

Why not include all the track details, especially track, album, and artist id's. This would essentially make it like the Track Data results but would return all tracks by specified artist id having a video assigned.

User avatar
zag
Site Admin
Site Admin
Posts: 1249
Joined: Wed Jun 06, 2012 9:19 am
Country: United Kingdom

Re: Retrieve YouTube Videos

Wed Jul 11, 2012 12:42 pm

Pernod wrote:Excellent! A minor comment would be that the results are returned as artists/artist when videos/video (or similar) would be more appropriate.

Could you also include the single image as it would be useful to display as a link to the video?

Why not include all the track details, especially track, album, and artist id's. This would essentially make it like the Track Data results but would return all tracks by specified artist id having a video assigned.


*Done*

Let me know if you can think of any other improvements

User avatar
Pernod
Moderator
Moderator
Posts: 290
Joined: Thu Jun 21, 2012 2:21 pm
Country: United Kingdom
Location: UK
Contact: Website

Re: Retrieve YouTube Videos

Wed Jul 11, 2012 12:51 pm

zag wrote:
*Done*

Let me know if you can think of any other improvements

Thanks but am not seeing any changes in the results.

User avatar
zag
Site Admin
Site Admin
Posts: 1249
Joined: Wed Jun 06, 2012 9:19 am
Country: United Kingdom

Re: Retrieve YouTube Videos

Wed Jul 11, 2012 12:58 pm

Pernod wrote:
zag wrote:
*Done*

Let me know if you can think of any other improvements

Thanks but am not seeing any changes in the results.


Sorry my bad, forgot to copy your api files. Should work now.

The new update has a number of improvements to all API methods.

- Now removes "/r" from the biographies and "\/" in the URLS
- Null fields for some that were strings before if negative
- Music Video improvements
- New Music Brainz Artist and release-group lookups

Sorry to keep changing things, its in heavy development ;)

User avatar
Pernod
Moderator
Moderator
Posts: 290
Joined: Thu Jun 21, 2012 2:21 pm
Country: United Kingdom
Location: UK
Contact: Website

Re: Retrieve YouTube Videos

Wed Jul 11, 2012 1:48 pm

zag wrote:Sorry to keep changing things, its in heavy development ;)

No problem, it's evolving, and it's better to get these changes in now whilst there are only a couple of API users :D

ajs
Registered User
Registered User
Posts: 1
Joined: Fri Jul 19, 2013 11:00 am
Country: Ukraine

Re: Retrieve YouTube Videos

Mon Aug 12, 2013 2:15 pm

You can add the name of the artist in the search result?

Was.
{"mvids":[{"idArtist":"112045","strMusicBrainzArtistID":"a3cb23fc-acd3-4ce0-8f36-1e5aa6a18432"
It has become.
{"mvids":[{"idArtist":"112045","strArtist":"U2","strMusicBrainzArtistID":"a3cb23fc-acd3-4ce0-8f36-1e5aa6a18432"

User avatar
kiwijunglist
Registered User
Registered User
Posts: 8
Joined: Wed Jun 12, 2013 12:53 pm
Country: New Zealand

Re: Retrieve YouTube Videos

Tue Aug 13, 2013 4:10 am

Pernod wrote:What I'd like to implement in a front-end is a feature that will play all videos associated with a users music library, or even by selected artists only. To even consider doing this at the moment I would have to search by artist name to get the TADB_Artist_ID, then retrieve the artists albums by TADB_Album_ID, then retrieve all tracks in each individual album by TADB_Album_ID and look for strMusicVid being set in each. This is three API requests for each artist in a users library, quite cumbersome.

I'd like a simpler request sequence specifically for videos, or even add all artists videos to the artist request?

I'm open to discussion on this suggestion :)


I have already implemented something similar
http://forum.team-mediaportal.com/threads/music-video-downloader.120700/

Basically library data comes from last.fm (last.fm supports lots of scrobbers eg. MePo etc..) However the difference is that my app downloads the music videos rather than playing them.

Return to “Developers”