[split] Feature Request - Video trailers for artists
#31
Ahh I was working on the wrong api method Smile

All fixed as you requested. Now includes all MBID's
Reply
#32
(2023-01-16, 13:08)zag Wrote: All fixed as you reqeusted. Now includes all MBID's

Great stuff!!

One or two little issues that I have spotted and have no idea why they are the way they are, but ....

Traveling Wilburys - Handle with Care.  Tagging with Picard gives me an MBID of ea5d3599-55ef-49d4-9244-731f1f9a3ec2  Fetching the videolist from tadb gives me an MBID of b08ea79b-56d3-42e1-ac6c-4f8817ec7917  The odd thing is that searching up the MBID from tadb on MusicBrainz links to the right song, but show the first MBID - ea5d.....

No idea why that would be.  Is it perhaps related to recording vs release or something like that?

To counter this somewhat, my code now matches on MBID first, then falls back to track title, which seems to be working well so far in my testing.  I should have something robust enough for others to test with in a few days.
Learning Linux the hard way !!
Reply
#33
Shameless bump of my own stuff!!
(2022-02-17, 23:28)black_eagle Wrote: @manfeed, @docwra  There is a testbuild for Win64 here. This will add 2 new listitems, ListItem.SongVideoURL & ListItem.SongVideoThumb.

This build should include a modified generic artist scraper that will fetch all the mvid links from theaudiodb and match them up to any songs in your library by the artist it is currently scraping. SongVideoThumb is only populated if there is a corresponding thumb returned by theaudiodb. SongVideoURL is formatted up the same as the video library trailers...plugin://plugin.video.youtube/?action=play_video&videoid=etAIpkdhU9Q.

