• 1
  • 9
  • 10
  • 11
  • 12
  • 13(current)
Release cdART Manager Script "NG"
After testing several configurations:
Rapier with Kodi 18.9 on a Android Mediaplayer (Zidoo x20)
Rapier with Kodi 18.8 on a Win8 PC
Rapier with Kodi 18.2 on a Win10 PC

i got the impression that i am getting most reliable results with cdart.png.
discart.jpg or discart.png do not always work.....
Reply
discart.png is only for Rapier in Kodi 19.

cdart.png images will work for all v18 and v19 versions of Kodi.

I might remove that for v20 though.
Reply
Hi,

I came across this addon by chance as an optional dependency for the skin I'm using (Eminence 2 -mod). Decided to have a go at installing it, got a bunch of errors about python. I have spent a little time converting it to python 3, enough so that it loads in 19.4. No testing of functionality has been done yet. 

If anyone else is still interested in using this addon with Matrix, you can see my changes at: https://github.com/rpharrison/script.cdartmanager

Will report back after some testing.
Reply
With music in the library CDAM doesn't appear to be picking it up, haven't investigated further.
Reply
@rpharrison

I think this addon is deprecated. It has not been updated in a long time, and certainly has not been updated for the artwork changes that occurred in v18 and v19.
IIRC it uses incorrect artwork names (cdart instead of discart etc), and makes no use of the Artist Information Folder... https://kodi.wiki/view/Artist_information_folder

Artwork Dump is probably the best replacement for this addon for v19... https://forum.kodi.tv/showthread.php?tid=360078
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
Decided to continue out of personal interest, it is kind of working:

2022-05-31 01:28:07.406 T:16008   DEBUG <general>: [cdART Manager] - b'Retrieving MusicBrainz Info - Checking by Artist - Not including Singles or Live albums'
2022-05-31 01:28:07.406 T:16008   DEBUG <general>: [cdART Manager] - b'Retrieving HTML Source'
2022-05-31 01:28:07.406 T:16008   DEBUG <general>: [cdART Manager] - b'Fetching URL: http://musicbrainz.org/ws/2/release-group/?query="Greatest+Hits"~2 AND artist:"Red+Hot+Chili+Peppers" NOT typeConfusedingle NOT type:live&limit=1'
2022-05-31 01:28:07.406 T:16008   ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'AttributeError'>
                                                   Error Contents: module 'urllib' has no attribute 'FancyURLopener'
                                                   Traceback (most recent call last):
                                                     File "C:\Users\info\AppData\Roaming\Kodi\addons\script.cdartmanager\lib\gui.py", line 896, in onClick
                                                       cdam_db.update_database(False)
                                                     File "C:\Users\info\AppData\Roaming\Kodi\addons\script.cdartmanager\lib\cdam_db.py", line 1145, in update_database
                                                       updated_albums, canceled = update_missing_album_mbid(combined, background=background)
                                                     File "C:\Users\info\AppData\Roaming\Kodi\addons\script.cdartmanager\lib\cdam_db.py", line 1044, in update_missing_album_mbid
                                                       musicbrainz_albuminfo, _ = get_musicbrainz_album(cu.get_str(album["title"]),
                                                     File "C:\Users\info\AppData\Roaming\Kodi\addons\script.cdartmanager\lib\mb_utils.py", line 150, in get_musicbrainz_album
                                                       htmlsource = cu.get_html_source(url, "", save_file=False, overwrite=False)
                                                     File "C:\Users\info\AppData\Roaming\Kodi\addons\script.cdartmanager\lib\cdam_utils.py", line 152, in get_html_source
                                                       class AppURLopener(urllib.FancyURLopener):
                                                   AttributeError: module 'urllib' has no attribute 'FancyURLopener'
                                                   -->End of Python script error report<--
Reply
Long time no see! E-Mail notifications still work on very old posts and rarely used accounts Smile
As Karellen said this script is deprecated for a while. Basically because hardly anyone used it since 18+. Afaik "normal" artwork is retrieved through scrapers by now and the fancy things like rotating discs aren't displayed by most of the skins out there.
But hey, if you do this just of pure interest then don't mind asking if you have any questions. I'm not the creator but a few years ago I've touched almost every line of code.
Reply
Hi stef.an,

Good to see you are active! I did get a little beyond the error of my previous post, but still trying to get it to create the database.

2022-05-31 23:42:37.170 T:26504   ERROR <general>:   File "C:\Users\info\AppData\Roaming\Kodi\addons\script.cdartmanager\lib\cdam_utils.py", line 177, in get_html_source
                                                       sock = urllib.request.urlopen(url)

2022-05-31 23:42:37.170 T:26504   ERROR <general>: http.client.InvalidURL: URL can't contain control characters. '/ws/2/release-group/?query="The+Poison"~2 AND artist:"Bullet+for+My+Valentine"&limit=1' (found at least ' ')
                                                   
2022-05-31 23:42:37.170 T:26504   ERROR <general>: 
2022-05-31 23:42:37.170 T:26504   DEBUG <general>: [cdART Manager] - b'!!Unable to open page http://musicbrainz.org/ws/2/release-group/?query="The+Poison"~2 AND artist:"Bullet+for+My+Valentine"&limit=1'

Seems to me like the url is being malformed and I've yet to figure a way to correct this...

This is pretty much my first exposure to python besides editing a few scripts on webservers, sadly I'm not familiar enough with python (though I'll probably persevere for a while yet)!
Reply
Consider me "semi-active" so it might take a while until I answer... Also I'm a Java programmer so my a python skills are very, very limited Wink
But here it looks like python 3 doesn't like unencoded parameters anymore. For this special case the easy fix would be replacing the whitescpace in the url with + or %20 - so replacing
python:
release_group_url_using_release_name = '%s/ws/2/release-group/?query=release:"%s"%s AND artist:"%s"&limit=%d'
by
python:
release_group_url_using_release_name = '%s/ws/2/release-group/?query=release:"%s"%s+AND+artist:"%s"&limit=%d'
and the same with all other URLs in mb_utils.py shoud fix this one.
Reply
Thanks for taking the time to reply stef.an, and for looking into this code again! Your hints did get me a bit further, CDAM now at least attempts to create the database on first run. When trying to update it throws a TypeError:
Quote:2022-06-05 21:05:06.532 T:27040   ERROR <general>: Traceback (most recent call last):
                                                   
