Big Bento Modern - final release v1.14

  • 181 Replies
  • 33012 Views
*

victhor

  • Moderator
  • Full Member
  • ***
  • 224
    • View Profile
    • Victhor Deviantart
Re: Big Bento Modern - final release v1.14
« Reply #180 on: October 22, 2019, 04:58:26 PM »
From original script (songinfo.maki):

string getBitrate ()
{
   string sit = strlower(getSongInfoText());
   if (sit != "")
   {
      string rtn;
      int searchresult;
      for (int i = 0; i < 5; i++) {
         rtn = getToken(sit, " ", i);
         searchResult = strsearch(rtn, "kbps");
         if (searchResult>0) return StrMid(rtn, 0, searchResult);
      }
      return "";
   }
   else
   {
      return "";
   }
}


Sounds like a really complicated method since there is getPlayItemMetaDataString(bitrate) or getMetaDataString(String filename, bitrate), but I'm sure there's a reason for it..

*

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • 1898
    • View Profile
    • WACUP (Winamp Community Update Pack)
Re: Big Bento Modern - final release v1.14
« Reply #181 on: October 22, 2019, 06:39:44 PM »
Querying the current item for the information & then reverting to the above if there wasn't anything provided would probably be a better option. As most of the input plug-ins can return the bitrate (unless it's stream or a less commonly used 3rd party input plug-in).

-dro