INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4] 5   Go Down

Author Topic: amg.pl: an A M G helper and dummy file creator  (Read 85093 times)

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: amg.pl: an A M G helper
« Reply #150 on: March 06, 2014, 12:56:31 pm »

I've posted version 1.25.   There are many new fields, and one large change that will affect your AMG URL field.  See the notes below, and the important post above.  I'll provide an expression to allow you to convert your existing URLs into IDs if you want.

Version 1.25
    - Change: WARNING: values stored into existing key 'rid' (field: 'AMG Album ID') will now be short album ID
      values.  Old style URLs will be automatically converted to album IDs in this field.  See this important
      post: http://yabb.jriver.com/interact/index.php?topic=84268.msg601216#msg601216
    - New: key 'url' (field: 'AMG Album URL') will contain the short AMG album URL.
    - New: per-track keys 'artistid', 'artisturl', 'composerid', 'composerurl', capture the AMG artist ID and URL,
      and AMG composer ID and URL. These can be used with Links to get to the artist's or composer's landing page.
      The fields are mapped to AMG Artist ID, AMG Artist URL, AMG Composer ID, and AMG Composer URL, respectively.
      The AMG Artist ID or AMG Composer ID is sufficient to generate the AMG Artist URL or AMG Composer URL, so
      capturing both are not necessary, however you can choose either or both.
    - New: per-track key 'tid' captures the AMG track ID.  This is ID-only portion of the 'turl' (track URL) field.
      You can use either or both of these; the 'turl' value caries with it descriptive text reflecting the track's
      name, so this might be your preferred value; however, it is a lenthier value that the simpler 'tid' value.
    - Change: move the MCWS section in the config file to the top of the file, and change comments to reflect that
      the MCWS service is the default now.  The 'tid' value can be used to generate a Link to the track's entry
      at AMG.
    - Fix: debugging messages on Windows cmd console now output in Unicode correctly.  Must use a Unicode font
      such as Consolas for the Console (right-click the console's titlebar, select the Font tab, and select the
      Consolas font).
    - Change: allow compressed page gets.
    - Change: increase page timeout to 15 seconds.
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: amg.pl: an A M G helper
« Reply #151 on: March 06, 2014, 01:26:56 pm »

I've added a tip on creating Links using the new IDs, or to help find album IDs, in reply #2.
Logged
The opinions I express represent my own folly.

SkGe

  • Galactic Citizen
  • ****
  • Posts: 424
Re: amg.pl: an A M G helper
« Reply #152 on: March 06, 2014, 02:02:40 pm »