It would be wise to install it in portable mode, but I guess you already know that as this is not yet finished. It does work well enough for initial testing purposes though.  It does not support song artists currently (and I'm not sure it ever will!), just album artists. It does however include json support and import/export of links via nfo files.

My pathetic skinning skills allowed me to test with confluence a little bit.  Thumb in bottom right with video URL underneath it (didn't know how to link it to an action!!).

Image


To get going quickly and avoid having to scan albums in again, if you install it in portable mode and then copy in your existing music82.db into Database in your userdata folder before you run it.  The db will be upgraded and then make sure that the artist scraper is the generic artist scraper.  You can then refresh artists individually from the artistinfo dialog or all of them from the context menu on the artists node.  The re-scrape should pick up the video links for the artist(s) .

There will be bugs!  Please let me know if you find them or just what works and what doesn't, thanks.

@manfeed , @zag and anyone else that would care to test this.

Windows test build here, android arm, android arm64 and OSX are also available.

Works as before except the matching is now done using MBID's where possible, with a fallback to matching by song title in the event of no MBID match. If the test results are positive then I'll PR the code.
Learning Linux the hard way !!
Reply
#34
Sorry, but I'm unable to get this new version to work this time... No matter what I try, always $INFO[ListItem.SongVideoURL] and $INFO[ListItem.SongVideoThumb] are empty.

I made a fresh portable installation with your Windows version and scraped Taylor Swift and Kacey Musgraves, that I know for sure that both have videos in themusicdb.org and it doesn't work in my end.
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#35
@manfeed Yeah sorry, totally my fault.  In my eagerness to tidy up the code and squash some commits in readiness for a PR, I inadvertently removed some vital code from the scraper!

Anyway, new windows version is https://mirrors.kodi.tv/test-builds/wind...ks-x64.exe  However, you will need to change line 347 in addons/metadata.generic.artists/lib/scraper.py from mvidurl = AUDIODBURL % (AUDIODBKEY, AUDIODBMVIDS % param) to mvidurl = AUDIODBURL % (2, AUDIODBMVIDS % param) for the scraping to work.

This is because the code is written to use Kodi's TADB key, but TADB is currently only supplying the MVID data via it's test API key (which is 2).

Once everything is established to be working correctly and the PR is up/merged then I presume @zag will make the necessary changes so that it works with Kodi's TADB key.

Other than that, code should be ready to go.  I know this is annoying but it means I only need to raise one PR against Kodi code, rather than 1 where the key gets changed to the test key, and then another one where it gets changed back again.
Learning Linux the hard way !!
Reply
#36
Thanks @black_eagle Now it works very well!

I tried some of the songs that in the former version (months ago) were having issues surely due to strange characters in the name's song and now they get identified faultlessly.

Is it possible yet for this feature to be included in Nexus? It would be great!
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#37
(2023-01-22, 16:34)manfeed Wrote: Is it possible yet for this feature to be included in Nexus? It would be great!

Firstly, thanks for confirming that it's all working!  Unfortunately, with Nexus already being released and this being a new feature, it won't  be included in Nexus, only Omega and forward.  That's assuming that it gets approved by the team of course.

It might help if you could post a modified skin showing what this can achieve.
Learning Linux the hard way !!
Reply
#38
@black_eagle @zag 

I have some doubts about how this feature works... In my initial test I scraped some music and the existing music video links got added. However, I added a new video link to theaudiodb.com that was not previously available and now it appears correctly in theaudiodb.com but I've been unable to get it scraped to Kodi. I tried forcing rescrape of the artist, but to no avail. Is that the expected behavior? Is it possible only to get the music video links available in the first scrape?

Another question: I have *.nfo files with my music and that way I use 'Local information only' when adding my music again in a new Kodi install, which is faster. Could it be possible to still do that, but afterward scrape only the music video links without changing the rest of the information already present in the Kodi database?

A final question: I'm thinking about how to make this feature (even) more appealing in the skin, and I'm thinking that if would be nice if the user could be given a list of all the available music videos of an artist, even if he doesn't have those songs in his library (maybe in the artist info screen). Is there any chance of getting that?

Thanks!
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#39
(2023-01-23, 14:26)manfeed Wrote: I tried forcing rescrape of the artist, but to no avail. Is that the expected behavior? Is it possible only to get the music video links available in the first scrape?

No, re-scraping the artist (assuming you answer yes to ignoring local info) should re-fetch the video links.
(2023-01-23, 14:26)manfeed Wrote: I have *.nfo files with my music and that way I use 'Local information only' when adding my music again in a new Kodi install, which is faster. Could it be possible to still do that, but afterward scrape only the music video links without changing the rest of the information already present in the Kodi database?

Yeah, I have too.  If you export them again after re-scraping the artist(s) then they will contain the video links and thumbs.  There is a possibility that an addon could be written to specifically fetch the links from tadb and just insert those into the db.  I haven't actually looked at doing it that way, but it should certainly be possible.
(2023-01-23, 14:26)manfeed Wrote: if the user could be given a list of all the available music videos of an artist, even if he doesn't have those songs in his library (maybe in the artist info screen). Is there any chance of getting that?

You mean like the discography ?  I'm not sure how you would differentiate there between songs a user has and hasn't got.  With discography, there is no art available for albums I don't have in my collection however many videos don't have accompanying thumbnails so that rules doing a similar thing out.

I had actually just tidied up my code to use just the song table in the db and throw away any songs that were scraped but not in the db.  However, nothing is set in stone yet so lets see.
Learning Linux the hard way !!
Reply
#40
(2023-01-23, 15:18)black_eagle Wrote: No, re-scraping the artist (assuming you answer yes to ignoring local info) should re-fetch the video links.

Ok, thanks. I tried again with other songs and the new video links and covers are being retrieved. It's just that song that I tried first that keeps refusing to be added... who knows why. Forget about that.
(2023-01-23, 15:18)black_eagle Wrote: There is a possibility that an addon could be written to specifically fetch the links from tadb and just insert those into the db. I haven't actually looked at doing it that way, but it should certainly be possible.

That would be great!
(2023-01-23, 15:18)black_eagle Wrote: You mean like the discography ? I'm not sure how you would differentiate there between songs a user has and hasn't got. With discography, there is no art available for albums I don't have in my collection however many videos don't have accompanying thumbnails so that rules doing a similar thing out.

Currently i have this in my skin. It's the artist information screen...
Image
The section at the bottom gives you a list of all the videoclips (in this case the ones you have in your device) from that artist, and allows you to browse and play them directly from there. What I was wondering is if something similar could be achieved somehow with a list of video links scraped from theaudiodb.com corresponding to that artist.
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#41
Here is a modified version of Estuary that can be used to test this new feature, it should be installed as a zip file:

https://mega.nz/file/FxEX1bQS#JSXuulLDaw...io0OE0W2JQ

The songs screen will look this way:

Image

When a video image cover is available that one is showed instead of the album image.
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#42
@manfeed I noticed all the music videos you edited on theaudiodb have a playlist attached to them, which is why they don't preview on our site.

All music vids need to have just the video ID like this:
 
Code:
https://www.youtube.com/watch?v=EfPzoRpIrXo

Not this:
 
Code:
https://www.youtube.com/watch?v=P8JEm4d6Wu4&list=RDEM3_diDSs5xHH9_WkBNTNTOQ

I will see what I can do to clean them on edit, but for now removing the playlist id should work.

EDIT: This should now be auto cleaned on track edit.
Reply
#43
Having thought about what @manfeed said regarding using nfo files, I have had a dabble with some python and come up with a script that can either be called from program addons or from the artist information dialog.

If called via program addons, it will fetch videolinks for all the album artists in your music library.  If called from the info dialog it will only fetch links for that artist.  In both cases, no other information in the db is changed although it should be noted that any existing videolinks are cleared out before the new links are fetched.  This allows for the links to be updated if they have changed.

Image

Image

This code is still very rough, although it does do the job correctly. I'm also still looking at how to handle the art aspect properly in core as what I have now is not correct (even though it works!).
Learning Linux the hard way !!
Reply
#44
(2023-01-25, 22:02)black_eagle Wrote: Having thought about what @manfeed said regarding using nfo files, I have had a dabble with some python and come up with a script that can either be called from program addons or from the artist information dialog.

If called via program addons, it will fetch videolinks for all the album artists in your music library.  If called from the info dialog it will only fetch links for that artist.  In both cases, no other information in the db is changed although it should be noted that any existing videolinks are cleared out before the new links are fetched.  This allows for the links to be updated if they have changed.

I think this is a brilliant idea! Thanks!
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#45
(2023-01-26, 01:42)manfeed Wrote: I think this is a brilliant idea! Thanks!

There is a new Windows test-build https://mirrors.kodi.tv/test-builds/wind...ks-x64.exe to try.  This has the fixed art in it. You now need to use ListItem.Art(videothumb) as the art now goes in with all the other art for a song.  There is a modified copy of your modified Estuary skin here that uses the right art map and has an extra 'fetch videolinks' button in the artist dialog. You can also grab and test the python links grabber from here.

If you trigger the videolink loader from the artist info screen, it will just fetch links for that artist. If you trigger it from program addons, it will fetch links for all the album artists in the db. The generic artist scraper will also fetch links if you refresh the artist and choose to ignore local info, otherwise it will use local nfo files as usual.

Speaking of which, exporting nfo files now includes the videolinks in the artist.nfo and will populate the db with them when re-scraping.
Learning Linux the hard way !!
Reply

Logout Mark Read Team Forum Stats Members Help
[split] Feature Request - Video trailers for artists0