#1 2017-07-20 08:31:52
- ThierryM
- New member
- Registered: 2017-07-20
- Posts: 9
[Music] Add barcode search field for MusicBrainz plugin
Hi,
Thanks for your work and sharing with GCstar program.
I'm testing your program in Ubuntu 16.04 because I want to make an inventory of my music CD.
In MusicBrainz, there is a field "barcode" (UPC/EAN number) in advanced research to find the release wanted.
So, is it possible to improve the MusicBrainz search plugin in order to get the album informations from the barcode ?
I tried to see the file /usr/share/gcstar/lib/GCPlugins/GCmusics/GCMusicBrainz.pm in order to add this feature but my programming skill is very limited .
In MusicBrainz, here the search address with the barcode "4007193532758" :
Code:
https://musicbrainz.org/search?query=barcode%3A4007193532758&type=release&advanced=1
To obtain the xml informations :
Code:
https://musicbrainz.org/ws/1/release/?query=barcode:042282834423
Here the xml informations :
Code:
<metadata> <release-list count="2" offset="0"> <release id="256922e9-1be4-44de-87f8-13ec9aa23a7b" type="Compilation Official" ext:score="100"> <title>Now That’s What I Call Quite Good</title> <text-representation language="ENG" script="Latn"/> <artist id="e7516564-6f1e-4adc-a245-e481d56c2d9b"> <name>The Housemartins</name> <sort-name>Housemartins, The</sort-name> </artist> <release-event-list> <event date="1988" country="CA" catalog-number="422 828 344-2" barcode="042282834423" format="CD"> <label id="d348ac6f-0fb1-4d28-b95c-814eb9ad17ef"> <name>Go! Discs</name> </label> </event> </release-event-list> <disc-list count="1"/> <track-list count="24"/> </release> </release-list> </metadata>
For those interested, I added the file in this message.
Thanks for your help, regards,
Thierry
Last edited by ThierryM (2017-07-20 15:06:40)
Offline
#2 2017-07-21 14:56:42
Re: [Music] Add barcode search field for MusicBrainz plugin
Hi Thierry
Thanks for the detailed report of the feature you want. Using the information, I modified the plugin to support the search using EAN (chose the field ISRC/EAN for the query) and to support importation using the scanner.
Since I'm not using this plugin, I did some really minimal testing.
The modifications are available in the Test branch of the GitLab repo I use to track the latest updates on GCstar.
If you extract the lib/gcstar directory from the archive of the Git branch to the right place under /usr/share, you should be able to test the new version.
Hope it helps.
Offline
#3 2017-07-23 14:26:46
- ThierryM
- New member
- Registered: 2017-07-20
- Posts: 9
Re: [Music] Add barcode search field for MusicBrainz plugin
Hi Kerenoc,
You are a whizz ;-) ! I 've just tested your improvement and it works exactly as expected : now with my barcode scanner, I can obtain immediatly the right album in MusicBrainz (if the barcode information existes). This new feature makes Gcstar THE perfect tool for me.
Thank you very much for your work and sharing.
Best regards,
Thierry
Offline
#5 2017-08-01 15:12:14
- ThierryM
- New member
- Registered: 2017-07-20
- Posts: 9
Re: [Music] Add barcode search field for MusicBrainz plugin
Hi Kerenoc,
I don't think if there is a link but since I installed the new plugin, the pictures of CD covers aren't displayed.
I've renammed the hidden repertory with the pictures, added new picture in the new directory but no cover displayed.
I use GCStar in Ubuntu 16.04 in french.
Regards,
Thierry
Last edited by ThierryM (2017-08-01 15:13:13)
Offline
#6 2017-08-01 16:51:25
- ThierryM
- New member
- Registered: 2017-07-20
- Posts: 9
Re: [Music] Add barcode search field for MusicBrainz plugin
Hi, I've found why the pictures aren't displayed : my repertory name had an è (e with an accent). So there's a problem with the localization.
Regards,
Thierry
Offline
#8 2017-08-02 09:24:49
- ThierryM
- New member
- Registered: 2017-07-20
- Posts: 9
Re: [Music] Add barcode search field for MusicBrainz plugin
Hi Kerenoc,
Yes the problem seems the same. But I can't go ahead because in my .gcs file the paths for the covers are all empty.
Regards,
THierry
Offline
#9 2017-08-03 08:14:59
Re: [Music] Add barcode search field for MusicBrainz plugin
Hello
So it seems to be an old problem that may not be solved. I checked the lastest version of GCstar from GitLab on an Ubuntu 16.04 with Perl 5.22.1 and couldn't reproduce the problem (ok with directory name with accents, collection name with accents, collection item from MusicBrainz with accents).
Maybe its the way Perl is processing the localisation variables (LC_ALL, LANG, LANGUAGE....)?
Offline
#10 2017-08-06 11:14:12
- ThierryM
- New member
- Registered: 2017-07-20
- Posts: 9
Re: [Music] Add barcode search field for MusicBrainz plugin
Hi,
Thanks for your help.
I'm under Ubuntu 16.04 and perl v5.22.1 built for x86_64-linux-gnu-thread-multi. I think that there is a problem on my laptop with locale (misconfiguration). The accent problem seems only for the directory name (and in the picture files names where all the special characters are remplaced by underscore _).
Regards,
Thierry
Offline
#11 2017-08-07 12:28:24
Re: [Music] Add barcode search field for MusicBrainz plugin
Reading the code, it appears that introducing underscores in image names was made on purpose (GCUtils file) to avoid portability problems related to accentuated characters. But the same strategy was not used for directory names, hence possible problems introduced by the possible mishandling of language's settings in Perl (currently trying to solve that for Windows!).
Anyhow one can alway choose to avoid non ASCII characters in directory names to avoid these problems and keep using GCstar.
Offline
#12 2017-08-07 15:41:25
- ThierryM
- New member
- Registered: 2017-07-20
- Posts: 9
Re: [Music] Add barcode search field for MusicBrainz plugin
Thanks for your response.
So the workaround is to avoid non ASCII characters in directory names.
Regards,
Thierry
Offline
Should you have a problem using GCstar, you can open a bug report or request some support on GCstar forums.