Skip to content
Snippets Groups Projects
Commit c95c573a authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Merge branch 'cherry-pick-develop' into 'master'

Cherry pick develop

See merge request funkwhale/funkwhale!802
parents d8dd76f1 fb855cd0
No related branches found
No related tags found
No related merge requests found
Showing
with 92 additions and 13 deletions
......@@ -226,7 +226,7 @@ class Command(BaseCommand):
urllib.parse.urlencode([("import", reference)]),
)
self.stdout.write(
"For details, please refer to import refrence '{}' or URL {}".format(
"For details, please refer to import reference '{}' or URL {}".format(
reference, import_url
)
)
......@@ -246,7 +246,7 @@ class Command(BaseCommand):
self.stderr.write("- {}: {}".format(path, error))
self.stdout.write(
"For details, please refer to import refrence '{}' or URL {}".format(
"For details, please refer to import reference '{}' or URL {}".format(
reference, import_url
)
)
......
Added button to search for objects on Discogs (#368)
Favorites radio will not be visible if the user does not have any favorites (#419)
\ No newline at end of file
Aligned search headers with search results in the sidebar (#708)
\ No newline at end of file
Clicking on the currently selected playlist in the Playlist popup will now close the popup (#807)
\ No newline at end of file
The currently playing track is now highlighted with an orange play icon (#832)
\ No newline at end of file
Redirect from / to /library when user is logged in (#864)
......@@ -147,7 +147,19 @@ export default {
let msg = this.$pgettext('Content/Home/List item/Verb', 'Get quality metadata about your music thanks to <a href="%{ url }" target="_blank">MusicBrainz</a>')
return this.$gettextInterpolate(msg, {url: this.musicbrainzUrl})
}
},
watch: {
'$store.state.auth.authenticated': {
handler (v) {
if (v) {
console.log('Authenticated, redirecting to /library…')
this.$router.push('/library')
}
},
immediate: true
}
}
}
</script>
......
......@@ -466,6 +466,12 @@ $sidebar-color: #3d3e3f;
border-radius: 0;
}
}
.ui.search .results {
vertical-align: middle;
}
.ui.search .name {
vertical-align: middle;
}
}
.ui.tiny.avatar.image {
position: relative;
......
......@@ -20,7 +20,7 @@
<tbody>
<tr v-for="track in tracks">
<td class="play-cell">
<play-button class="basic icon" :track="track" :discrete="true"></play-button>
<play-button :class="['basic', {orange: isPlaying && track.id === currentTrack.id}, 'icon']" :discrete="true" :track="track"></play-button>
</td>
<td class="content-cell" colspan="5">
<track-favorite-icon :track="track"></track-favorite-icon>
......@@ -57,6 +57,7 @@
</template>
<script>
import { mapGetters } from "vuex"
import backend from '@/audio/backend'
import TrackFavoriteIcon from '@/components/favorites/TrackFavoriteIcon'
import PlayButton from '@/components/audio/PlayButton'
......@@ -64,7 +65,7 @@ import PlayButton from '@/components/audio/PlayButton'
export default {
props: {
album: {type: Object},
mode: {type: String, default: 'rich'}
mode: {type: String, default: 'rich'},
},
components: {
TrackFavoriteIcon,
......@@ -84,6 +85,12 @@ export default {
}
return this.album.tracks.slice(0, this.initialTracks)
},
...mapGetters({
currentTrack: "queue/currentTrack",
}),
isPlaying () {
return this.$store.state.player.playing
},
tracksWithAlbum () {
// needed to include album data (especially cover)
// with tracks appended in queue (#795)
......
<template>
<tr>
<td>
<play-button class="basic icon" :discrete="true" :is-playable="playable" :track="track"></play-button>
<play-button :class="['basic', {orange: isPlaying && track.id === currentTrack.id}, 'icon']" :discrete="true" :is-playable="playable" :track="track"></play-button>
</td>
<td>
<img class="ui mini image" v-if="track.album.cover.original" v-lazy="$store.getters['instance/absoluteUrl'](track.album.cover.small_square_crop)">
......@@ -50,7 +50,7 @@
</template>
<script>
import { mapGetters } from "vuex"
import time from '@/utils/time'
import TrackFavoriteIcon from '@/components/favorites/TrackFavoriteIcon'
import TrackPlaylistIcon from '@/components/playlists/TrackPlaylistIcon'
......@@ -74,13 +74,19 @@ export default {
}
},
computed: {
...mapGetters({
currentTrack: "queue/currentTrack",
}),
isPlaying () {
return this.$store.state.player.playing
},
albumArtist () {
if (this.artist) {
return this.artist
} else {
return this.track.album.artist
}
}
},
}
}
</script>
......
......@@ -16,7 +16,7 @@
1 favorite
</translate>
</h2>
<radio-button type="favorites"></radio-button>
<radio-button v-if="hasFavorites" type="favorites"></radio-button>
</section>
<section class="ui vertical stripe segment">
<div :class="['ui', {'loading': isLoading}, 'form']">
......@@ -115,7 +115,10 @@ export default {
return {
title: this.$pgettext('Head/Favorites/Title', 'Your Favorites')
}
}
},
hasFavorites () {
return this.$store.state.favorites.count > 0
},
},
methods: {
updateQueryString: function() {
......
......@@ -61,7 +61,11 @@
<i class="external icon"></i>
<translate translate-context="Content/*/*/Clickable, Verb">View on MusicBrainz</translate>
</a>
<router-link
<a :href="discogsUrl" target="_blank" rel="noreferrer noopener" class="basic item">
<i class="external icon"></i>
<translate translate-context="Content/*/Button.Label/Verb">Search on Discogs</translate>
</a>
<router-link
v-if="object.is_local"
:to="{name: 'library.albums.edit', params: {id: object.id }}"
class="basic item">
......@@ -168,6 +172,13 @@ export default {
return "https://musicbrainz.org/release/" + this.object.mbid
}
},
discogsUrl() {
return (
"https://discogs.com/search/?type=release&title=" +
encodeURI(this.object.title) + "&artist=" +
encodeURI(this.object.artist.name)
)
},
headerStyle() {
if (!this.object.cover.original) {
return ""
......
......@@ -72,6 +72,10 @@
<i class="external icon"></i>
<translate translate-context="Content/*/*/Clickable, Verb">View on MusicBrainz</translate>
</a>
<a :href="discogsUrl" target="_blank" rel="noreferrer noopener" class="basic item">
<i class="external icon"></i>
<translate translate-context="Content/*/Button.Label/Verb">Search on Discogs</translate>
</a>
<router-link
v-if="object.is_local"
:to="{name: 'library.artists.edit', params: {id: object.id }}"
......@@ -205,6 +209,12 @@ export default {
return "https://musicbrainz.org/artist/" + this.object.mbid
}
},
discogsUrl() {
return (
"https://discogs.com/search/?type=artist&title=" +
encodeURI(this.object.name)
)
},
cover() {
return this.object.albums
.filter(album => {
......
......@@ -10,7 +10,7 @@
<translate translate-context="Content/Radio/Title">Instance radios</translate>
</h3>
<div class="ui cards">
<radio-card v-if="$store.state.auth.authenticated" :type="'favorites'"></radio-card>
<radio-card v-if="isAuthenticated && hasFavorites" :type="'favorites'"></radio-card>
<radio-card :type="'random'"></radio-card>
<radio-card v-if="$store.state.auth.authenticated" :type="'less-listened'"></radio-card>
</div>
......@@ -144,7 +144,13 @@ export default {
searchPlaceholder,
title
}
}
},
isAuthenticated () {
return this.$store.state.auth.authenticated
},
hasFavorites () {
return this.$store.state.favorites.count > 0
},
},
methods: {
updateQueryString: _.debounce(function() {
......
......@@ -76,6 +76,10 @@
<i class="external icon"></i>
<translate translate-context="Content/*/*/Clickable, Verb">View on MusicBrainz</translate>
</a>
<a :href="discogsUrl" target="_blank" rel="noreferrer noopener" class="basic item">
<i class="external icon"></i>
<translate translate-context="Content/*/Button.Label/Verb">Search on Discogs</translate>
</a>
<router-link
v-if="track.is_local"
:to="{name: 'library.tracks.edit', params: {id: track.id }}"
......@@ -180,6 +184,14 @@ export default {
return "https://musicbrainz.org/recording/" + this.track.mbid
}
},
discogsUrl() {
return (
"https://discogs.com/search/?type=release&title=" +
encodeURI(this.track.album.title) + "&artist=" +
encodeURI(this.track.artist.name) + "&track=" +
encodeURI(this.track.title)
)
},
downloadUrl() {
let u = this.$store.getters["instance/absoluteUrl"](
this.upload.listen_url
......
......@@ -57,7 +57,7 @@
:to="{name: 'library.playlists.detail', params: {id: playlist.id }, query: {mode: 'edit'}}"><i class="ui pencil icon"></i></router-link>
</td>
<td :title="playlist.name">
<router-link :to="{name: 'library.playlists.detail', params: {id: playlist.id }}">{{ playlist.name }}</router-link></td>
<router-link v-on:click.native="update(false)" :to="{name: 'library.playlists.detail', params: {id: playlist.id }}">{{ playlist.name }}</router-link></td>
<td><human-date :date="playlist.modification_date"></human-date></td>
<td>{{ playlist.tracks_count }}</td>
<td>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment