make Vue track Track change
This commit is contained in:
		@ -89,9 +89,12 @@ class Importer:
 | 
			
		||||
                tags = line.get('tags')
 | 
			
		||||
                if tags:
 | 
			
		||||
                    track.tags.add(*tags.split(','))
 | 
			
		||||
            except:
 | 
			
		||||
                logger.warning('an error occured for track {index}, it may not '
 | 
			
		||||
                               'have been saved'.format(index = index))
 | 
			
		||||
            except Exception as err:
 | 
			
		||||
                logger.warning(
 | 
			
		||||
                    'an error occured for track {index}, it may not '
 | 
			
		||||
                    'have been saved: {err}'
 | 
			
		||||
                    .format(index = index, err=err)
 | 
			
		||||
                )
 | 
			
		||||
                continue
 | 
			
		||||
 | 
			
		||||
            if save:
 | 
			
		||||
 | 
			
		||||
@ -16,6 +16,11 @@ class Track {
 | 
			
		||||
    // If url and interval are given, use them to retrieve regularely
 | 
			
		||||
    // the track informations
 | 
			
		||||
    constructor(data) {
 | 
			
		||||
        Object.assign(this, {
 | 
			
		||||
            'name': '',
 | 
			
		||||
            'detail_url': '',
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        Object.assign(this, data);
 | 
			
		||||
 | 
			
		||||
        if(this.data_url) {
 | 
			
		||||
@ -62,7 +67,7 @@ class Track {
 | 
			
		||||
                }
 | 
			
		||||
            else
 | 
			
		||||
                data = {
 | 
			
		||||
                    title: data.title,
 | 
			
		||||
                    name: data.title,
 | 
			
		||||
                    detail_url: data.url
 | 
			
		||||
                }
 | 
			
		||||
            Object.assign(self, data);
 | 
			
		||||
@ -102,8 +107,6 @@ var Sound = Vue.extend({
 | 
			
		||||
            state: State.Stop,
 | 
			
		||||
            // current position in playing sound
 | 
			
		||||
            position: 0,
 | 
			
		||||
            // url to the page related to the sound
 | 
			
		||||
            detail_url: '',
 | 
			
		||||
            // estimated position when user mouse over progress bar
 | 
			
		||||
            user_seek: null,
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
@ -32,7 +32,7 @@
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="content flex_item">
 | 
			
		||||
            <h3 class="flex_item">
 | 
			
		||||
                <a :href="detail_url">[[ track.name ]]</a>
 | 
			
		||||
                <a :href="track.detail_url">[[ track.name ]]</a>
 | 
			
		||||
            </h3>
 | 
			
		||||
            <div v-if="track.duration" class="info">
 | 
			
		||||
                <span v-if="seek_position !== null">
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user