home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Products
MPTagThat
A script for deleting all track numbers / album names
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="djdinjo" data-source="post: 894427" data-attributes="member: 112378"><p>Hi sgatke.</p><p> </p><p>Thanks for your question. It was long ago since I used the skrips the last time and I deleted all my written skrips on my old HTPC before I sold it. I'm also sorry that I didn't wrote the solution here. So, here are the results and the solution for your problem:</p><p> </p><p>For the script at the first thread: As hwahrmann told, the skript was ok. You have to change [CODE]track.Album = null[/CODE] to [CODE]track.Album = ""[/CODE]</p><p> </p><p>For your Problem: Use this script:</p><p>[CODE]// Title: Delete Track No.</p><p>// Description: This script deletes the Track No.</p><p>//</p><p>// ------------ Don't change anything in the following block -------</p><p>//css_ref bin\taglib-sharp.dll;</p><p>//css_ref MPTagThat.Core.dll;</p><p>using System;</p><p>using System.Collections.Generic;</p><p>using MPTagThat.Core;</p><p>using TagLib;</p><p>// ----------------------------------------------------------------</p><p>// Insert any using here that your script might need</p><p>// If referencing an external dll, whose assembly name is not the same</p><p>// as in the using, you need to insert a css_ref comment pointing to the dll.</p><p>// See the example how taglib-sharp.dll is referenced on top of this file.</p><p> </p><p>public class Script : IScript</p><p>{</p><p> public bool Invoke(List<TrackData> tracks)</p><p> {</p><p> if (tracks == null) return false;</p><p> </p><p> // Loop through all Music Tracks and perform the necessary action</p><p> foreach (TrackData track in tracks)</p><p> {</p><p> // Delete Track No.</p><p> track.Track = "";</p><p> track.Changed = true; // Indicate that the track has been changed</p><p> }</p><p> return true;</p><p> }</p><p> </p><p> public string Invoke(TrackData track)</p><p> {</p><p> return "";</p><p> }</p><p>}</p><p>[/CODE]</p><p> </p><p>I hope it helps. I tested it and it works.</p></blockquote><p></p>
[QUOTE="djdinjo, post: 894427, member: 112378"] Hi sgatke. Thanks for your question. It was long ago since I used the skrips the last time and I deleted all my written skrips on my old HTPC before I sold it. I'm also sorry that I didn't wrote the solution here. So, here are the results and the solution for your problem: For the script at the first thread: As hwahrmann told, the skript was ok. You have to change [CODE]track.Album = null[/CODE] to [CODE]track.Album = ""[/CODE] For your Problem: Use this script: [CODE]// Title: Delete Track No. // Description: This script deletes the Track No. // // ------------ Don't change anything in the following block ------- //css_ref bin\taglib-sharp.dll; //css_ref MPTagThat.Core.dll; using System; using System.Collections.Generic; using MPTagThat.Core; using TagLib; // ---------------------------------------------------------------- // Insert any using here that your script might need // If referencing an external dll, whose assembly name is not the same // as in the using, you need to insert a css_ref comment pointing to the dll. // See the example how taglib-sharp.dll is referenced on top of this file. public class Script : IScript { public bool Invoke(List<TrackData> tracks) { if (tracks == null) return false; // Loop through all Music Tracks and perform the necessary action foreach (TrackData track in tracks) { // Delete Track No. track.Track = ""; track.Changed = true; // Indicate that the track has been changed } return true; } public string Invoke(TrackData track) { return ""; } } [/CODE] I hope it helps. I tested it and it works. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Products
MPTagThat
A script for deleting all track numbers / album names
Contact us
RSS
Top
Bottom