Cleaning the music library
#1
I found several artists in my music library that have no albums/songs when you enter them.
The "Clean library..." option in Settings does not get rid of them.
Any advise (or is it a bug of "Clean library...")?

I am using Gotham 13.2 on Win7 32bit.

PS: I know how to open the SQLite database and remove them manually, I don't want to go down that path, I prefer an approach that uses standard XBMC practices
Reply
#2
Did you let you music library scrape by the XBMC scraper? If yes, maybe there are some "feat."-artists, that you have no album from. A good example is the album from Eminem "The Eminem Show". There are a lot of feat. artists, that will come up in your library if you let the scraper do his job.

So I would look at the tags from the music files, which come up if you select this artist and look if you can clean a non needed tag.

But it's just a guess.

Greetings
Reply
#3
Are these artists featured artists in some other tracks form some other albums belonging to another main artist? If yes... look at properly tagging your stuff. then try and see if they still show up. Else no idea. These music library functions and tagging and way it works is a massive hit and miss imo. mostly miss. and you cant just select anything and remove it from lib.
Reply
#4
(2014-10-09, 09:12)David1977 Wrote: Did you let you music library scrape by the XBMC scraper? If yes, maybe there are some "feat."-artists, that you have no album from. A good example is the album from Eminem "The Eminem Show". There are a lot of feat. artists, that will come up in your library if you let the scraper do his job.

