* add more ducking command * fix current music command * provide more controls, like pause, resume, clear. * add more controls in the web interface * refactored and improved: 1. move get_music_tag_info to util, and 2. refined logic related to it. 3. now playlist will check for tag info thus update_music_tag_info is useless and was removed 4. add "add folder" feature to !file asked in #65, 5. fix bugs related to !file * truncate file list if too long * fixed several tiny bugs * fixed several tiny bugs continue * fixed several tiny bugs continue continue * fixed several tiny bugs continue**3 * fixed several tiny bugs continue**4 * added !filematch command to add files that match a regex pattern. * truncate long message * fix web interface delete file issue * refresh after delete file * add regex to listfile command * refactored command part, added partial match support for commands * organized * added random command * typo * typo * Fixed many bugs. * Added workaround for azlux/pymumble#44 to fix the memory leak. * changed logging style. * fixed bugs related to random and resume * fix now playing * fixed issue related to download * fixed issue related to download 2 * fixed thumbnail issue * fixed add url problem in web interface * REFACTORED, turned db.ini into sqlite3 database. * fixed remove song problem * fixed radio get title problem. auto download if tmp file is deleted * fixed current index not loaded from database * fixed: order of songs loaded from the database * fixed: some obscure bugs. beautified error of commands * added a workaround for TerryGeng/botamusique#1. * beautified * fixed: channel not loaded in the config * fixed: auto checked for updates * fixed: mysterious bug: sometimes "now playing" string cannot be properly displayed. The real reason is: do use <br />, do not use <br>. I tried hours to find out this. * chore: unified debug messages that refer to music items * feav: fetch ffmpeg stderr mentioned in #72, reformatted logs. * fix: async download not working * fix: async download not working, still * fix: async download not working, finished * feat: queue command: ▶current playing item◀ * feat: support more than one command prefix * chore: added some WARNINGs into default config file to avoid people to touch it. * refactor: packed all string contants into constants.py, just to avoid people messing it around. * refactor: required by azlux. Added a configuration.example.ini to keep people away from configuration.default.ini
		
			
				
	
	
		
			56 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			56 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{% if index == -1 %}
 | 
						|
    <tr class="table-dark">
 | 
						|
    <td colspan="4" class="text-muted" style="text-align:center;"> Play list is empty. </td>
 | 
						|
    </tr>
 | 
						|
{% else %}
 | 
						|
{% if index == playlist.current_index %}
 | 
						|
<tr class="table-active">
 | 
						|
{% else %}
 | 
						|
<tr>
 | 
						|
{% endif %}
 | 
						|
    <th scope="row">{{ index + 1 }}</th>
 | 
						|
    <td>
 | 
						|
        <div class="playlist-title">
 | 
						|
            {% if 'thumbnail' in m %}
 | 
						|
                <img width="80" src="data:image/PNG;base64,{{ m['thumbnail'] }}"/>
 | 
						|
                {% else %}
 | 
						|
                <img width="80" src="/static/image/unknown-album.png"/>
 | 
						|
            {% endif %}
 | 
						|
        </div>
 | 
						|
        <div class="playlist-artwork">
 | 
						|
            {% if 'title' in m and m['title'].strip() %}
 | 
						|
                <b>{{ m['title']|truncate(45) }}</b>
 | 
						|
            {% elif 'url' in m %}
 | 
						|
                <b>{{ m['url']|truncate(45) }}</b>
 | 
						|
            {% endif %}
 | 
						|
            <span class="badge badge-secondary">{{ m['type'].capitalize() }}</span>
 | 
						|
            <br>
 | 
						|
            {% if 'artist' in m %}
 | 
						|
                {{ m['artist'] }}
 | 
						|
            {% else %}
 | 
						|
                Unknown Artist
 | 
						|
            {% endif %}
 | 
						|
        </div>
 | 
						|
    </td>
 | 
						|
    <td>
 | 
						|
        {% if 'url' in m %}
 | 
						|
            <small><a href="{{ m['url'] }}"><i>{{ m['url']|truncate(50) }}</i></a></small>
 | 
						|
        {% elif 'path' in m %}
 | 
						|
        <small>{{ m['path']|truncate(50) }}</small>
 | 
						|
        {% endif %}
 | 
						|
    </td>
 | 
						|
    <td>
 | 
						|
        <div class="btn-group">
 | 
						|
            <button type="button" class="btn btn-info btn-sm btn-space"
 | 
						|
                    onclick="request('/post', {play_music : '{{ index }}'})">
 | 
						|
                <i class="fa fa-play" aria-hidden="true"></i>
 | 
						|
            </button>
 | 
						|
            <button type="button" class="btn btn-danger btn-sm btn-space"
 | 
						|
                    onclick="request('/post', {delete_music : '{{ index }}'})">
 | 
						|
                <i class="fas fa-trash-alt" aria-hidden="true"></i>
 | 
						|
            </button>
 | 
						|
        </div>
 | 
						|
    </td>
 | 
						|
</tr>
 | 
						|
{% endif %}
 |