# Barcode automatisch einfügen

**URL:** https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796
**Category:** Allgemein
**Created:** [March 31, 2011, 7:28am UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796 "2011-03-31T07:28:06Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Mabba](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mabba/32/8464_2.png) [@Mabba](https://community.mp3tag.de/u/Mabba)
#### Post date: [March 31, 2011, 7:28am UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/1 "2011-03-31T07:28:06Z")

</div>

Wunderschönen guten Tag miteinander,

welch herrliches Wetter heute hier in der Schweiz. Ich sitze im Büro bei mir zuhause, bei offenem Fenster und geniesse es.  
Ich habe folgendes Problem, dass ich bis jetzt noch nicht lösen konnte.

Meine Tags hole ich mir von Discogs, da habe ich alle Informationen die ich benötige. Geht alles wunderbar, bis auf zwei Sachen.

- Barcode and Other Identifiers

Was muss ich anstellen, damit mir die Barcode in ein Feld übertragen wird und den Rest von Barcode and **Other Identifiers** in ein anderes Feld (siehe Bild) übernommen wird.

[![](http://img862.imageshack.us/img862/6168/automatischereintragmgl.jpg)](http://img862.imageshack.us/i/automatischereintragmgl.jpg/)

Ich benutze vorwiegen die Scripte von [[WS] Discogs (pone mod) ](https://community.mp3tag.de/t/9226/1).

Da mein englisch nur grad für Good Morning, Good Afternoon und Good Evening reicht, hab ich mir erlaubt hier rein zu schreiben. Wenn es hier nicht passt, bitte dementsprechend verschieben.  
Herzlichen Dank.

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [March 31, 2011, 2:54pm UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/2 "2011-03-31T14:54:41Z")

</div>

> [@Mabba](#):
>
> Meine Tags hole ich mir von Discogs, da habe ich alle Informationen die ich benötige. Geht alles wunderbar, bis auf zwei Sachen.
> 
> - Barcode and Other Identifiers
> 
> Was muss ich anstellen, damit mir die Barcode in ein Feld übertragen wird und den Rest von Barcode and **Other Identifiers** in ein anderes Feld (siehe Bild) übernommen wird.
> 
> Ich benutze vorwiegen die Scripte von [[WS] Discogs (pone mod) ](https://community.mp3tag.de/t/9226/1).

Die zunehmende Beliebtheit meines Scriptes freut mich, da schau ich auch gern, ob ich es noch verbessern kann.

Du hast die Scripte bereits soweit editiert, dass Notes und Credit in eigenen Feldern landen, wie ich sehe. Machst du das für jedes meiner Scripte einzeln oder mit einem Tool, dass das bei allen gleichzeitig ersetzt?

Die Barcodes and Other Identifiers gibt es noch gar nicht so lange bei Discogs. Als die das einführten hab ich das bis jetz ignoriert, da ich eigentlich der Meinung bin, dass das für mp3s wirklich nicht mehr interessant ist. Oft weiß man ja auch gar nicht, von welchem von mehreren Discogs release eines Albums die mp3s jetzt stammen.  
Aber wenn dir das wirklich wichtig ist, kann ich versuchen, das mit einzubauen. Machbar müßte es auf alle Fälle sein.

---

<div class="post-metadata">

### Author: ![Mabba](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mabba/32/8464_2.png) [@Mabba](https://community.mp3tag.de/u/Mabba)
#### Post date: [March 31, 2011, 4:21pm UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/3 "2011-03-31T16:21:55Z")

</div>

> [@pone](#):
>
> Die zunehmende Beliebtheit meines Scriptes freut mich, da schau ich auch gern, ob ich es noch verbessern kann.
> 
> Du hast die Scripte bereits soweit editiert, dass Notes und Credit in eigenen Feldern landen, wie ich sehe. Machst du das für jedes meiner Scripte einzeln oder mit einem Tool, dass das bei allen gleichzeitig ersetzt?
> 
> Die Barcodes and Other Identifiers gibt es noch gar nicht so lange bei Discogs. Als die das einführten hab ich das bis jetz ignoriert, da ich eigentlich der Meinung bin, dass das für mp3s wirklich nicht mehr interessant ist. Oft weiß man ja auch gar nicht, von welchem von mehreren Discogs release eines Albums die mp3s jetzt stammen.  
> Aber wenn dir das wirklich wichtig ist, kann ich versuchen, das mit einzubauen. Machbar müßte es auf alle Fälle sein.

Danke für die schnelle Antwort.  
Ich habe das Script **Discogs &Pone 2.7# Direct by Discogs &ID.src** manuell abgeändert. Die anderen müsste ich noch.  
Probiert habe ich bisher mit %barcode%, aber das hat nur im Export funktioniert, nicht aber im Script selber, bin da aber nicht unbedingt sehr geschickt in sowas.  
Gerade weil ich so viele CD's habe mit verschiedenen releases, ist es für mich wichtig die anderen, eigentlich die gesamte Informationen so zu haben bzw. zu kriegen.  
Demnächst fange ich mit meiner Plattensammlung an, zu digitalisieren, da wären das natürlich super, wenn das gehen würde.

Bald ist Wochenende, da habe ich wieder ein bisschen Zeit rumzutesten. Kann mich dann immer wie ein kleines Kind freuen wenn mir wieder was gelingt.

Danke im voraus für Deine Mühe.

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [March 31, 2011, 4:36pm UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/4 "2011-03-31T16:36:53Z")

</div>

Im Script muss mann erst eine Teil einbauen, der die Informationen von der Discogs Seite findet, richtig liest und voneinander trennt. Das ist die Hauptarbeit dabei.  
Wie das Tag-Feld dann heißt, in das die Info geschrieben werden soll, ist Nebensache.

Ich arbeite momentan an einem besseren Editierbarkeit meiner Skripte, weil verschiedene User immer wieder spezielle Wünsche für Feldernamen haben. Wenn mir das gelingt, bau ich auch deinen Wunsch mit ein.

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [March 31, 2011, 5:08pm UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/5 "2011-03-31T17:08:38Z")

</div>

das ist für dich:

```
# Barcodes & Other Identifiers
gotoline 3
findline "class=\"section major barcodes" 1 1
unspace
if "<div class=\"section major barcodes"
    findline "section_content\">"
    joinuntil "</div></div>"
    
    outputto "Barcode"
    sayregexp "(?<=<span class=\"type\">Barcode</span>:).*?(?=</div>)" ", "
    regexpreplace "<span class=\"type\">Barcode</span>:.*?</div>" ""
    
    outputto "Other Identifiers"
    regexpreplace "([^>]*), The" "The $1"
    replace "</a>*" ""
    replace "|" "/"
    replace ">Barcode and Other Identifiers<" ""
    regexpreplace "\s{2,}" " "
    regexpreplace "<div>" "\r\n"
    regexpreplace "<[^>]+>" ""
    regexpreplace " \(\d\)" ""
    regexpreplace " \(\d\d\)" ""

    say "Other Identifiers:"
    SayNewline
    sayrest
    SayNewline
    SayNewline
endif

```

Füge diesen Code einfach am Ende des Scripts an.  
Macht ziemlich genau das, was du wolltest.  
Trennt Barcode und Other Identifiers und schreibt zwei neue Felder

**Tipp für dich:**  
analog zu Credits und Notes enthält auch dieser Code die Zeilen:

_say "Other Identifiers:"  
SayNewline  
sayrest  
SayNewline  
SayNewline_

Die ersten zwei Zeilen fügen nur die Überschrift am Anfang des Tag Feldes hinzu, zur Kennzeichnung im UNSYNCEDLYRICS Feld wohin ich diese Infos ursprünglich schreibe.  
Die letzen zwei Zeilen fügen nur einena Abstand am Schluss hinzu.

Da du das alles in extra Felder schreibst, brauchst du eigentlich nur die mitterel Zeile:  
_sayrest_

Eigentlich ist es bei meinem Skript schon Quatsch, dass nach Notes noch leere Zeilen hinzugefügt werden. Hab das wohl einfach genauso gemacht wie bei Credits ohne groß mitzudenken. Ist mir jetzt erst aufgefallen.

**Frage:**  
Gibt es Discogs Releases mit mehreren Barcodes?  
Wenn ja, wie wären diese am sinnvollsten zu trennen? Mit Komma, mit Zeilenumbruch, oder gleich als Multivalue Tag Fields?

---

<div class="post-metadata">

### Author: ![Mabba](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mabba/32/8464_2.png) [@Mabba](https://community.mp3tag.de/u/Mabba)
#### Post date: [April 2, 2011, 4:38am UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/6 "2011-04-02T04:38:01Z")

</div>

![:w00t:](https://community.mp3tag.de/uploads/default/original/1X/cb01eca72fe9339ff6f3ec9f1e3c5fe002be0f0a.gif ":w00t:") Super, vielen Dank, funktioniert wunderbar.  
Tschuldigung, einfach nur geil dieses Programm, wirklich. ![:music:](https://community.mp3tag.de/uploads/default/original/1X/2ba05d1ade5eb0d15fc173be6f717dbe63890a70.gif ":music:")

---

<div class="post-metadata">

### Author: ![Mabba](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mabba/32/8464_2.png) [@Mabba](https://community.mp3tag.de/u/Mabba)
#### Post date: [April 2, 2011, 4:44am UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/7 "2011-04-02T04:44:27Z")

</div>

> [@pone](#):
>
> das ist für dich:  
> ....  
> [/code]
> 
> Füge diesen Code einfach am Ende des Scripts an.  
> Macht ziemlich genau das, was du wolltest.  
> Trennt Barcode und Other Identifiers und schreibt zwei neue Felder

Danke, werde ich mir gut aufheben.

> [@](#):
>
> **Tipp für dich:**  
> analog zu Credits und Notes enthält auch dieser Code die Zeilen:
> 
> [i]say "Other Identifiers:"
> 
> Eigentlich ist es bei meinem Skript schon Quatsch, dass nach Notes noch leere Zeilen hinzugefügt werden. Hab das wohl einfach genauso gemacht wie bei Credits ohne groß mitzudenken. Ist mir jetzt erst aufgefallen.

Ja, man lernt nie aus....

> [@](#):
>
> **Frage:**

> [@](#):
>
> Gibt es Discogs Releases mit mehreren Barcodes?

Habe ich persönlich noch nie gesehen, werde aber mal ein Auge drauf werfen.

> [@](#):
>
> Wenn ja, wie wären diese am sinnvollsten zu trennen? Mit Komma, mit Zeilenumbruch, oder gleich als Multivalue Tag Fields?

Denke Mehrzeilig untereinander.

So, und nun geniesse ich meinen Feiermorgen (hatte Nachtdienst) und die wunderbar strahlende Sonne. Einfach nur herrlich wie die Natur wieder zum leben erwacht.

---

<div class="post-metadata">

### Author: ![Mabba](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mabba/32/8464_2.png) [@Mabba](https://community.mp3tag.de/u/Mabba)
#### Post date: [April 2, 2011, 5:10am UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/8 "2011-04-02T05:10:20Z")

</div>

Ist es recht wenn ich hier Fehler melde die ich finde oder ist ein anderer Ort besser?

Hier [http://www.discogs.com/Elvis-Presley-Elvis...release/1640082](http://www.discogs.com/Elvis-Presley-Elvis-2nd-To-None/release/1640082) werden die Notes mit \>Error\> übernommen,  
[![](http://img716.imageshack.us/img716/4248/barcodemp3tagboard001.jpg)](http://img716.imageshack.us/i/barcodemp3tagboard001.jpg/)

Barcode wird nicht übenommen und er der Rest von Barcode ebenso bei Other Identiers.

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [April 2, 2011, 6:39am UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/9 "2011-04-02T06:39:45Z")

</div>

Danke für die Fehlermeldung  
Genau richtig hier, da das ja in meinem "offiziellen" Skript noch nicht eingebaut ist und da auch keine Fehlermeldung erscheint.

Seh auch schon an was das liegt. Ich dachte alle Discogs Releases hätten die "Recommendations" am Schluss und hab das für das Skript genutzt, um das End der "Barcodes and Other Identifiers" Sektion zu erkennen.  
Das Elivs Releas hat keine Recommendations, also findet das Skript das Ende nicht und zeigt .

Werd das ganze deinem Wunsch gemäß in das nächste Update einbauen.

Ist die Trennung von Barcode und Other Identifiers in zwei Felder wichtig?

EDIT:  
Hab den obenstehenden Code nochmal editiert.  
Jetzt funktioniert er auch bei dem Elvis Release.

---

<div class="post-metadata">

### Author: ![Mabba](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mabba/32/8464_2.png) [@Mabba](https://community.mp3tag.de/u/Mabba)
#### Post date: [April 2, 2011, 8:49am UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/10 "2011-04-02T08:49:51Z")

</div>

Schnelle Reaktion, nein, die Trennung ist nicht wichtig.

Werde es grad mal austesten.

> [@](#):
>
> Werd das ganze deinem Wunsch gemäß in das nächste Update einbauen.

Super, da freue ich mich schon darauf.

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [April 2, 2011, 4:18pm UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/11 "2011-04-02T16:18:49Z")

</div>

> [@Mabba](#):
>
> Super, da freue ich mich schon darauf.

Hier ist ne Vorschau!

Erst in der mp3 die Werte so anpassen, wie du es haben willst.  
Dann die mp3 mit dem Export Script exportieren, das erzeugt dann das Web Source Script.

Hab die Optionen (in der mp3) so angepasst wie du das willst. Zur Anpassung der Optionen, die mp3 in Mp3tag laden, die Erweiterte Tag Ansicht aufrufen und alle Tagfelder anpassen.

Discogs\_... Felder jeweils der gewünschte Feldname oder **no** wenn du das Feld nicht willst  
Option:... Felder jeweils **yes** oder **no**

Die Vorschau ist jetzt nur für das Search by Release ID Skript. Wahrscheinlich kommen auch noch mehrere andere Optionen hinzu.

[\_\_\_First\_Test\_Discogs\_Script\_Export.mte](https://community.mp3tag.de/uploads/default/original/2X/a/a48db16f5bc739b0e5b0ddbd6636d23230d55967.mte) (9.55 KB)

[\_FAKE\_MP3\_Pone\_Discogs.mp3](https://community.mp3tag.de/uploads/default/original/2X/1/1d1ab7bf9271778a2741cc94a5904ff594b8761f.mp3) (13.3 KB)

---

<div class="post-metadata">

### Author: ![Mabba](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mabba/32/8464_2.png) [@Mabba](https://community.mp3tag.de/u/Mabba)
#### Post date: [April 5, 2011, 9:01am UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/12 "2011-04-05T09:01:36Z")

</div>

> [@pone](#):
>
> Hier ist ne Vorschau!
> 
> Erst in der mp3 die Werte so anpassen, wie du es haben willst.  
> Dann die mp3 mit dem Export Script exportieren, das erzeugt dann das Web Source Script.
> 
> Hab die Optionen (in der mp3) so angepasst wie du das willst. Zur Anpassung der Optionen, die mp3 in Mp3tag laden, die Erweiterte Tag Ansicht aufrufen und alle Tagfelder anpassen.
> 
> Discogs\_... Felder jeweils der gewünschte Feldname oder **no** wenn du das Feld nicht willst  
> Option:... Felder jeweils **yes** oder **no**
> 
> Die Vorschau ist jetzt nur für das Search by Release ID Skript. Wahrscheinlich kommen auch noch mehrere andere Optionen hinzu.

Danke, werde ich demnächst mal ausporbieren.

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [April 5, 2011, 9:26am UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/13 "2011-04-05T09:26:37Z")

</div>

Mitlerweile ist auch das Update (3.0) online.  
[/t/9226/1](https://community.mp3tag.de/t/9226/1)

Deine Einstellungen wären dann:  
DISCOGS\_BARCODES AND OTHER IDENTIFIERS = other identifiers  
DISCOGS\_CREDITS = credits  
DISCOGS\_NOTES = notes  
DISCOGS~BARCODES (SEPARATED FROM OTHER IDENTIFIERS) = barcode

---

<div class="post-metadata">

### Author: ![Mabba](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mabba/32/8464_2.png) [@Mabba](https://community.mp3tag.de/u/Mabba)
#### Post date: [April 11, 2011, 12:10am UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/14 "2011-04-11T00:10:05Z")

</div>

😲 was hat discogs gemacht? Jetzt funktioniert es nicht mehr.  
In der zwischenzeit hatte ich einen gewaltigen Absturz und musste den ganzen PC neu aufsetzen, natürlich ist alles an Einstellungen weg. 😳  
Jetzt geht das proben wieder los.

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [April 11, 2011, 12:51am UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/15 "2011-04-11T00:51:50Z")

</div>

Ähm, du hast schon einen Blick in den eigentlichen Thread geworfen oder?  
[/t/9226/1](https://community.mp3tag.de/t/9226/1)  
Zwecks Discogs Änderungen vor ein paar Tagen. Script ist längst wieder upgedatet und funktioniert wunderbar. Sitz gerade vorm Rechner und bearbeite meine eingene Sammlung.

Welch Einstellungen meinst du denn? Für meine Skript brauchst du ja nur meine _Discogs Pone Web Script Settings.mp3_ Datei. Da hab ich ja alle deine Wünsche in die Optionen eingearbeitet.

---

<div class="post-metadata">

### Author: ![Mabba](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mabba/32/8464_2.png) [@Mabba](https://community.mp3tag.de/u/Mabba)
#### Post date: [April 11, 2011, 2:27am UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/16 "2011-04-11T02:27:16Z")

</div>

Wow, schon auf oder noch wach?  
Ja, habe ich gesehen, mein Gehirn war wohl noch nicht richtig wach.  
Werde mich heute damit intensiv Befassen.  
Wenn ich wach bin. ![:rolleyes:](https://community.mp3tag.de/uploads/default/original/1X/3a79e8b0b7d169b30216785521d7c6f4f895c421.gif ":rolleyes:")

//Edit:  
Ich habs hingekriegt. War wirklich noch nicht wach.

---

<div class="post-metadata">

### Author: ![Mabba](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mabba/32/8464_2.png) [@Mabba](https://community.mp3tag.de/u/Mabba)
#### Post date: [April 15, 2011, 10:47am UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/17 "2011-04-15T10:47:29Z")

</div>

Was ist hier falsch, dass es wieder nicht geht?  
Hab jetzt komplett alles neu installiert, das neueste Script runtergeladen, yes und no gesetzt, geht trotzdem nicht:

 

```
[Name]=discogs.com (Pone Mod 3.3)
[BasedOn]=www.discogs.com
[AlbumUrl]=http://www.discogs.com/release/
[SearchBy]=$if2(%discogs_release_id%,$if2(%DISCOGS_RELEASE_ID%,$if2(%DISCOGSID%,%DISCOGS-ID%)))

[ParserScriptAlbum]=...
##debug "on" "d:\\\\discogs_album.txt"#debugwriteinput "d:\\\\discogs_album_input.html"

# DISCOGS_RELEASE ID
outputto "discogs_release_id"
findline "link rel=\"canonical\""
findinline "/release/"
saynextnumber

# DISCOGS_RELEASE URL
outputto "www"
say "http://www.discogs.com/release/"
sayoutput "discogs_release_id"

# Coverurl
outputto "coverurl"
findline "class=\"image"
joinuntil ""

```

 

findinline "img src=" 1 1  
if """  
movechar 1  
sayuntil "-150-"  
movechar 4  
sayuntil """  
endif

 
# DISCOGS\_ALBUMARTIST
 

outputto "albumartist"  
findline "class="profile"  
findline "href="/artist"  
joinuntil ""  
replace "-" "-"  
findinline ""\>"  
regexpreplace "\s{2,}" " " #changes two or more spaces into one space  
replace "|" "/"  
replace "_" "" #kills the \* for discogs artist name variations  
regexpreplace " (\d{1,2})" ""   
regexpreplace "([^\>]_), The" "The $1"  
replace "href="/artist/Various"\>Various" "href="/artist/Various"\>va"  
regexpreplace "\<[^\>]+\>" "" #removes all html tags  
sayuntil "–"

 
# Album
 

outputto "album"  
findinline "–"  
sayuntil ""

 
# DISCOGS\_LABEL
 

outputto "publisher"  
findline "class="head"\>Label:"  
findline "\<div" 2 1  
joinuntil ""  
replace "\>, \<" "\>\\\<"  
killtag "\*"  
regexpreplace "^\s+Label:\s+" ""  
regexpreplace "\s,\s{2,}" ", "  
replace " \\ " "\\"

 

regexpreplace " (\d{1,2})" ""   
regexpreplace "([^\>]\*), The" "The $1"  
sayrest

 
# DISCOGS\_CATALOG#
 

outputto "catalog #"  
findline "class="head"\>Catalog#:"  
findline "\<div" 2 1  
joinuntil ""  
regexpreplace "\s{2,}" " "   
replace ", " "\\"  
findinline "content"\>"  
sayuntil ""

 
# DISCOGS\_FORMAT, DISCOGS\_TOTALDISCS, DISCOGS\_MEDIATYPE & DISCOGS\_RELEASETYPE
 

outputto "discogs\_mediatype"  
findline "class="head"\>Format:"  
moveline 1 1  
joinuntil ""

 

outputto "total disc"  
sayregexp "(?\<=\>).+?(?=×)" "; "

 

outputto "mediatype"  
regexpreplace "(\<a href="/explore?fmt=.+?)+(.+?"\>)" "$1 $2"  
regexpreplace "(\<a href="/explore?fmt=.+?)+(.+?"\>)" "$1 $2"  
regexpreplace "(\<a href="/explore?fmt=.+?)+(.+?"\>)" "$1 $2"  
regexpreplace "\</?(i|b|u)\>" ""  
sayregexp "(?\<=\<a href="/explore?fmt=).+?(?="\>)" "; "

 

outputto "release type"  
sayregexp "(?\<=,).+?(?=  
)" "; "

 

outputto "discogs\_mediatype"  
replace "×" "x"  
regexpreplace "  
\*" ""  
replace "  
" ";"  
regexpreplace "\<[^\>]+\>" ""  
regexpreplace "^\s{0,}Format:\s+" ""  
regexpreplace "\s+(,|:wink:\s{1,}" "$1 "  
regexpreplace "\s+" " "  
sayrest

 
# DISCOGS\_COUNTRY
 

outputto "country"  
findline "class="head"\>Country:"  
findline "\<div" 2 1  
joinuntil ""  
regexpreplace "\<[^\>]+\>" ""  
sayrest

 
# DISCOGS\_YEAR
 

outputto "year"  
findline "class="head"\>Released:" 1 1  
findline "&year=" 1 1  
findinline "&year" 1 1  
if "="  
joinuntil ""  
findinline "=" 1 1  
sayuntil """

 
# DISCOGS\_DATE
 

outputto "date"  
unspace  
regexpreplace "\<[^\>]+\>" ""  
replace "Jan" "-01-"  
replace "Feb" "-02-"  
replace "Mar" "-03-"  
replace "Apr" "-04-"  
replace "May" "-05-"  
replace "Jun" "-06-"  
replace "Jul" "-07-"  
replace "Aug" "-08-"  
replace "Sep" "-09-"  
replace "Oct" "-10-"  
replace "Nov" "-11-"  
replace "Dec" "-12-"  
regexpreplace "[^-0-9]" ""

 

regexpreplace "(\d\d)-(\d\d)-(\d\d\d\d)" "$3-$2-$1"  
regexpreplace "-(\d\d)-(\d\d\d\d)" "$2-$1-00"  
regexpreplace "(\d\d\d\d)$" "$1-00-00")  
sayrest

 

endif

 
# DISCOGS\_STYLE
 

outputto "genre"  
GotoLine 3  
findline "Style:"  
moveline 1 1  
joinuntil ""  
findinline "class="content"\>" 1 1  
findinline "\<"  
if "a href"  
killtag "\*"  
regexpreplace "\s+" " "  
replace " , " "\\"  
sayrest  
say "\\"  
endif

 
# DISCOGS\_GENRE
 

outputto "genre"  
GotoLine 3  
findline "Genre:"  
moveline 1 1  
joinuntil ""  
killtag "\*"  
regexpreplace "\s+" " "  
regexpreplace "\s+$" ""  
replace " , " "\\"  
sayrest

 
# Tracklist:
 

gotoline 3  
findline "Tracklist"  
findline "class="track\_pos"\>"  
do  
if "&nbsp;" # empty table row | I think this was for one track

 

```
                                       releases & discogs has changed its page so this can deleted, 
                                       but I am not sure	
   	exit
else	
	# DISCOGS_DISCNUMBER
	outputto "discnumber"	
	killtag "*"
	sayregexp "\d\d?(?=(\.|-))" ""
	say "|"

   
	# DISCOGS_TRACK POSITION
	outputto "yes"    
	sayregexp "(?<=\d-)\d+" ""
	sayregexp "(?<=\d\.)\d+" ""
	sayregexp "[A-Z]+\d*" ""
	say "|"

	# DISCOGS_ARTIST
	outputto "artist"
	unspace
	findline "<td class=\"track_artists" 1 1
      joinuntil "</td>"
      replace "&nbsp;-&nbsp;" ""
	replace "&ndash;" ""
	replace "|" "/"
	replace "</a>*" "</a>"
	regexpreplace " \(\d{1,2}\)</a>" "</a>"	
	regexpreplace "([^>]*), The</a>" "The $1</a>"
	killtag "*"
	regexpreplace "^ *$" "XXX-ALBUMARTIST-XXX"
	if "XXX-ALBUMARTIST-XXX"
		sayoutput "albumartist"
	else
		regexpreplace "\s{2,}" " "
		sayrest
	endif
	findline "<td"	
	say "|"

      # Title
	outputto "Tracks"
	unspace        
	joinuntil "</span>"
	regexpreplace "<[^>]+>" ""
	regexpreplace "\s\(\d?\d:\d\d\)" ""
	regexpreplace "^\s+" ""
	replace "|" "/"
	sayuntil "</span>"
	say "|"

	# DISCOGS_EXTRA ARTISTS

   	outputto "mixartist"
	findline "<"
	unspace
	if "<blockquote>"
		joinuntil "</blockquote>"
		regexpreplace "

```

 

" ";  
"  
regexpreplace "  
" ";  
"  
regexpreplace "([^\>]_), The" "The $1"  
replace "_" ""  
killtag "\*"  
regexpreplace "\s{2,}" " "  
regexpreplace "\s," ","  
regexpreplace "\s;" ";"  
regexpreplace " (\d{1,2})" ""   
replace " – " ": "  
sayrest   
endif  
say "|"

 

```
	# _Length
	outputto "_LENGTH"
	findline "class=\"track_duration" 1 1
	joinuntil "</td>"
	sayregexp "(?<=<span>).+?(?=</span>)"
	say "|"

	findline "class=\"track_pos\"" 1 1
	findinline "class=\"track" 1 1
endif

```

 

while "\_pos""

 
# DISCOGS\_TRACK INDEX (Chapter)
 

gotoline 3  
outputto "chapter"  
findline "Tracklist"  
findline "\<table"  
joinuntil ""  
regexpreplace "(\<td._?class="track\_index"\>)(.+?)()" "$1@@@@$2@@$3"  
regexpreplace "(\<td._?class="track\_pos"\>)(.+?)()" "$1µ§$2$3"  
regexpreplace "._?"(?:track\_pos|track\_index)"\>(.+?)._?" "$1"  
regexpreplace "(._@@._?) +._" "$1@@"  
regexpreplace "^@@(._)" "$1"  
ifnot "@@"  
regexpreplace "(.+)" "@@@@$1"  
endif  
regexpreplace "@@(._?)@@(._?)@@" "$2@@$1@@@@"  
regexpreplace "\s{2,}" " "  
findinline "µ" 1 1  
do  
sayregexp "(?\<=@@)[^\<]+" ", " "@@@@"  
say "|"  
findinline "µ" 1 1  
while "§"

 
# DISCOGS\_TOTALTRACKS
 

outputto "total tracks"  
gotoline 3  
findline "Tracklist"  
findline "\<table"  
joinuntil ""  
regexpreplace "class="track\_pos"" "\<\<\>\>I\<\<\>\>"  
regexpreplace "._?(\<\<\>\>._\<\<\>\>)._" "$1"  
regexpreplace "\<\<\>\>[^I]._?\<\<\>\>" "\<\<\>\>"  
replace "\<\<\>\>" ""  
replace "IIIIIIIIII" "X"  
replace "XXXXXXXXXX" "C"  
replace "CI" "C0I"  
regexpreplace "X$" "X0"  
regexpreplace "C$" "C00"  
replace "CCCCCCCCC" "9"  
replace "CCCCCCCC" "8"  
replace "CCCCCCC" "7"  
replace "CCCCCC" "6"  
replace "CCCCC" "5"  
replace "CCCC" "4"  
replace "CCC" "3"  
replace "CC" "2"  
replace "C" "1"  
replace "XXXXXXXXX" "9"  
replace "XXXXXXXX" "8"  
replace "XXXXXXX" "7"  
replace "XXXXXX" "6"  
replace "XXXXX" "5"  
replace "XXXX" "4"  
replace "XXX" "3"  
replace "XX" "2"  
replace "X" "1"  
replace "IIIIIIIII" "9"  
replace "IIIIIIII" "8"  
replace "IIIIIII" "7"  
replace "IIIIII" "6"  
replace "IIIII" "5"  
replace "IIII" "4"  
replace "III" "3"  
replace "II" "2"  
replace "I" "1"  
sayrest

 
# Delete Alumbartist for Single-Artist-Releases
 

gotoline 3  
findline "Tracklist"  
findline "\<table"  
joinuntil ""  
regexpreplace "._class="track\_artists"\>\s_\<a href="/artist.\*" "\<\<\>\>"  
ifnot "\<\<\>\>"

 

endif

 
# DISCOGS~PONE MULTILINE FIELD = yes
 
# DISCOGS\_CREDITS
 

outputto "credits"  
gotoline 3  
findline "class="section major credits" 1 1  
unspace  
if "\<div class="section major credits"  
findline "section\_content"\>"  
joinuntil ""  
regexpreplace "([^\>]_), The" "The $1" replace "_" ""  
replace "|" "/"  
regexpreplace "\s{2,}" " "  
regexpreplace "\s\*\<br /\>\s\*" "\r\n"  
regexpreplace "\s\*\s\*" "\r\n"  
regexpreplace "\<[^\>]+\>" ""  
replace " – " ": "  
regexpreplace " (\d{1,2})" ""

 

```
sayrest

```

 

endif

 
# DISCOGS\_NOTES
 

outputto "notes"  
gotoline 3  
findline "class="section major notes" 1 1  
unspace  
if "\<div class="section major notes"  
findline "section\_content"\>"  
joinuntil ""  
regexpreplace "([^\>]_), The" "The $1" replace "_" ""  
replace "|" "/"  
replace "\>Notes\<" ""  
regexpreplace "\s{2,}" " "  
regexpreplace "\s\*\<br ?/?\>\s\*" "\r\n"  
regexpreplace "

" "\r\n\r\n"  
regexpreplace "\<[^\>]+\>" ""  
regexpreplace " (\d{1,2})" ""

 

```
sayrest

```

 

endif

 
# DISCOGS\_BARCODES AND OTHER IDENTIFIERS
 

outputto "yes"  
gotoline 3  
findline "class="section major barcodes" 1 1  
unspace  
if "\<div class="section major barcodes"  
findline "section\_content"\>"  
joinuntil ""  
outputto "yes"  
sayregexp "(?\<=

- Barcode: )._?(?=_
_)" "; "  
regexpreplace "_- _Barcode:._?
" ""  
outputto "yes"   
replace "_" ""  
replace "|" "/"  
replace "\>Barcode and Other Identifiers\<" ""  
regexpreplace "\s{2,}" " "  
regexpreplace "\s_\s\*" "\r\n"  
regexpreplace "\<[^\>]+\>" ""  
unspace  
regexpreplace "\A\Z" "\<\<\>\>"  
ifnot "\<\<\>\>"  
say "Other Identifiers:"  
SayNewline  
sayrest  
SayNewline  
SayNewline  
endif   
endif

 
# Discogs Rating
 

outputto "rating"  
findline "\<span class="rating\_value rating\_value" 1 1  
findinline "\>" 1 1  
sayuntil "\<"

 
# Copy Fields
 

outputto "no"  
sayoutput "no"

 

outputto "no"  
sayoutput "no"

 

outputto "no"  
sayoutput "no"

 

outputto "no"  
sayoutput "no"

 

outputto "no"  
sayoutput "no"

 

Set "no"

 

//edit:  
Ohje, entschuldigung, im moment klappts wieder. Discgos soll jetzt bloss nichts mehr ändern, bis ich nicht alles fertig habe.

///edit:  
Doch nicht. Dabei habe ich nichts mehr geändert.

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [April 15, 2011, 4:10pm UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/18 "2011-04-15T16:10:20Z")

</div>

QUOTE (Mabba @ Apr 15 2011, 14:47) \<{POST\_SNAPBACK}\>

Was ist hier falsch, dass es wieder nicht geht?

Hab jetzt komplett alles neu installiert, das neueste Script runtergeladen, yes und no gesetzt, geht trotzdem nicht:

 

```
...

# DISCOGS~PONE MULTILINE FIELD = yes
# DISCOGS_CREDITS
outputto "credits"
gotoline 3
findline "class=\"section major credits" 1 1
unspace
if "<div class=\"section major credits"
	findline "section_content\">"
	joinuntil ""
regexpreplace "([^>]*), The" "The $1"	replace "</a>*" ""
replace "|" "/"
regexpreplace "\s{2,}" " "
regexpreplace "\s*<br \/>\s*" "\r\n"
regexpreplace "\s*</li>\s*" "\r\n"
regexpreplace "<[^>]+>" ""
replace " &ndash; " ": "
regexpreplace " \(\d{1,2}\)" ""

sayrest

```

 

endif

 
# DISCOGS\_NOTES
 

outputto "notes"  
gotoline 3  
findline "class="section major notes" 1 1  
unspace  
if "\<div class="section major notes"  
findline "section\_content"\>"  
joinuntil "

"  
regexpreplace "([^\>]_), The" "The $1" replace "_" ""  
replace "|" "/"  
replace "\>Notes\<" ""  
regexpreplace "\s{2,}" " "  
regexpreplace "\s\*\<br ?/?\>\s\*" "\r\n"  
regexpreplace "" "\r\n\r\n"  
regexpreplace "\<[^\>]+\>" ""  
regexpreplace " (\d{1,2})" ""

```
sayrest

```

endif

# DISCOGS\_BARCODES AND OTHER IDENTIFIERS

outputto "yes"  
gotoline 3  
findline "class="section major barcodes" 1 1  
unspace  
if "\<div class="section major barcodes"  
findline "section\_content"\>"  
joinuntil ""  
outputto "yes"  
sayregexp "(?\<=

- Barcode: )._?(?=_
)" "; "  
regexpreplace "- Barcode:.?
" ""  
outputto "yes"   
replace "_" ""  
replace "|" "/"  
replace "\>Barcode and Other Identifiers\<" ""  
regexpreplace "\s{2,}" " "  
regexpreplace "\s_\s\*" "\r\n"  
regexpreplace "\<[^\>]+\>" ""  
unspace  
regexpreplace "\A\Z" "\<\<\>\>"  
ifnot "\<\<\>\>"  
say "Other Identifiers:"  
SayNewline  
sayrest  
SayNewline  
SayNewline  
endif   
endif  
...

Hab gerade keine Zeit für eine ausführliche Überprüfung.  
Nur so viel fällt mir sofort auf:

1. Mein Skript funktioniert im Moment. Also ist das Skript an sich in Ordnung.

2. Du schreibst, du hast yes und no wieder neu gesetzt. Das ist eigentlich nicht notwendig. Einfach die alte, schon bearbeitete Discogs Pone Web Script Settings.mp3 Datei behalten, dann bleiben deine Einstellungen erhalten. Die mit dem Update neu heruntergeladene Settings.mp3 kannst du löschen. Die ist nur für Leute, die das Skript zum ersten mal installieren.

3. Was genau funktioniert nicht? Erhältst du in einigen Feldern oder ist alles weiß. In deinem Code  
sind einigemale zwei Befehle in einer Zeile. z.B.:

regexpreplace "([^\>]\*), The" "The $1" replace "\*" "" Das darf nicht sein, dann erhällt man nur weiße Felder. Kann auch sein das das hier im Forum erst so formatiert wurde.

Ansonsten kann das eigentlich aber nur vorkommen, wenn du die .src Datei manuell editiert hast.  
Oder der Export von Mp3tag behandelt Zeilenumbrüche auf verschiedenen Rechnern unterschiedlich. Das gelaub ich aber eigenlicht nicht, wär dan wohl ein Mp3tag Export Bug.

---

<div class="post-metadata">

### Author: ![Mabba](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mabba/32/8464_2.png) [@Mabba](https://community.mp3tag.de/u/Mabba)
#### Post date: [April 16, 2011, 12:16am UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/19 "2011-04-16T00:16:48Z")

</div>

Ok, dann lösche ich mal die doppelten sachen.  
Die Felder sind einfach weiss.  
Ich werde weiter tüffteln.

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [April 16, 2011, 2:14pm UTC](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796/20 "2011-04-16T14:14:28Z")

</div>

Was gibt es denn zu tüffteln?  
Ich habe doch alle deine Wünsche in die Optionen eingebaut. Normalerweise mußt du die .src nicht mehr manuell editieren. Einfach die _Discogs Pone\>Create Scrits_ Aktion ausführen und fertig sind alle deinen Skripte wie du sie willst.  
Ne deutsche Anleitung gibt's auch hier: [/t/11816/1](https://community.mp3tag.de/t/11816/1)

[Next page](https://community.mp3tag.de/t/barcode-automatisch-einfugen/11796.md?page=2)
