Skip to main content
Recent Posts
81
General - (fb2k) / Re: Confusion about file size in playlist of default user interface
Last post by anamorphic -
Try this, I think it inserts a zero to make those values uniform and sort correctly (so "9.7" becomes "9.70") -

Code: [Select]
$if($strstr(%filesize_natural%, B),​​​,$if($strstr(%filesize_natural%, KB),​​,$if($strstr(%filesize_natural%, MB),​,)))$if(%isplaying%,>>>)$if($and($strstr(%filesize_natural%,.),$strcmp($len(%filesize_natural%),6)),$insert(%filesize_natural%,0,3),%filesize_natural%)

(Includes %isplaying% highlighting)

Not sure if there is a more efficient way ...

Cheers
82
General Audio / Re: Album Art Downloader XUI
Last post by Mikko_H -
Do the source scripts work for you though? I tried adding every script but getting search results only from Deezer, 45cat and ArkivMusic. Most sources stop searching after a second. AllCdCover, CoverLib and HMV Canada keep searching but don't find anything.
In case someone else is having the same problem, I was able to resolve it by installing this package:
https://www.archlinux.org/packages/multilib/x86_64/lib32-gtk3/
83
General - (fb2k) / Re: Creating M3U Playlists Automatically
Last post by Dryst -
Very misleading thread title. There doesn't seem to be anything "automatic" about that!

Also, the average fb2k user would just use the built in search...

%genre% IS blah AND %rating% GREATER 3 AND %length_seconds% GREATER 90 AND NOT %artist% IS something AND NOT %artist% IS something else AND...

Thanks for your feedback.

It would have been super helpful to respond to my initial question here:

https://hydrogenaud.io/index.php?topic=119407.msg984511#msg984511
84
Off-Topic / Re: Microsoft Edge
Last post by dnewhous -
Adguard Adblocker has promoted itself to Adblocker for Windows with a free VPN.   That may conflict with KIS secure connection.

I tried Ad-aware adblock because it is supposedly faster.  Comments

1) It does work with Edge
2) It does not work with CNN.
3) With Chrome it has serious hijack problems.   

If I were more vigilant I might see if it works better on Chrome with Spywareblaster installed.  Browser hijack may be the wrong term - it just starts popping tabs at you with advertising in them.
85
General - (fb2k) / Re: Creating M3U Playlists Automatically
Last post by snotlicker -
Very misleading thread title. There doesn't seem to be anything "automatic" about that!

Also, the average fb2k user would just use the built in search...

%genre% IS blah AND %rating% GREATER 3 AND %length_seconds% GREATER 90 AND NOT %artist% IS something AND NOT %artist% IS something else AND...
86
General - (fb2k) / Re: Trying To Use Folder Structure To Add Source/Media Type Column
Last post by bennettisawesome -
Perhaps you can add that folder to the $replace ? (first position)

Code: [Select]
$puts(p,$replace(%path%,G:\Music\RED\,,G:\Music\,,\\nas\share\Music\,))
$left($get(p),$sub($strstr($get(p),\),1))

(correcting drive letters)

