IPB

Welcome Guest ( Log In | Register )

43 Pages V  < 1 2 3 4 5 > »   
Reply to this topicStart new topic
> [WS] Discogs (pone mod), all discogs information in tags & lyrics, based on dano's scri
pone
post Dec 14 2010, 19:28
Post #31


Member


Group: Full Members
Posts: 1688
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(anapro @ Dec 14 2010, 14:23) *
How do you code this?

http://help.mp3tag.de/main_online.html
http://help.mp3tag.de/options_format.html#regexp
But these are only a very basic helps. To see some examples read through the forum and read the scripts.

Open the script with a text editor. Then open the source code of a discogs search page and a discogs release page. If you compare the scripts with the source code of the discogs pages, you can see how the script navigtes through the pages.

ZITAT
I am using Search by (Album)Artist + Title
Is there a way to reduce the number of search results?

I would like to skip a search result if the year is missing or there is no cover.
I would also like to sort by year ascending.

Why do you want to reduce the number of results?
If you have over 20 results and want to few the next results, you can do so by appending &page=2 to the search querry. And &page=3, &page=4, &page=5, ... for more results.

You can sort the search results by any category by clicking on headline of the corresponding column in the "list of search results..." dialog. The initial sorting is the the way discogs.com shows the results on their advanced search page. This can't be changed.

Skipping results can be done by editing the script. Cover is easy as it is the first thing the script checks for every results. Year is more tricky because the script has already gathered some output from the release for the results dialog when it checks year.

To skip one result without cover, replace this part of the script:
QUELLTEXT
    # Cover
    findline "lass=\"number\""
    moveline 1
    if "<div class=\"thumb\""
    say "Cover"
    else
    say " - "
    endif
    say "|"

with this:
QUELLTEXT
    # Cover
    findline "lass=\"number\""
    moveline 1
    if "<div class=\"thumb\""
        say "Cover"
    else
        findline "<div class=\"search_result" 1 1
        unspace
        findline "lass=\"number\""
        moveline 1
        if "<div class=\"thumb\""
            say "Cover"
        else
            say " - "
        endif
    endif
    say "|"

This skips only one result without cover.

To skip two or more in a row, replace
QUELLTEXT
        say " - "

in the new code with
QUELLTEXT
        findline "<div class=\"search_result" 1 1
        unspace
        findline "lass=\"number\""
        moveline 1
        if "<div class=\"thumb\""
            say "Cover"
        else
            say " - "
        endif

as many times as you want to skip results without cover.
But all this doesn't enable you to show other releases instead of the skipped releases. The script is always scanning a advanced-search-result-page at discogs.com and that only displays 20 results at once.
The only advantage of skipping result i can think of is to eleminate all but one results so Mp3tag skips the "list of search results..." dialog and you don't have to click the "Next" button.

This post has been edited by pone: Dec 14 2010, 19:40
Go to the top of the page
 
+Quote Post
pone
post Dec 14 2010, 19:32
Post #32


Member


Group: Full Members
Posts: 1688
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



@everyone:
I have noticed that the albumartist "Various" is no more changed into "va" since the last update of my script. I will fix that soon.

This post has been edited by pone: Dec 14 2010, 19:33
Go to the top of the page
 
+Quote Post
anapro
post Dec 16 2010, 02:27
Post #33


Member


Group: Members
Posts: 2
Joined: 14-December 10
Member No.: 13406
Mp3tag Version: 2.47b



QUOTE (pone @ Dec 14 2010, 13:28) *
The only advantage of skipping result i can think of is to eleminate all but one results so Mp3tag skips the "list of search results..." dialog and you don't have to click the "Next" button.


QUOTE
That's exactly what I want to do - skip to the first good result and stop...
My code to do this for the do loop is below.

I got the sort to work with the following:
[IndexUrl]=http://www.discogs.com/advanced_search?artist=%s&btn=Search+Releases&sort=year,asc



