fixed code indentation
This commit is contained in:
@@ -7,50 +7,50 @@ const COUNTRIES = {"AF": "Afghanistan","AX": "\u00c5land Islands","AL": "Albania
|
||||
const LinkAnalyzerTab = new Vue({
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
title: '',
|
||||
subtitle: '',
|
||||
image: '',
|
||||
image: '',
|
||||
data: {},
|
||||
type: '',
|
||||
link: '',
|
||||
countries: []
|
||||
countries: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
albumView,
|
||||
convertDuration: Utils.convertDuration,
|
||||
convertDuration: Utils.convertDuration,
|
||||
reset() {
|
||||
this.title = 'Loading...'
|
||||
this.subtitle = ''
|
||||
this.image = ''
|
||||
this.image = ''
|
||||
this.data = {}
|
||||
this.type = ''
|
||||
this.link = ''
|
||||
this.countries = []
|
||||
this.countries = []
|
||||
},
|
||||
showTrack(data) {
|
||||
this.title = data.title + (data.title_version && data.title.indexOf(data.title_version) == -1 ? ' '+data.title_version : '')
|
||||
this.subtitle = `by ${data.artist.name}\nin ${data.album.title}`
|
||||
this.image = data.album.cover_xl
|
||||
this.subtitle = `by ${data.artist.name}\nin ${data.album.title}`
|
||||
this.image = data.album.cover_xl
|
||||
this.type = 'track'
|
||||
this.link = data.link
|
||||
data.available_countries.forEach((cc)=>{
|
||||
let temp = []
|
||||
let chars = [...cc].map(c => c.charCodeAt() + 127397)
|
||||
temp.push(String.fromCodePoint(...chars))
|
||||
temp.push(COUNTRIES[cc])
|
||||
this.countries.push(temp)
|
||||
})
|
||||
this.data = data
|
||||
data.available_countries.forEach((cc)=>{
|
||||
let temp = []
|
||||
let chars = [...cc].map(c => c.charCodeAt() + 127397)
|
||||
temp.push(String.fromCodePoint(...chars))
|
||||
temp.push(COUNTRIES[cc])
|
||||
this.countries.push(temp)
|
||||
})
|
||||
this.data = data
|
||||
},
|
||||
showAlbum(data) {
|
||||
console.log(data)
|
||||
console.log(data)
|
||||
this.title = data.title
|
||||
this.subtitle = `by ${data.artist.name}\n${data.nb_tracks} tracks`
|
||||
this.image = data.cover_xl
|
||||
this.subtitle = `by ${data.artist.name}\n${data.nb_tracks} tracks`
|
||||
this.image = data.cover_xl
|
||||
this.type = 'album'
|
||||
this.link = data.link
|
||||
this.data = data
|
||||
this.data = data
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -32,11 +32,11 @@ export default class Search {
|
||||
if (e.ctrlKey) {
|
||||
QualityModal.open(term)
|
||||
} else {
|
||||
if (window.main_selected == 'analyzer_tab'){
|
||||
analyzeLink(term)
|
||||
}else{
|
||||
Downloads.sendAddToQueue(term)
|
||||
}
|
||||
if (window.main_selected == 'analyzer_tab'){
|
||||
analyzeLink(term)
|
||||
}else{
|
||||
Downloads.sendAddToQueue(term)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (term != MainSearch.query || main_selected == 'search_tab') {
|
||||
|
||||
@@ -36,9 +36,9 @@ export function playlistView(ev) {
|
||||
}
|
||||
|
||||
export function analyzeLink(link) {
|
||||
console.log("Analyzing: "+link)
|
||||
LinkAnalyzerTab.reset()
|
||||
socket.emit('analyzeLink', link)
|
||||
console.log("Analyzing: "+link)
|
||||
LinkAnalyzerTab.reset()
|
||||
socket.emit('analyzeLink', link)
|
||||
}
|
||||
|
||||
export class Tabs {
|
||||
|
||||
@@ -28,7 +28,7 @@ function convertDurationSeparated(duration) {
|
||||
}
|
||||
|
||||
function numberWithDots(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.')
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.')
|
||||
}
|
||||
|
||||
// On scroll event, returns currentTarget = null
|
||||
|
||||
Reference in New Issue
Block a user