I should have thought of that! Thank you so much, it seems to have worked perfectly. The only small thing which I would be perfectly ok with keeping if it's too much of a hassle, is that instead of showing CDs (for instance, or SACDs, Cassettes), instead show the singular form of whichever folder something is in (CD, SACD, Cassette). I still absolutely appreciate the actual solution to the original problem so much (to all that helped), so if this too much to ask, I understand.
(Edit: Except for HDtracks? Because HDtrack wouldn't really be correct, not sure how one could only apply it to CDs, SACDs, Cassettes, etc.)

I seem to have solved the plural issue with this

Code: [Select]
$replace($puts(p,$replace(%path%,E:\Music\RED\,,E:\Music\,,H:\Music\,))
$left($get(p),$sub($strstr($get(p),\),1)),Cassettes,Cassette,CDs,CD,Premasters,Premaster,Reels,Reel)

(like my initial post, how searching text for 'CDs' obviously got both CDs and SACDs, this new solution also suffers from that problem, but it seems to work out since it basically just takes the s off the end for both).

Once again, this is most definitely a bad way to do this and makes the code not future-proof without having to go in and add it (which isn't a big deal, but I feel it's possibly something that could be avoided if there is an alternative method to this), if that makes a single bit of sense, but it works for me, so unless someone far more skilled than me knows of a better way to do it, then I'll just keep this for now I guess. Thanks again to those who replied with the main solution to getting the folder names.
87
Development - (fb2k) / Re: [1.6] embedded webp images + album_art_data_ptr
Last post by samidare1234 -
#4 was already what it used up until the last 0.8.x release. It was switched to 32 bit for 0.9.

#1. Yeah, that'll be the day. That's not exactly supported by anything yet, is it?

#2. This was tried once, years ago, with exactly zero benefit for most common tasks, except for memory utilization, and the latest alpha is right on track to eliminate that problem without going 64 bit. Oh, and 64 bit means zero component compatibility without a recompile, and in some cases, redesigning things if you use architecture specific code anywhere.

#3. You're serious, aren't you? Show me a Windows on ARM device that isn't a total joke, and maybe also buy it for Peter, and maybe one for me so I can consider porting my components to ARM too. I wouldn't seriously consider using it as a daily driver, of course. Aside from Apple's prototype hardware for their platform, I'd say ARM on the Desktop is a total joke.


Thank you for your reply.

I remember that many years ago, many software companies or software developers said that upgrading to 64-bit was meaningless,
but they eventually upgraded to 64-bit.
64-bit should be a trend. For example, 64-bit support is already Forced the Mobile platform,
even if there is no significant difference on most of Apps.

And I'm not a C++ programmer,
so I naively think that 64-bit or WoA are just importing SDK and doing minor corrections and recompiling

The above is just my tiny wish. (OK, besides the WoA support)
Just excited to see more modern feature on Foobar2000 in the future.
I will respect any decision made by the developers of Foobar2000.
The best of music players in Windows. :)
88
General - (fb2k) / Re: Creating M3U Playlists Automatically
Last post by Dryst -
Below is the full contents of the Electronica.xquery file.  Simply save this into the new folder you created as a text file with the Electronica.xquery file name:

Code: [Select]
xquery version "3.0";
declare option saxon:output "encoding=UTF-8";
declare option saxon:output "method=xml";
declare option saxon:output "indent=yes";
declare option saxon:output "omit-xml-declaration=no";

<output>{
for $x in doc("Digital_Audio.xml")/body/media_file
where Xs:short($x/tag/rating) > 3 and
      $x/file/duration_in_seconds > 90 and
      matches($x/tag/genre, 'Industrial|Electronic') and
      $x/tag/artist != 'Kraftwerk' and
      $x/tag/artist != 'The Art of Noise' and
      $x/tag/album != 'Quake Soundtrack' and
      $x/tag/album != '20XX Volume I: A Tribute To The Music of Mega Man X (Full-Length Edition)' and
      $x/tag/album != '20XX Volume II: A Tribute To The Music of Mega Man X'
order by $x/@src
return <result>{$x/@src} {$x/tag/artist} {$x/tag/album} {$x/tag/title}</result>
}</output>

Below is the contents of the GenerateElectronicaPlaylist.xsl XSL Transformation.  Similar to above, save this as a new text file with the GenerateElectronicaPlaylist.xsl file name:

Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  exclude-result-prefixes="xs"
  version="1.0">
  <xsl:output method="text" encoding="UTF-8" byte-order-mark="yes"/>
  <xsl:strip-space elements="*"/>
  <xsl:template match="/">#EXTM3U<xsl:text>&#xa;</xsl:text>
    <xsl:for-each select="/output/result/@src">#EXTINF:<xsl:value-of select="position()"/>,<xsl:value-of select="../artist"/> - <xsl:value-of select="../title"/><xsl:text>&#xa;</xsl:text><xsl:value-of select="."/><xsl:text>&#xa;</xsl:text></xsl:for-each>
  </xsl:template>