I didn't try the last version but i have a question on the addition.
If you get the last identifier id, and with combination with URL and album it get the information like the previous one?!
However if you do that, how do you save the url in the other field, because you only get that identifier and nothing more, the combination of the all this 3 things get together and get inserted in the new field (URL)?
For the moment i have this expression:
Code: [Select]
removeleft(fixcase(regex([AMG URL], /#-([^-]+)$#/, 1), 3), 4) witch get the identifier to another field show me only that. I suppose it will be something like this isn't?!
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: amg.pl: an A M G helper
« Reply #153 on: March 06, 2014, 02:14:08 pm »

I may be a little uncertain of your question.  But here's how it works:

If you already have a URL in your current 'rid' field, that URL is used for the lookup.  There are new IDs being employed on AMG, and there are older ones.  These are easily distinguished.

If you have a newer AMG album ID in the 'rid' field, it is used to construct the URL.

In any case, the ID returned in the 'rid' field will be the newer form of AMG ID, and the URL stored in the 'url' field will be the standardized album URL plus the ID.  The friendly but superfluous album text will not part of the URL returned.  You don't need it in MC, since you already know the Album name.
Logged
The opinions I express represent my own folly.

SkGe

  • Galactic Citizen
  • ****
  • Posts: 424
Re: amg.pl: an A M G helper
« Reply #154 on: March 06, 2014, 02:14:48 pm »

I have another question is not quite related to the script but instead of the performer and the album artist when you get the info.
Let say you have this album:
http://www.allmusic.com/album/watch-the-throne-mw0002107551
Where there you have 2 performer and featuring. That mean you have 2 artist per album but in the field of album artist you can have only one type of it, how can this be deal and for who i shall reserve this album either A or B, or both!? If i choose the artist A on album artist (auto) the artist B remain only at the artist level, but if you look deeper they are listed as be the album artist and also as an artist.
Till now how i deal with this is, either i delete on of artist and put into one. But i think that way they deal in the allmusic with artist/featuring and the main album artist.
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 424
Re: amg.pl: an A M G helper
« Reply #155 on: March 06, 2014, 02:18:34 pm »

I'm gone try the last version to see how it works before i put more question, but i understand the part where you have the new id caller.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: amg.pl: an A M G helper
« Reply #156 on: March 06, 2014, 02:20:51 pm »

I have another question is not quite related to the script but instead of the performer and the album artist when you get the info.
Let say you have this album:
http://www.allmusic.com/album/watch-the-throne-mw0002107551
Where there you have 2 performer and featuring. That mean you have 2 artist per album but in the field of album artist you can have only one type of it, how can this be deal and for who i shall reserve this album either A or B, or both!? If i choose the artist A on album artist (auto) the artist B remain only at the artist level, but if you look deeper they are listed as be the album artist and also as an artist.
Till now how i deal with this is, either i delete on of artist and put into one. But i think that way they deal in the allmusic with artist/featuring and the main album artist.

How you deal with Album Artist is entirely a personal choice.  You should use an Album Artist that helps you organize and find music for your needs.

For example, I have many Pat Metheny albums.  And his albums are listed under any of "Pat Metheny", "The Pat Metheny Group", "The Pat Metheny Unity Group", "Pat Metheny Quartet".  I really don't care about all those variations when I search for music.  So the Album Artist is set to "Pat Metheny", and I'll note in another field the actual "official" album artist name.

In your example, if I had only one Jay-Z album and 10 Kanye West albums, I'd probably set the Album Artist to Kanye West, and include Jay-Z as a featured artist.  If I only had this one album from either, I'd list the Album Artist as "Jay-Z & Kanye West".
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: amg.pl: an A M G helper
« Reply #157 on: March 06, 2014, 02:22:30 pm »

I'm gone try the last version to see how it works before i put more question, but i understand the part where you have the new id caller.

OK.  But take my advice and do the COPY of the existing ID field (which contains your URLs).  See the link I posted.
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: amg.pl: an A M G helper
« Reply #158 on: March 06, 2014, 02:25:31 pm »

For the moment i have this expression:
Code: [Select]
removeleft(fixcase(regex([AMG URL], /#-([^-]+)$#/, 1), 3), 4) witch get the identifier to another field show me only that. I suppose it will be something like this isn't?!

I wouldn't use this expression, because I don't think it distinguishes between old and new IDs.  I used:

    regex([AMG ID],/#http:.*?-(m[wr]\d+)#/, 1)

to do the conversions.  Old IDs do not start with -mw or -mr.
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: amg.pl: an A M G helper and dummy file creator
« Reply #159 on: May 20, 2014, 11:16:59 am »

I've posted a minor update.

Version 1.26
    - Internal: update to reflect API change to create_mpl_item() function.
    - Fix: incorrect letter option for --rid shown in usage
    - Fix: warning about uninitialized rating value when release had no rating.
Logged
The opinions I express represent my own folly.

SkGe

  • Galactic Citizen
  • ****
  • Posts: 424
Re: amg.pl: an A M G helper and dummy file creator
« Reply #160 on: May 20, 2014, 12:00:05 pm »

Hey MrC
Sometimes when you have a url where album don't have tracks included but have the rest of information, it can't be trigger not a data because all the time the script say "unable get releases for" i try it every way possible adding that data but all the time that announce come. Have something changes in the script in last period on that matter?
Here is a link where that problem appear. http://www.allmusic.com/album/drive-mw0002676684 .
Thank you!
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: amg.pl: an A M G helper and dummy file creator
« Reply #161 on: May 20, 2014, 12:15:18 pm »

This is a case where there is no Overview page so there are no tracks listed.  The default entry for this album is the Credits page.  Since everything is keyed of the existence of the Overview page, amg.pl basically aborts doing more work if the page doesn't exist.

Although this new album album has very little information yet (it will probably soon be updated), if it feels important to you to try to grab the little information that exists, I could see about grabbing the per-album values (if they exist).
Logged
The opinions I express represent my own folly.

SkGe

  • Galactic Citizen
  • ****
  • Posts: 424
Re: amg.pl: an A M G helper and dummy file creator
« Reply #162 on: May 20, 2014, 12:22:05 pm »

Sometimes happen for older albums who don't have any track available in the list but i did try it your action to do -all but it seems now that action don't work anymore, yet i looked on the script and used -A and the same thing happen, nothing is added. Well is not a big deal because i forgot that in the past all the info was added manually and now im easy with this tool :) so i forgot how to do the hard work...
If you can have an look on it i will be glad if not i say don't butter you already did a great job so thanks.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: amg.pl: an A M G helper and dummy file creator
« Reply #163 on: May 20, 2014, 12:26:21 pm »

The --all / -A option can't override the fact that there is no Overview page.  The script simply aborts trying to process that album further at that point.  I think I should be able to get the script to still allow processing any additional information.  If you happen to know of another entry that contains no Overview page, but has some data on the other pages such as Credits, etc., that would be helpful.
Logged
The opinions I express represent my own folly.

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: amg.pl: an A M G helper and dummy file creator
« Reply #164 on: May 20, 2014, 08:54:06 pm »

Thanks MrC but am I missing a file as I don't have a LibXML.pm in either of the directories mentioned below

Code: [Select]
c:\Users\Nathan\Desktop\amg>perl amg.pl --help
Can't locate XML/LibXML.pm in @INC (@INC contains: C:/Perl64/site/lib C:/Perl64/
lib .) at amg.pl line 21.
BEGIN failed--compilation aborted at amg.pl line 21.

Thanks
Nathan
Logged
JRiver CEO Elect

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: amg.pl: an A M G helper and dummy file creator
« Reply #165 on: May 20, 2014, 09:44:59 pm »

No special privs for you.  You need to read and follow the README instructions.  :-)

Step 4 in README.install.txt indicates the modules you need to install.  But no cheating... be sure you've followed all the steps.


Scratch that.  I need to update the instructions.  Add the additional module:

   ppm install XML-LibXML

and then you should be good to go.
Logged
The opinions I express represent my own folly.

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: amg.pl: an A M G helper and dummy file creator
« Reply #166 on: May 20, 2014, 10:26:53 pm »

 ;D - I always like spec privs!  Anyway, once the other model installed, it will runs!  As you can see from the screen shot, it is pulling all the data correctly but then changed One Track (the last one I created the new particle for) and updated it's the Name (but to the last in the data stream pulled) and also changed Media Type from Video to Audio.  The rest were left as is (see Pic)

From what I read, does the script rely on unique filenames (as particles all have the same one)?
Logged
JRiver CEO Elect

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: amg.pl: an A M G helper and dummy file creator
« Reply #167 on: May 20, 2014, 10:32:34 pm »

Ok, good to know.

I hadn't thought about the single Filename issue - that was dumb of me.  However, we can use FileKey() instead.  I'll have to update the code to handle a FileKey value instead of a Filename value.  Then, you can use it for anything.  You can add an expression column to your view with the value FileKey() to see the unique file key entry.

I'll also create something to allow you to override Media Type being automatically set to Audio.
Logged
The opinions I express represent my own folly.

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: amg.pl: an A M G helper and dummy file creator
« Reply #168 on: May 20, 2014, 10:49:22 pm »

Got it.  Makes sense.  Added the FileKey() Col
Thanks
Nathan
Logged
JRiver CEO Elect

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: amg.pl: an A M G helper and dummy file creator
« Reply #169 on: May 21, 2014, 12:06:00 am »

Nathan,

Attached is a pre-release ready for you to test.  It includes two new options:

   --mediatype
   --filekey

The --mediatype option allows you to set the media type, and --filekey allows you to tell amg.pl to use a Filekey column instead of the Filename column (you can leave the Filename column present and you'll get better debug/verbose output).  You'll have to add an expression column called Filekey with the value:

   FileKey()

So your new command line should include:

   --mediatype Video --filekey

I'd been meaning to add Filekey support anyway, so thanks for the prompting.
Logged
The opinions I express represent my own folly.

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: amg.pl: an A M G helper and dummy file creator
« Reply #170 on: May 21, 2014, 12:31:14 am »

...and we have a Winner!  :D  Well done again MrC

Now to think about how to best to use this new found power  8)
Logged
JRiver CEO Elect

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: amg.pl: an A M G helper and dummy file creator
« Reply #171 on: May 21, 2014, 12:34:47 am »

Nice!
Logged
The opinions I express represent my own folly.

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: amg.pl: an A M G helper and dummy file creator
« Reply #172 on: May 21, 2014, 01:39:46 am »

....mmmm this could speed up particle tagging for Music Videos esp if (when) MC can auto create particles based on the Chapters but it seems the info on All Music is not that reliable for BD Music Videos as I found that unfortunately for the bulk of my Music BDs they either
- don't exist as a separate Release at all, or
- it it does exist they do not have a track listing just a description.

No to to be deterred I figured just use another Release and the good news is I've found that if I use say a CD listing of the same Album even though the tracks may be broken up over 2 CD (eg D1T1...D1T6, then D2T1...D2T5) the Helper will still map the Names across in the correct order (eg Track 1-11 which is great)!  ... but I then found on the first disk I tested that track listing on my BD is different to all the ones listed (an intro inserted and a track deleted).

For example I have this one:

Blu-ray Alchemy Live 23rd July 1983, Hammersmith Odeon, London
Intro (Saturday Night At The Movies)
Once Upon a Time in the West
Expresso Love
Romeo & Juliet
Private Investigations
Sultans of Swing
Two Young Lovers
Tunnel of Love
Telegraph Road
Solid Rock
Going Home - Theme from 'Local Hero  

All music's listing is here - http://www.allmusic.com/album/alchemy-dire-straits-live-mw0000189678/releases

Also, I was then thinking that your helper & a calculation field could maybe derive the playback range based on the "Length" field from where it is exists.  Any idea on how to do this?, eg:
Track 1: Time = "13:01" --> Playback Range = "0.00-13:01"
Track 2: Time = "5:45" --> Playback Range = "13:01-18:46"
etc

(note: the format for Playback Range is HH:MM:SS and some albums go over the hour mark)

Thanks
Nathan

Logged
JRiver CEO Elect

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: amg.pl: an A M G helper and dummy file creator
« Reply #173 on: May 21, 2014, 01:51:11 am »

Discogs usually has better entries, and many more of them.  I can update the Discogs.pl script tomorrow.

I can give you a playback range option.
Logged
The opinions I express represent my own folly.

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: amg.pl: an A M G helper and dummy file creator
« Reply #174 on: May 21, 2014, 02:12:52 am »

wooooo woooo - How exciting as these are the slowest bits in creating particles, entering the name and calculating and typing in the Playback Range (which you then get wrong!)

Thanks mate
Nathan
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: amg.pl: an A M G helper and dummy file creator
« Reply #175 on: May 21, 2014, 02:49:05 am »

FYI - I've got a BD "Pure Audio" Video (The Rolling Stones - Exile on Main Street) ready to go with a blank Particle created and numbered for each of the 18 tracks but sans any other meta data (except Artist/Album) so I'm happy to pull all available meta data (not just "Name").  Both ALLMUSIC and DiscOrgs have good track listings with DiscOrgs also have times that seem to line up with the Chapter Marks.  It will be interesting to see what data it pulls!
Logged
JRiver CEO Elect

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: amg.pl: an A M G helper and dummy file creator
« Reply #176 on: May 21, 2014, 04:36:42 am »

Logged
The opinions I express represent my own folly.

SkGe

  • Galactic Citizen
  • ****
  • Posts: 424
Re: amg.pl: an A M G helper and dummy file creator
« Reply #177 on: June 07, 2014, 07:17:34 am »

On a fresh install of windows, i encounter this problem
Can't locate XML/LibXML.pm in @INC (@INC contains: C:/Perl64/site/lib C:/Perl64/lib .) at amg.pl line 21.
BEGIN failed--compilation aborted at amg.pl line 21.
I search on the file at line 21 and it is this
XML::LibXML '1.70';
I searched on internet for a solution but i can't find one to help me, do you know what is the problem MrC?!
Thank you!
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: amg.pl: an A M G helper and dummy file creator
« Reply #178 on: June 08, 2014, 12:38:45 pm »

You need to install the XML-LibXML module.  In the command shell, run:

       ppm install XML-LibXML
Logged
The opinions I express represent my own folly.

SkGe

  • Galactic Citizen
  • ****
  • Posts: 424
Re: amg.pl: an A M G helper and dummy file creator
« Reply #179 on: June 08, 2014, 03:06:12 pm »

That was?! darn, and i looked a whole day for a solution over internet... Thx what to say.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: amg.pl: an A M G helper and dummy file creator
« Reply #180 on: June 08, 2014, 03:12:42 pm »

You can use the better Google-based search:

http://jriver.com/search.html

Try searching for XML/LibXML.pm using the link above.
Logged
The opinions I express represent my own folly.

cinjin

  • Recent member
  • *
  • Posts: 26
Re: amg.pl: an A M G helper and dummy file creator
« Reply #181 on: July 22, 2014, 06:36:04 pm »

I noticed in the past few weeks with my new albums that I am tagging that the individual tracks are being tagged with amg trackid and track URL fine but the fields amg albumid, releases, similar albums, billboard albums or singles is being filled at all. I even tried an album already tagged, cleared all the tags and used amg 1.26. It filled the trackid track URL but none of the other tags. Any help would be great. By the way MrC this little app is a godsend and it really helps to bring out MC on a 55" screen in a loft. Hoping to go to 110" projection with kinect motion capability and this media software. Thanks!
Logged

Daydream

  • Citizen of the Universe
  • *****
  • Posts: 770
Re: amg.pl: an A M G helper and dummy file creator
« Reply #182 on: July 23, 2014, 02:29:34 am »

One quick question: would the dummy files/MPL route work with MC 18?
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1971
Re: amg.pl: an A M G helper and dummy file creator
« Reply #183 on: August 10, 2014, 02:59:39 am »

Hi MrC,
My album art file's media type is being changed from IMAGE to AUDIO. I guess the --mediatype parameter won't help in this situation where I have tracks and art selected? No big deal to modify them afterwards though.
Logged

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5906
  • Farm Animal Stupid
Re: amg.pl: an A M G helper and dummy file creator
« Reply #184 on: September 04, 2014, 02:58:11 pm »

I was having some issues with certain tracks causing an unhandled exception when dealing with certain characters and was able to fix it by modifying line 63 of the MCWS.pm script to use uri_escape_utf8 instead of just uri_escape.
Logged

stevem87

  • Junior Woodchuck
  • **
  • Posts: 98
Re: amg.pl: an A M G helper and dummy file creator
« Reply #185 on: December 06, 2014, 08:27:01 pm »

Hey Mr. C, just noticed that the last few albums that I have tagged are missing the lyrics. I checked AMG's site and the lyrics are there, they just aren't getting pulled in by the script. NIckleback -Nofixed Address and Kings of Leon - Only By the Night. There was more, but that should get the point. Still using 1.24 and Media Center 19. Just noticed the problem goes back a few weeks, no more.

Thanks,
Steve
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14267
  • I won! I won!
Re: amg.pl: an A M G helper and dummy file creator
« Reply #186 on: December 06, 2014, 11:34:38 pm »

Hi Steve,  FYI MrC has not been online for some time - more -> http://yabb.jriver.com/interact/index.php?topic=90825.0
Logged
JRiver CEO Elect

stevem87

  • Junior Woodchuck
  • **
  • Posts: 98
Re: amg.pl: an A M G helper and dummy file creator
« Reply #187 on: December 07, 2014, 12:45:18 pm »

WOW, that sucks. Wonder what happened.

Is anyone else have trouble running the script? Did AMG change something on their end?
Logged

theoctavist

  • World Citizen
  • ***
  • Posts: 228
  • a bad liver and a broken heart.
Re: amg.pl: an A M G helper and dummy file creator
« Reply #188 on: December 08, 2014, 10:20:01 pm »

running fine here, although i dont know about lyrics, dont use em
Logged

stevem87

  • Junior Woodchuck
  • **
  • Posts: 98
Re: amg.pl: an A M G helper and dummy file creator
« Reply #189 on: December 09, 2014, 05:31:50 am »

Yeah, everything works except the lyrics...strange.
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1971
Re: amg.pl: an A M G helper and dummy file creator
« Reply #190 on: December 29, 2014, 05:25:22 pm »

Lyrics fix...

replace line 1119:
Code: [Select]
if (m#<div class="lyric SCREENONLY">.*?<p id="hidden_without_js" style="display: none;">\s+(.*?)\s*<img src="/images/transparent.png">\s*</p>\s+<p><br /><br />(.+?)<script>#ms) {
with line:
Code: [Select]
if (m#<div class="lyric SCREENONLY">.*?<p id="hidden_without_js" style="display: none;">\s+(.*?)\s*<img src="http://assets.allmusic.com/images/transparent.png">\s*</p>\s+<p><br /><br />(.+?)<script>#ms) {   
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 424
Re: amg.pl: an A M G helper and dummy file creator
« Reply #191 on: January 02, 2015, 08:01:04 am »

A small correction of the person above, the line is 1079 not the 1119.
Logged

stevem87

  • Junior Woodchuck
  • **
  • Posts: 98
Re: amg.pl: an A M G helper and dummy file creator
« Reply #192 on: January 02, 2015, 01:33:32 pm »

Thank you guys so much for this, but how do I actually edit the script. When I right click and click edit, it opens in notepad, but there are no line numbers or anything to find the script. Also, any ideas on how it got messed up in the first place. It was working a few weeks age.

Thanks!
Logged

stevem87

  • Junior Woodchuck
  • **
  • Posts: 98
Re: amg.pl: an A M G helper and dummy file creator
« Reply #193 on: January 02, 2015, 01:43:26 pm »

Dissregard, I just used Find and Replace...THANKS! It worked.
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 424
Re: amg.pl: an A M G helper and dummy file creator
« Reply #194 on: January 29, 2015, 05:08:26 pm »

I know that MrC is kinda gone, but maybe can anyone who meet this problem can help me.
I install a newly windows and i installed activeperl but something is wrong.
Each time it give me an error that it say "ppm install failed: Can't find any package that provides XML-LibXML". I did install the xml-libxml and still can't do nothing with it. I got the last vers. of activeperl.
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1971
Re: amg.pl: an A M G helper and dummy file creator
« Reply #195 on: June 18, 2015, 03:18:23 pm »

Any Perl/Regex knowledge here? Review doesn't always parse  anymore and therefore the tag doesn't get the value in such cases.  I have identified the faulty line but haven't been able to fix the issue.

Code: (amg.pl) [Select]
sub parse_review {
    local $_ = shift;

    my $ret = undef;
    if (m#<h4 class="review-author headline">\s*Review\s+(.*?)</h4>\s*<div [^>]+>\s*<p>\s*(.+?)\s*</div>#ms) {
If I remove <h4 class="review-author headline"> from the beginning of the if parsing succeeds with the ones that didn't get the Review parsed earlie but it isn't a correct solution for this.

I used Elvis Is Back! album as an example for this.

http://www.regexe.com/ was used to test regex line against page source
Logged

stevem87

  • Junior Woodchuck
  • **
  • Posts: 98
Re: amg.pl: an A M G helper and dummy file creator
« Reply #196 on: June 22, 2015, 11:12:52 am »

I have the same problem with the review not getting recorded. No idea how to fix it. Hopefully someone smarter than me will respond.
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 424
Re: amg.pl: an A M G helper and dummy file creator
« Reply #197 on: June 26, 2015, 02:39:10 pm »

This issue is after they added custom review in the album page. It seems they change something there and the parse can't take anymore the review.
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1971
Re: amg.pl: an A M G helper and dummy file creator
« Reply #198 on: June 27, 2015, 01:26:56 am »

It works with my changes but I just don't know if it is foolproof as it will make lookup more generic
Logged

theoctavist

  • World Citizen
  • ***
  • Posts: 228
  • a bad liver and a broken heart.
Re: amg.pl: an A M G helper and dummy file creator
« Reply #199 on: September 19, 2015, 05:06:20 am »

so it is broken I take it? damnit. this was a handy thing.  I get the XML LibXML error too.
Logged
Pages: 1 2 3 [4] 5   Go Up