CODE
findline "<div class=\"search_result"
do            
   # Cover    
   findline "lass=\"number\""    
   moveline 1

   if "<div class=\"thumb\""
      findline "class=\"search_release_stats\""
      findinline ">"
      # Year
      
      if "19"
         moveline -3
      else
         if "20"
            moveline -3
         endif
      endif
      
      if "<div class=\"thumb\""
         say "Cover"
         say "|"    
         findline "class=\"data\""

         joinuntil "</div>"
         killtag "em"
         killtag "/em"
         regexpreplace "\s{2,}" " "
    
         # URL
         findinline "<a href=\""
         sayuntil "\">"
         say "|"
    
         # Artist
         movechar 2
         sayuntil " - "
         say "|"
    
         # Album
         movechar 2
         sayuntil "</"
         say "|"
    
         findline "class=\"search_release_stats\""
         findinline ">"
    
         # Year
         saynextnumber
         say "|"
    
         # Format
         findinline "</span>"
         sayuntil "<"
         say "|"
          
         # Publisher
         findinline "</span>"
         sayuntil "<"
         say "|"
    
         # Catalog
         findinline "</span>" 1 1
         sayuntil "<"
         say "|"
    
         # Info
         killtag "em"
         killtag "/em"
         findinline "<div>"
         sayrest    
         saynewline
         exit

      endif
   endif

   findline "<div class=\"search_result" 1 1
   unspace

while "<div class=\"search_result" 250
Go to the top of the page
 
+Quote Post
pone
post Dec 16 2010, 02:57
Post #34


Member


Group: Full Members
Posts: 1688
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



nice, you solve everything you wanted.
Go to the top of the page
 
+Quote Post
Beluna
post Jan 5 2011, 04:01
Post #35


Member


Group: Full Members
Posts: 122
Joined: 9-February 10
Member No.: 11832
Mp3tag Version: 2.45b



I'm wondering if there is a script or tool to create a link to a different website.

I've seen the tools on the site but not sure how to get it to connect or pull data from another location.

The site is Artist Direct - www.artistdirect.com.

I've found it has the most uptodate info on old and new albums.

Current, I'm just doing a cut/paste into Mp3Tag for Credits and Performers info.

Is there a short cut script that I can use to get the data.

Thanks
Go to the top of the page
 
+Quote Post
FreaQ
post Feb 14 2011, 10:43
Post #36


Member


Group: Full Members
Posts: 49
Joined: 30-September 10
Member No.: 13005
Mp3tag Version: 2.58



Hey Pone,

I am using your script very excessive and I am very happy with it, since I did some tweaking for my needs.

I see that "Genre" is a multi value field. There is no prblem with that. But "Catalog #" & "Publisher" are not a Multi value field even if there are multiple values present.

It is alwas diplayed like this:

CODE
Publisher:
Eye Q Records\\WEA Musik GmbH
Catalog #:
4509 96216-2\\4509 96216-2


Yes I did save it an extra time and yes I looked under "Erweiterte Tags".

Is it possible to modife them also to multi value fields?

This post has been edited by FreaQ: Feb 14 2011, 10:43
Go to the top of the page
 
+Quote Post
pone
post Feb 14 2011, 12:55
Post #37


Member


Group: Full Members
Posts: 1688
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(FreaQ @ Feb 14 2011, 10:43) *
Hey Pone,

I am using your script very excessive and I am very happy with it, since I did some tweaking for my needs.

I see that "Genre" is a multi value field. There is no prblem with that. But "Catalog #" & "Publisher" are not a Multi value field even if there are multiple values present.

It is alwas diplayed like this:

QUELLTEXT
Publisher:
Eye Q Records\\WEA Musik GmbH
Catalog #:
4509 96216-2\\4509 96216-2


Yes I did save it an extra time and yes I looked under "Erweiterte Tags".

Is it possible to modife them also to multi value fields?


That's strange. If they are displayed like this, they should be written as Multi Value Fields. On my system they are.
Is there any way you can write multi value fields in these tag fields in MP3tag without my script?
Go to the top of the page
 
+Quote Post
FreaQ
post Feb 14 2011, 15:03
Post #38


Member


Group: Full Members
Posts: 49
Joined: 30-September 10
Member No.: 13005
Mp3tag Version: 2.58



QUOTE (pone @ Feb 14 2011, 12:55) *
That's strange. If they are displayed like this, they should be written as Multi Value Fields. On my system they are.
Is there any way you can write multi value fields in these tag fields in MP3tag without my script?

I can add "Publisher" and "Catalog #" as many times as I want.

And if I fill in String1\\String2 manually and save it, it will be written as multiple tags. Just from the script it is not working.
I will have a closer look.

Edit:
Ok. It also works for me.

I have to do an additional step.
"Publisher" and "Catalog #" will not be written in multiple fields just by CRTL-S.
I have to open "Erweiterte Tags" and hit OK. Nothing else.

For Genre it works with CRTL-S. This maybe because Genre is in the left mask.

This post has been edited by FreaQ: Feb 14 2011, 15:05
Go to the top of the page
 
+Quote Post
pone
post Feb 14 2011, 15:16
Post #39