I am not aware of an mp3 tag for featured artist. I am sure there are a lot of songs like that, but the only hint at the feat. artists is in the title like "Old Habits Die Hard (feat. Sheryl Crow)". Does the scraper look for that sort of things and adds the feat. artist? (It would be strange, since there are other things between parenthesis that are not artists, like "(live at the BBC)" or "(radio mix)".
Anyway, just to give you an example that should have been removed by "Clean Library...": I had one song by Pink with the artist tag set to "Pink", I decided to correct the tag to "P!nk" and the new artist "P!nk" was added to the library, but after cleaning, the artist "Pink" was still there even if it was empty of songs.

(2014-10-09, 10:03)uNiversal Wrote: Are these artists featured artists in some other tracks form some other albums belonging to another main artist? If yes... look at properly tagging your stuff. then try and see if they still show up. Else no idea. These music library functions and tagging and way it works is a massive hit and miss imo. mostly miss. and you cant just select anything and remove it from lib.

See the example I gave to David, above.
In your last phrase did you mean "you can't just select anything and remove it from lib" or was it a typo and you meant "you can just select anything and remove it from lib"
in which case I would ask how do you do it? In the Artists page, the context menu does not have that option.
Reply
#5
No typo, I've battled your issue and it was a "tagging war", which for the most part was a successful. I suggest you get yourself comfortable with your favourite tagger and have at it as for things not being removed, try ./texturecache.py aclean ( search forum for that tool)
Reply
#6
OK, I tried texturecache aclean. I did not want to install Python specially for this so I used RunScript() and launched it from my XBMC favourites.
It did run with these messages in the log file:

Code:
13:52:56 T:8668  NOTICE: Cleaning library...
13:52:56 T:8668  NOTICE: .
13:52:56 T:6640  NOTICE: CMusicDatabase::Cleanup: Starting musicdatabase cleanup ..
13:54:15 T:6584  NOTICE: AddOnLog: PVR IPTV Simple Client: EPG file path is not configured. EPG not loaded.
13:54:56 T:6640  NOTICE: Previous line repeats 140 times.
13:54:56 T:6640  NOTICE: CMusicDatabase::Cleanup: Cleaning musicdatabase done. Operation took 01:59
Not sure if all the messages are form texturecache.py.
At any rate, I don't know if it made any change to the Music DB, but it did not clean the empty Artists.
Thank you anyway for the pointer, I will have this script in my radar from now on, it seems to have a lot of useful targets.

The line I added to my favourites.xml to run this script is:

Code:
<favourite name="Clean Audio DB" thumb="http://wpsolutions-hq.com/wp/wp-content/uploads/2012/03/database-with-broom1.png">RunSCript(special://home\userdata\extras\Python scripts\texturecache.py,aclean)</favourite>

(the ...\extras\Pyhon Scripts\... folders were custom created by me, you can put the script wherever you want)
Reply
#7
I think texturecache.py aclean is just going to call json to do AudioLibrary.Clean so I don't see why that would have any other effect than running clean from the XBMC UI.

scott s.
.
Reply
#8
Not, not a matter of tags I really put a lot of effort in having my tags consistent and complete.

I finally cave in and used SQLite manager (from within Firefox) to clean up this particular problem, opened MyMusic46 and run these:

Code:
DELETE FROM album_artist WHERE album_artist.idAlbum  NOT IN (SELECT album.idAlbum  FROM album WHERE album.idAlbum IS NOT NULL)

DELETE FROM artist WHERE artist.idArtist  NOT IN (SELECT album_artist.idArtist  FROM album_artist WHERE album_artist.idArtist IS NOT NULL)

The first one deleted all the ghost albums from album_artist table
The second one deleted all the ghost artists from the artist table

At first I used "SELECT *" instead of DELETE to make sure which records are going to be deleted, checked a few across the other tables and saw that indeed those are ghost records.

The final check was when I opened again XBMC and the ghost artists were gone from the Artist library!!
Reply
#9
Is that a bug then? Shouldn't it be reported properly so it can be fixed?
Reply
#10
(2014-10-12, 15:38)uNiversal Wrote: Is that a bug then? Shouldn't it be reported properly so it can be fixed?

I don't know. Actually my guess is that for the Kodi team it is not a bug, since they always have "the excuse" that Kodi is not for managing the databases, that you should do that with external programs.
In my personal opinion database consistency is under the responsibility of Kodi.
Anyway I tried to open a clean blank page by deleting the MyMusicXX databases and inserting anew all my mp3 collection. And that part of XBMC 13.2 is totally broken, on a first pass it had all albums and artist, no covers, no thumbs, even though there is a folder.jpg on each album folder. On a second pass (I got the alert "The library must be rescaned now ? Yes/No") it delte all albums, left two, without cover and still no thumbs on the artist page.
I restored the previous MyMusicXX files and I scraped manually each artist thumb.
Reply
#11
I always got the impression they are aware that garbage collection in xbmc sucks and imo they havent hidden it or made any excuses about that fact.

All I can say with great certainty is that v13.2 is not going to receive bug fixes anymore and you should consider then testing kodi (after Tuesday since servers are down till then and you wont be able to download anything).

If in Kodi doesnt work, then I also suggest you make a full and complete bug reprot so that V14 devs have a real chance at fixing it.

If you make a proper and full report then you done your part.

on a sidenote I have made many bug reports and some haven't been fixed for years and not even have a reply, but then again there are not many active developers working on fixing or adding features instead they have become inactive and or left the team over the years. When you consider the complexity of the program things become apparent that not everyone has the detailed knowledge/skills even those who do arent under any obligation in the end.

Best attitude is to do your best make a report and contribute in any way you can, for Kodi more than C++ is necessary to build a success.
Reply
#12
Eventually that is what I will do. But not until Kodi is the last official stable release.
I stopped being an early adopter a few years ago, not only for XBMC, for any other software as well, since I lost my ability to endure the initial bugs. Bad for my health.

PS: Off topic
If what you say is true about losing knowledgeable people from the team without them being replaced with equally skilled programmers, then Kodi is in trouble. My first though about this is that more important than working code is documented code, and that that should be a priority of truly open source projects, otherwise they are doomed to be forgotten when the initial coders leave to do other things, leaving the project to be just "mantained" until it dies.
Reply
#13
So you are saying in this case there was an artist in the artist table who was also in the album artist table linked to an album that didn't exist in the album table?

scott s.
.
Reply
#14
(2014-10-13, 05:57)scott967 Wrote: So you are saying in this case there was an artist in the artist table who was also in the album artist table linked to an album that didn't exist in the album table?

Well, you know album_artist is a table of albums, linked to the DB by the album artist ID.
As far as I understand the DB, the album table is the master table for albums, but the same list is replicated 2 times, album_artist, album_genre each one specifically has a key for artist ID and genre ID respectively.

So basically, yes, there was a inconsistency between the album and album_artist tables which lead XBMC to show ghost artists.
Reply
#15
I disagree, the best time to have things tested and fixed is not when product is released stable, in fact the best time is now. Anything else means intead of maximizing the amount of fixes that could possibly go in to a final release and extending the waiting time to moths and or a year until things get proper time to get looked at or fixed.
Reply

Logout Mark Read Team Forum Stats Members Help
Cleaning the music library0