</xsl:stylesheet>
89
General - (fb2k) / Creating M3U Playlists Automatically
Last post by Dryst -
I have a method that I have been using to generate playlists automatically for a specific genre of music.  I do this to allow fb2k to play a specific genre of music only including specific tracks that are not duplicated.  To do this, I use XML technology, and the tools to do it are 100% free and downloadable on the Internet.  I will share the procedure I follow to do this below with step by step instructions.

One thing important is that your entire music library must exist as an XML document.  I do not currently have any components that will export the fb2k library as XML; however, I do use a batch tag editor that exports all files with the tag content of my choosing to an XML document.  This is the tag editor I currently use and have written the XSL transformation for.  I know of no other tag editors available today that does this other than a single one-- Tag&Rename.  Therefore, these steps are written expecting Tag&Rename's XML schema.  If you have your audio file library in another XML format, both the XQuery and XSL Transformation must be modified to support that schema.

Step #1:
Make sure you have the Java runtime installed of at least version 1.8.  You may determine this by typing the following at a command prompt:

Code: [Select]
D:\Media\Digital Audio Library>java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)

If you do not have a minimum of version 1.8 as depicted above, you must download then install the Java runtime from here:
https://java.com/en/download/

Step #2:
Download the open source Saxon library from here:
https://sourceforge.net/projects/saxon/

Step #3:
Create a new folder on your local drive using the name of your choice.  For my example, I created D:\Media\Digital Audio Library.  After creating this folder, extract three files from the SaxonHE10-1J.zip file you downloaded in step #2 above:

  • saxon-he-10.1.jar
  • saxon-xqj-10.1.jar
  • jline-2.9.jar

Place all three of the files above into the new folder you created above.  In my case, I placed them all into D:\Media\Digital Audio Library.

Step #4:
Place the following two files into the new folder you created in step #3 above:

  • Electronica.xquery
  • GenerateElectronicaPlaylist.xsl

Step #5:
Generate the XML document that contains your library content.  I used Tag&Rename version 3.9.15 to create the XML.  Also, the xquery file was written support this schema.  When you do export, choose as many tag fields as you wish to enhance your XQuery selection criteria.  The minimum fields required for what I created are:

  • File Name
  • Artist
  • Title
  • Album
  • Year
  • Genre
  • Track#
  • Rating
  • Album Artist
  • Time

Adding more fields gives you flexibility when creating and/or modifying your XQuery.  Select as many as you wish.  If you use Tag&Rename to create the XML document, select the option for all folders and all files, select all files, and finally export.  It will take a few minutes to create the XML document depending on the size of your library.  Once it is created though, you may save this generated XML document to execute additional queries later.  Note that I saved my XML document with the file name Digital_Audio.xml.  If you use a different name, the XQuery must be modified to support this different name.

Note that my example Electronica.xquery file has XQuery criteria to exclude specific artists and album names.  All text is case sensitive and must match exactly how it is entered in your tags.  If your tags are not consistent and have different case for the same artists and albums, you may duplicate the entries with matching casing.  Using a batch tag edit to match all files with the same letter case would be the best option.

Step #6:
Generate the m3u8 playlist using the following commands:
Code: [Select]
java -cp saxon-he-10.1.jar;saxon-xqj-10.1.jar net.sf.saxon.Query Electronica.xquery -o:ElectronicaPlaylist.xml

java -cp saxon-he-10.1.jar net.sf.saxon.Transform -s:ElectronicaPlaylist.xml -xsl:GenerateElectronicaPlaylist.xsl -o:Electronica.m3u8
After this is complete, you will find that you have a new playlist file created called Electronica.m3u8 in your newly created folder.

Note that if you make changes to the file names, you must alter the parameters above with the new names you selected.  My example was for an Electronica playlist.

Hopefully this is useful to someone.  If you have any questions or need help, you may ask me for assistance.
SimplePortal 1.0.0 RC1 © 2008-2020