<?xml version="1.0" encoding="UTF-8"?>
<!--

    BleachBit
    Copyright (C) 2008-2025 Andrew Ziem
    https://www.bleachbit.org

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

    @app Vuze
    @url https://www.vuze.com/
    @os Windows, Linux
    @cleanerversion v2.0.0
    @cleanerdate 2019-03-19.2
    @cleanerby Andrew Ziem (2009-02-15 - 2009-10-04) & Tobias B. Besemer (2018-12-20 - 2019-03-19)
    @tested ok v???, Windows 7
    @testeddate ???
    @testedby https://github.com/Tobias-B-Besemer
    @note Linux $$ProgramFiles$$ not yet figured out! I will do this later! Tobias.

-->
<cleaner id="vuze">
  <label>Vuze/Azureus</label>
  <description>File transfer client</description>
  <var name="Profile">
    <value os="windows">%AppData%\Azureus</value>
    <value os="linux">~/.azureus</value>
  </var>
  <var name="ProgramFiles">
    <!-- See https://docs.bleachbit.org/cml/variables.html for explanation of $$ProgramFiles$$ -->
    <value os="windows">$$ProgramFiles$$\Vuze</value>
  </var>
  <option id="backup">
    <label>Backup files</label>
    <description>Delete the backup files</description>
    <!--
    Was: (Tobias)
    <action command="delete" search="glob" path="$$Profile$$\*.bak"/>
    <action command="delete" search="glob" path="$$Profile$$\active\*.bak"/>
    <action command="delete" search="glob" path="$$Profile$$\subs\*.vuze.bak"/>
    -->
    <!-- Is now: (Tobias) -->
    <!-- Delete *.bak recursive: -->
    <action command="delete" search="walk.files" path="$$Profile$$\" regex="\.[Bb][Aa][Kk]$"/>
    <!-- And: -->
    <action command="delete" search="walk.all" path="$$ProgramFiles$$\backup\"/>
    <action command="delete" search="walk.all" path="$$ProgramFiles$$\Vuze AzConfigBackup\"/>
  </option>
  <option id="cache">
    <label>Cache</label>
    <description>Delete the cache</description>
    <action command="delete" search="file" path="$$Profile$$\ipfilter.cache"/>
    <action command="delete" search="walk.all" path="$$Profile$$\cache"/>
    <!--<action command="delete" search="walk.all" path="$$Profile$$\shares\cache*\"/>-->
    <!--Seems that no normal caches and shouldn't be deleted!-->
  </option>
  <option id="logs">
    <label>Logs</label>
    <description>Delete the logs</description>
    <action command="delete" search="walk.all" path="$$Profile$$\logs\"/>
    <action command="delete" search="glob" path="$$Profile$$\plugins\*\*.log"/>
    <action command="delete" search="glob" path="$$Profile$$\plugins\*\eventlog.txt"/>
    <action command="delete" search="file" path="$$Profile$$\update.log"/>
    <action command="delete" search="file" path="$$Profile$$\tracker.log"/>
    <action command="delete" search="glob" path="$$ProgramFiles$$\*.log"/>
    <action command="delete" search="walk.files" path="$$ProgramFiles$$\log\"/>
    <action command="delete" search="glob" path="$$ProgramFiles$$\.install4j\*.log"/>
  </option>
  <option id="stats">
    <label>Statistics</label>
    <description>Delete the files</description>
    <action command="delete" search="walk.all" path="$$Profile$$\stats\"/>
  </option>
  <option id="temp">
    <label>Temporary files</label>
    <description>Delete the temporary files</description>
    <action command="delete" search="walk.files" path="$$Profile$$\tmp\"/>
    <action command="delete" search="glob" path="$$Profile$$\torrents\*.tmp"/>
    <action command="delete" search="glob" path="$$Profile$$\subs\*.results.bad*"/>
    <action command="delete" search="walk.files" path="$$Profile$$\subs\temp\"/>
    <action command="delete" search="glob" path="$$Profile$$\torrents\*.tmp._az"/>
    <action command="delete" search="glob" path="$$Profile$$\torrents\*.torrent._az.saving"/>
    <action command="delete" search="walk.all" path="$$Profile$$\updates\"/>
    <action command="delete" search="walk.all" path="%Temp%\AzureusInstall\"/>
    <action command="delete" search="file" path="%Temp%\AzureusInstall\"/>
    <action command="delete" search="glob" path="%Temp%\core_Azureus*"/>
  </option>
</cleaner>