Member


Group: Full Members
Posts: 1688
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(FreaQ @ Feb 14 2011, 15:03) *
Ok. It also works for me.

I have to do an additional step.
"Publisher" and "Catalog #" will not be written in multiple fields just by CRTL-S.
I have to open "Erweiterte Tags" and hit OK. Nothing else.

For Genre it works with CRTL-S. This maybe because Genre is in the left mask.

This is a possible explanation.
I have added "Publisher" and "Catalog #" to the tag panel at the left, so I never experienced the difference.

To add fields to the tag panel:
Tools > Options > Tag-Panel > mt_new.png Add Field... >
Field: PUBLISHER / CATLOG #
Name: whatever you like


Maybe it's enough when you add it to the columns in the main file window:
View > Customize columns > New
Name: whatever you like
Value %publisher% / %catalog #%
leave "Field" and "Sort by" empty

This post has been edited by pone: Feb 14 2011, 15:28
Go to the top of the page
 
+Quote Post
FreaQ
post Feb 15 2011, 08:56
Post #40


Member


Group: Full Members
Posts: 49
Joined: 30-September 10
Member No.: 13005
Mp3tag Version: 2.58



Columns do not work. I have them there already.

But adding the fields to the Tag Panel was the solution. Now it works with CRTL-S
Go to the top of the page
 
+Quote Post
FreaQ
post Mar 1 2011, 08:37
Post #41


Member


Group: Full Members
Posts: 49
Joined: 30-September 10
Member No.: 13005
Mp3tag Version: 2.58



Hi Pone,

Discogs did some changes.

Released, Genre and Style are now links.

Therefore %YEAR% is not recognized anymore, but Genre and Style still are. dry.gif

Go to the top of the page
 
+Quote Post
pone
post Mar 1 2011, 08:58
Post #42


Member


Group: Full Members
Posts: 1688
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(FreaQ @ Mar 1 2011, 08:37) *
Discogs did some changes.

Released, Genre and Style are now links.

Therefore %YEAR% is not recognized anymore, but Genre and Style still are. dry.gif

will be fixed soon, thanks for reporting
Go to the top of the page
 
+Quote Post
stevehero
post Mar 1 2011, 20:18
Post #43


Member


Group: Full Members
Posts: 573
Joined: 3-December 10
From: Ireland
Member No.: 13334
Mp3tag Version: 2.65



Is there any way to add the rip/get the date from discogs to show up in the fields. The year is fine but some albums etc have the full date so is it possible to have from discogs info (see attached screen-shot)

mp3tag info:
Year: 2008
date: 0102

Thanks
Attached thumbnail(s)
Attached Image
 


--------------------
▶✚♬ ═‎​ ♡
Go to the top of the page
 
+Quote Post
pone
post Mar 1 2011, 20:34
Post #44


Member


Group: Full Members
Posts: 1688
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(stevehero @ Mar 1 2011, 20:18) *
Is there any way to add the rip/get the date from discogs to show up in the fields. The year is fine but some albums etc have the full date so is it possible to have from discogs info (see attached screen-shot)

mp3tag info:
Year: 2008
date: 0102

Thanks


I'm not planning to do this for this script for the sake of consitant year formats . But it is possible for sure.
If I have some time I'll make you a guide.
Go to the top of the page
 
+Quote Post
pone
post Mar 2 2011, 02:26
Post #45


Member


Group: Full Members
Posts: 1688
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



Scripts are updated (2.6) and working again.


Changed: The "direct by URL" search script can now also handle URLs which start with www. instead of http://www. if found in the %www% tag field (not as manual input)

Changed: In the search part %album% has got some more repalcements of words like CD, Vinyl, Web, Cd1, ... which spoil the search matches at discogs. If you need to search for a release which has one of these words at the end (like "Save the Vinyl", "First CD", "Caught in the Web") you must write i now manually in the search box.

Fixed/Changed: Albumartist "Various" was not changed into "va" in the last version. Now it is "va" again.

Fixed: %year% was not writen after changes at discogs. fixed

Fixed: There were additional spaced between the genres after changes at discogs. fixed

Fixed: Under certain rare cirucumstances quotationmarks in the title lead to html code in the title tag field. fixed

I droped the version which uses BAND instead of ALBUMARTIST for the old versions of Mp3Tag?
Is there still need for this?

This post has been edited by pone: Mar 5 2011, 04:23
Go to the top of the page
 
+Quote Post

43 Pages V  < 1 2 3 4 5 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st October 2014 - 03:11