IPB

Welcome Guest ( Log In | Register )

19 Pages V  « < 16 17 18 19 >  
Reply to this topicStart new topic
> [WS] iTunes, web sources script
ohrenkino
post May 9 2017, 18:22
Post #256


Member


Group: Full Members
Posts: 9007
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.84a



OK.
Try an action of the type "Format value" for YEAR
Format string: $left(%year%,4)


--------------------
42 - wie war die Frage / what was the question / quelle était la question
Go to the top of the page
 
+Quote Post
gabotojojo
post May 9 2017, 19:18
Post #257


Member


Group: Full Members
Posts: 7
Joined: 2-May 17
Member No.: 23376
Mp3tag Version: v2.80



QUOTE (ohrenkino @ May 9 2017, 14:22) *
OK.
Try an action of the type "Format value" for YEAR
Format string: $left(%year%,4)

It works great! Thanks!
Go to the top of the page
 
+Quote Post
ms6676749
post May 28 2017, 02:10
Post #258


Member


Group: Full Members
Posts: 52
Joined: 17-March 16
Member No.: 21892
Mp3tag Version: 2.75



QUOTE (gabotojojo @ May 9 2017, 03:18) *
I was wondering if there's an easy way to modify the script to grab only the year. I don't like the whole release date, just the year. I'm just getting started, don't know much about editing src's.
Thanks!
This may or may not apply to you. Just a FYI for anyone else who simply wants the four-digit year. Use the following in place of the "# YEAR" section (modified from Stevehero's src):
CODE
# YEAR
    outputto "YEAR"
    regexpreplace "(\d{4}-\d{2}-\d{2})" "<<<$1>>>"
    sayregexp "(?<=\"releaseDate\":\"<<<).+?(?=-\d{2}-\d{2}>>>)" ", " "}"
Go to the top of the page
 
+Quote Post
MvT
post Jun 12 2017, 18:11
Post #259


Member


Group: Members
Posts: 1
Joined: 12-June 17
Member No.: 23521
Mp3tag Version: 2.82



Hello,
Thank you for the great script! w00t.gif

Is it possible to integrate, that "TRACK" lists the TRACKNUMBER and the TOTALTRACKS like "2/14"?

I tried this for disc numbers (see below) and it worked, but when I implement the same part for "TRACK" it overwrites the title of the song.

Any guess on what I could do?
Thank you! smile.gif
CODE
outputto "DISCNUMBER"
FindLine "\"discNumber\":"
FindInLine "\"discNumber\":"
SayUntil ", \""
Say "/"
FindLine "\"discCount\":"
FindInLine "\"discCount\":"
SayUntil ", \""
Say "|"

CODE
outputto "TRACK"
FindLine "\"trackNumber\":"
FindInLine "\"trackNumber\":"
SayUntil ", \""
Say "/"
FindLine "\"trackCount\":"
FindInLine "\"trackCount\":"
SayUntil ", \""
Say "|"
Go to the top of the page
 
+Quote Post
yourdadsmusic
post Jun 13 2017, 23:26
Post #260


Member


Group: Full Members
Posts: 7
Joined: 5-June 17
Member No.: 23491
Mp3tag Version: 2.82



curious if someone could help me with this, I want [Search By] to remove additional tags often found in the %title%

so far this is what I have

CODE
[SearchBy]=%title%
    replace " (Clean)" ""
    replace " (Clean) (Extended)" ""
    replace " (Instrumental)" ""


I do not know how to make the replace action act on %title% so that the search will prompt the title without the aditional (Clean) (Extended) tags for example. Thanks!

This post has been edited by yourdadsmusic: Jun 13 2017, 23:26
Go to the top of the page
 
+Quote Post
ms6676749
post Jun 14 2017, 18:20
Post #261


Member


Group: Full Members
Posts: 52
Joined: 17-March 16
Member No.: 21892
Mp3tag Version: 2.75



QUOTE (yourdadsmusic @ Jun 13 2017, 23:26) *
curious if someone could help me with this, I want [Search By] to remove additional tags often found in the %title%

so far this is what I have

CODE
[SearchBy]=%title%
    replace " (Clean)" ""
    replace " (Clean) (Extended)" ""
    replace " (Instrumental)" ""


I do not know how to make the replace action act on %title% so that the search will prompt the title without the aditional (Clean) (Extended) tags for example. Thanks!


Try this:

CODE
[SearchBy]=$regexp($replace($replace($replace(%title%,'(Clean)',),'(Extended)',),'(Instrumental)',),'(^.*[^ ])(.*$)',$1)


Basically, $replace removes those "additional tags" and $regexp eliminates the trailing spaces.

This post has been edited by ms6676749: Jun 14 2017, 18:50
Go to the top of the page
 
+Quote Post
yourdadsmusic
post Jun 16 2017, 17:03
Post #262


Member


Group: Full Members
Posts: 7
Joined: 5-June 17
Member No.: 23491
Mp3tag Version: 2.82



QUOTE (ms6676749 @ Jun 14 2017, 19:20) *
Try this:

CODE
[SearchBy]=$regexp($replace($replace($replace(%title%,'(Clean)',),'(Extended)',),'(Instrumental)',),'(^.*[^ ])(.*$)',$1)


Basically, $replace removes those "additional tags" and $regexp eliminates the trailing spaces.


Thanks! this works perfectly! for anyone having trouble with this, if you want to add another word to remove from the query you have to add another ($replace to the line. so if you are removing 10 words, you should have 10 instances of ($replace also.

My final search query looks like this, you can see that i added "feat." and "&" to be filtered out of the artist section also
CODE
[SearchBy]=$regexp($replace($replace(%artist%,' feat.',),' &',),'(^.*[^ ])(.*$)',$1) $regexp($replace($replace($replace($replace($replace(%title%,'(Clean)',),'(Dirty)',),'(Extended)',),'(Radio Edit)',),'(Short Edit)',),'(Instrumental)',),'(^.*[^ ])(.*$)',$1)

Go to the top of the page
 
+Quote Post
DetlevD
post Jun 16 2017, 17:18
Post #263


Member


Group: Full Members
Posts: 6637
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.84



QUOTE (yourdadsmusic @ Jun 16 2017, 18:03) *
... if you are removing 10 words, you should have 10 instances of ($replace ...

To minimize the complexity of the formatstring, ...
see "Mp3tag/help/main_scripting.html" ...
the function $replace allows to add "from-to-pairs" within the function parameter list, ...
$replace(string,from1,to1,from2,to2,...)

DD.20170616.1818.CEST


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
yourdadsmusic
post Jun 16 2017, 21:38
Post #264


Member


Group: Full Members
Posts: 7
Joined: 5-June 17
Member No.: 23491
Mp3tag Version: 2.82



QUOTE (DetlevD @ Jun 16 2017, 18:18) *
To minimize the complexity of the formatstring, ...
see "Mp3tag/help/main_scripting.html" ...
the function $replace allows to add "from-to-pairs" within the function parameter list, ...
$replace(string,from1,to1,from2,to2,...)

DD.20170616.1818.CEST


oh awesome Ill try that out thanks! If anyone could help me with this last adjustment it would be awesome. I'm trying to get publisher field to only display record label info, no date or distributor. In trying to get rid of the date i figured the following would work:

CODE
outputto "PUBLISHER"
FindLine "\"copyright\":\""
FindInLine "\"copyright\":\""
SayUntil "\", \""
regexpreplace "℗ (\d{4})" ""


but it seems unable to grab the date, should I be putting this under # COPYRIGHT instead? i think my best option would be to use $cutLeft and specify 7 spaces to be removed, but i havent been able to properly integrate it

as for the following distributor info, I would like to make a rule that anything starting with and following a "/" or " ," would be removed.

An example of my ideal Publisher field; ℗ 2017 Kemosabe Records/Columbia Records, a Division of Sony Music Entertainment

would turn into Kemosabe Records

sorry for the ignorance! I really appreciate the help

This post has been edited by yourdadsmusic: Jun 16 2017, 21:39
Go to the top of the page
 
+Quote Post
ms6676749
post Jun 18 2017, 01:45
Post #265


Member


Group: Full Members
Posts: 52
Joined: 17-March 16
Member No.: 21892
Mp3tag Version: 2.75



QUOTE (yourdadsmusic @ Jun 16 2017, 22:38) *
An example of my ideal Publisher field; ℗ 2017 Kemosabe Records/Columbia Records, a Division of Sony Music Entertainment

would turn into Kemosabe Records

sorry for the ignorance! I really appreciate the help


Try this (just some of my modifications to the script I use personally):
CODE
# PUBLISHER
    outputto "PUBLISHER"
    regexpreplace "\,\s[Uu]nder\s[Ee]xclusive\s[Ll]icense.*?(\",)" "$1"
    regexpreplace "(?:(?<=\"copyright\":\")(?:[^A-Za-z0-9]\s)?\d{4}\s([^/]*).*?(\",))" "$1$2"
    sayregexp "(?<=\"copyright\":\").+?(?=\")" ", " "}"


This post has been edited by ms6676749: Jun 18 2017, 02:22
Go to the top of the page
 
+Quote Post
yourdadsmusic
post Jun 21 2017, 20:06
Post #266


Member


Group: Full Members
Posts: 7
Joined: 5-June 17
Member No.: 23491
Mp3tag Version: 2.82



QUOTE (ms6676749 @ Jun 18 2017, 02:45) *
Try this (just some of my modifications to the script I use personally):
CODE
# PUBLISHER
    outputto "PUBLISHER"
    regexpreplace "\,\s[Uu]nder\s[Ee]xclusive\s[Ll]icense.*?(\",)" "$1"
    regexpreplace "(?:(?<=\"copyright\":\")(?:[^A-Za-z0-9]\s)?\d{4}\s([^/]*).*?(\",))" "$1$2"
    sayregexp "(?<=\"copyright\":\").+?(?=\")" ", " "}"



Thanks so much again, its working perfectly. learning from what you gave me I added a line to remove ", a division of" clauses that come up alone sometimes; example- Epic Records, A Division of Sony.... you can see how i added below. It's amazing how helpful you guys are on this forum

CODE
outputto "PUBLISHER"
regexpreplace "\,\s[Uu]nder\s[Ee]xclusive\s[Ll]icense.*?(\",)" "$1"
regexpreplace "\,\s[Aa]\s[Dd]ivision.*?(\",)" "$1"
regexpreplace "(?sad.gif?<=\"copyright\":\")(?:[^A-Za-z0-9]\s)?\d{4}\s([^/]*).*?(\",))" "$1$2"
sayregexp "(?<=\"copyright\":\").+?(?=\")" ", " "}"


I am curious about the indentation of some lines though, is this just for organization or does mp3tag actually read the indented lines differently? my script seems to be working fine without the indentation

This post has been edited by yourdadsmusic: Jun 22 2017, 00:40
Go to the top of the page
 
+Quote Post
yourdadsmusic
post Jun 21 2017, 20:13
Post #267


Member


Group: Full Members
Posts: 7
Joined: 5-June 17
Member No.: 23491
Mp3tag Version: 2.82



has anyone changed this window to automatically prompt "No" instead of "Yes" to increase workflow speed? I've tried to find this window in Resource Hacker but haven't been able to

Go to the top of the page
 
+Quote Post
ohrenkino
post Jun 21 2017, 20:27
Post #268


Member


Group: Full Members
Posts: 9007
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.84a



If you press Alt-N on the keyboard (or perhaps even only "N") you can close the window almost as easy as pressing enter.

Also, there are some options in Tools>Option>Messages where you can tune which messages you want to see.


--------------------
42 - wie war die Frage / what was the question / quelle était la question
Go to the top of the page
 
+Quote Post
ms6676749
post Jun 21 2017, 23:37
Post #269


Member


Group: Full Members
Posts: 52
Joined: 17-March 16
Member No.: 21892
Mp3tag Version: 2.75



QUOTE (yourdadsmusic @ Jun 21 2017, 20:06) *
I am curious about the indentation of some lines though, is this just for organization or does mp3tag actually read the indented lines differently? my script seems to be working fine without the indentation

Organization. It is easier for me to find stuff I need to edit that way.

This post has been edited by ms6676749: Jun 21 2017, 23:38
Go to the top of the page
 
+Quote Post
yourdadsmusic
post Jun 27 2017, 00:37
Post #270


Member


Group: Full Members
Posts: 7
Joined: 5-June 17
Member No.: 23491
Mp3tag Version: 2.82



QUOTE (ohrenkino @ Jun 21 2017, 21:27) *
If you press Alt-N on the keyboard (or perhaps even only "N") you can close the window almost as easy as pressing enter.

works great thanks a million

QUOTE (ms6676749 @ Jun 22 2017, 00:37) *
Organization. It is easier for me to find stuff I need to edit that way.


ah makes sense.


Ok this is likely my last question so I can finally stop bothering you guys. Regarding the [IndexUrl] and [AlbumUrl], I want the script to search a different index by the track name not the album name, so that when entering my SearchBy prompt of "%artist% %title%" the result will come up with the album containing that track even if the %title% isn't present in the album name.
I've tried some combinations of entity=musicTRACK and adding some attributes but no combinations i've used have gotten results so I'm wondering if i could get some help here as well. Thank you again
Go to the top of the page
 
+Quote Post

19 Pages V  « < 16 17 18 19 >
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th September 2017 - 15:39