2022-06-05 21:05:06.532 T:27040   ERROR <general>: 
2022-06-05 21:05:06.533 T:27040   ERROR <general>:   File "C:\Users\info\AppData\Roaming\Kodi\addons\script.cdartmanager\lib\cdam_db.py", line 347, in retrieve_album_details_full
                                                       album_artist["musicbrainz_albumid"] = get_musicbrainz_release_group(
                                                   
2022-06-05 21:05:06.533 T:27040   ERROR <general>: 
2022-06-05 21:05:06.533 T:27040   ERROR <general>:   File "C:\Users\info\AppData\Roaming\Kodi\addons\script.cdartmanager\lib\mb_utils.py", line 71, in get_musicbrainz_release_group
                                                       match = re.search('''<release-group-list count="(?:.*?)">(.*?)</release-group-list>''', htmlsource)
                                                   
2022-06-05 21:05:06.533 T:27040   ERROR <general>: 
2022-06-05 21:05:06.533 T:27040   ERROR <general>:   File "C:\Program Files\Kodi\system\python\Lib\re.py", line 201, in search
                                                       return _compile(pattern, flags).search(string)
                                                   
2022-06-05 21:05:06.533 T:27040   ERROR <general>: 
2022-06-05 21:05:06.533 T:27040   ERROR <general>: TypeError: cannot use a string pattern on a bytes-like object
I tried to research how to fix this but can't figure out the correct way to make the search pattern be i.e. just bytes: like match = re.search(b'''<release-group-list count="(?:.*?)">(.*?)</release-group-list>''', htmlsource). I feel this is roughly along the right lines, but I'm implementing it wrongly.

Anyway thanks for your help!
Reply
So sock.read() returns an array of bytes now, not the plain string as before. You'll have to decode it in order to use it as a string: https://docs.python.org/3/library/stdtyp...tes.decode
tldr; use htmlsource = sock.read().decode("utf-8") instead of htmlsource = sock.read() in cdam_utils.py
Reply
(2022-06-05, 22:14)rpharrison Wrote: I tried to research how to fix this but can't figure out the correct way to make the search pattern be i.e. just bytes: like match = re.search(b'''<release-group-list count="(?:.*?)">(.*?)</release-group-list>''', htmlsource). I feel this is roughly along the right lines, but I'm implementing it wrongly.
You got this one vice versa, convert the htmlsource to string insead of the regex to bytes Smile
Reply
  • 1
  • 9
  • 10
  • 11
  • 12
  • 13(current)

Logout Mark Read Team Forum Stats Members Help
cdART Manager Script "NG"2