2015-08-30 14:29:12 +02:00
|
|
|
<?php
|
|
|
|
|
2015-10-25 06:17:45 +01:00
|
|
|
/**
|
|
|
|
* Pony.fm - A community for pony fan music.
|
2021-02-14 03:39:15 +01:00
|
|
|
* Copyright (C) 2015 Feld0.
|
2015-10-25 06:17:45 +01:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero 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 Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2021-02-14 03:34:58 +01:00
|
|
|
namespace App\Models;
|
2015-08-31 14:35:47 +02:00
|
|
|
|
2021-02-14 03:39:15 +01:00
|
|
|
use App\Contracts\Commentable;
|
|
|
|
use App\Contracts\Favouritable;
|
|
|
|
use App\Contracts\Searchable;
|
|
|
|
use App\Exceptions\TrackFileNotFoundException;
|
|
|
|
use App\Traits\IndexedInElasticsearchTrait;
|
|
|
|
use App\Traits\SlugTrait;
|
|
|
|
use App\Traits\TrackCollection;
|
|
|
|
use Auth;
|
|
|
|
use Cache;
|
2016-07-10 03:16:25 +02:00
|
|
|
use DB;
|
2015-08-31 14:35:47 +02:00
|
|
|
use Helpers;
|
2015-08-30 14:29:12 +02:00
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2016-05-27 21:12:40 +02:00
|
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
2015-08-30 14:29:12 +02:00
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
2015-11-08 18:46:35 +01:00
|
|
|
use Illuminate\Foundation\Bus\DispatchesJobs;
|
2015-11-24 12:07:43 +01:00
|
|
|
use Venturecraft\Revisionable\RevisionableTrait;
|
2015-08-30 14:29:12 +02:00
|
|
|
|
2016-01-01 01:36:08 +01:00
|
|
|
/**
|
2021-02-14 03:39:15 +01:00
|
|
|
* App\Models\Playlist.
|
2016-01-01 01:36:08 +01:00
|
|
|
*
|
2021-02-14 03:39:15 +01:00
|
|
|
* @property int $id
|
|
|
|
* @property int $user_id
|
2016-01-01 01:36:08 +01:00
|
|
|
* @property string $title
|
|
|
|
* @property string $slug
|
|
|
|
* @property string $description
|
2021-02-14 03:39:15 +01:00
|
|
|
* @property bool $is_public
|
|
|
|
* @property int $track_count
|
|
|
|
* @property int $view_count
|
|
|
|
* @property int $download_count
|
|
|
|
* @property int $favourite_count
|
|
|
|
* @property int $follow_count
|
|
|
|
* @property int $comment_count
|
2016-01-01 01:36:08 +01:00
|
|
|
* @property \Carbon\Carbon $created_at
|
|
|
|
* @property \Carbon\Carbon $updated_at
|
|
|
|
* @property \Carbon\Carbon $deleted_at
|
2021-02-14 03:34:58 +01:00
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Track[] $tracks
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ResourceUser[] $users
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Comment[] $comments
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\PinnedPlaylist[] $pins
|
|
|
|
* @property-read \App\Models\User $user
|
2016-01-01 01:36:08 +01:00
|
|
|
* @property-read mixed $url
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\Venturecraft\Revisionable\Revision[] $revisionHistory
|
2021-02-14 03:34:58 +01:00
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist userDetails()
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Favourite[] $favourites
|
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Activity[] $activities
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist whereId($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist whereUserId($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist whereTitle($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist whereSlug($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist whereDescription($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist whereIsPublic($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist whereTrackCount($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist whereViewCount($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist whereDownloadCount($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist whereFavouriteCount($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist whereFollowCount($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist whereCommentCount($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist whereCreatedAt($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist whereUpdatedAt($value)
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist whereDeletedAt($value)
|
2016-12-10 17:47:49 +01:00
|
|
|
* @mixin \Eloquent
|
2017-11-28 17:24:32 +01:00
|
|
|
* @method static bool|null forceDelete()
|
2021-02-14 03:34:58 +01:00
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist onlyTrashed()
|
2017-11-28 17:24:32 +01:00
|
|
|
* @method static bool|null restore()
|
2021-02-14 03:34:58 +01:00
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist withTrashed()
|
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\Playlist withoutTrashed()
|
2016-01-01 01:36:08 +01:00
|
|
|
*/
|
2016-05-27 21:12:40 +02:00
|
|
|
class Playlist extends Model implements Searchable, Commentable, Favouritable
|
2015-08-30 14:29:12 +02:00
|
|
|
{
|
2016-01-17 16:16:16 +01:00
|
|
|
use SoftDeletes, SlugTrait, TrackCollection, RevisionableTrait, IndexedInElasticsearchTrait;
|
2015-08-30 14:29:12 +02:00
|
|
|
|
2016-01-07 19:16:37 +01:00
|
|
|
protected $elasticsearchType = 'playlist';
|
2015-08-30 14:29:12 +02:00
|
|
|
|
2016-01-07 19:16:37 +01:00
|
|
|
protected $table = 'playlists';
|
2015-08-30 14:29:12 +02:00
|
|
|
protected $dates = ['deleted_at'];
|
2016-01-17 11:33:58 +01:00
|
|
|
protected $casts = [
|
|
|
|
'id' => 'integer',
|
|
|
|
'user_id' => 'integer',
|
|
|
|
'title' => 'string',
|
|
|
|
'description' => 'string',
|
|
|
|
'is_public' => 'boolean',
|
|
|
|
'track_count' => 'integer',
|
|
|
|
'view_count' => 'integer',
|
|
|
|
'download_count' => 'integer',
|
|
|
|
'favourte_count' => 'integer',
|
|
|
|
'follow_count' => 'integer',
|
|
|
|
'comment_count' => 'integer',
|
|
|
|
];
|
2015-08-30 14:29:12 +02:00
|
|
|
|
|
|
|
public static function summary()
|
|
|
|
{
|
2016-09-30 00:26:31 +02:00
|
|
|
return self::select(
|
|
|
|
'id',
|
|
|
|
'title',
|
|
|
|
'user_id',
|
|
|
|
'slug',
|
|
|
|
'created_at',
|
|
|
|
'is_public',
|
|
|
|
'description',
|
|
|
|
'comment_count',
|
|
|
|
'download_count',
|
|
|
|
'view_count',
|
|
|
|
'favourite_count',
|
|
|
|
'track_count'
|
|
|
|
);
|
2015-08-30 14:29:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function scopeUserDetails($query)
|
|
|
|
{
|
|
|
|
if (Auth::check()) {
|
|
|
|
$query->with([
|
2016-09-30 00:26:31 +02:00
|
|
|
'users' => function ($query) {
|
2015-08-30 14:29:12 +02:00
|
|
|
$query->whereUserId(Auth::user()->id);
|
2021-02-14 03:39:15 +01:00
|
|
|
},
|
2015-08-30 14:29:12 +02:00
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
2017-11-28 17:44:28 +01:00
|
|
|
return $query;
|
2015-08-30 14:29:12 +02:00
|
|
|
}
|
|
|
|
|
2021-02-14 03:39:15 +01:00
|
|
|
public static function mapPublicPlaylistShow(self $playlist)
|
2015-08-30 14:29:12 +02:00
|
|
|
{
|
|
|
|
$tracks = [];
|
|
|
|
foreach ($playlist->tracks as $track) {
|
2015-11-10 05:08:37 +01:00
|
|
|
/** @var $track Track */
|
2015-08-30 14:29:12 +02:00
|
|
|
$tracks[] = Track::mapPublicTrackSummary($track);
|
|
|
|
}
|
|
|
|
|
|
|
|
$formats = [];
|
|
|
|
foreach (Track::$Formats as $name => $format) {
|
2021-02-14 03:39:15 +01:00
|
|
|
if (in_array($name, Track::$LosslessFormats) && ! $playlist->hasLosslessTracksOnly() && ! $playlist->hasLosslessTracks()) {
|
2016-07-10 16:00:59 +02:00
|
|
|
continue;
|
|
|
|
}
|
2016-11-21 12:41:16 +01:00
|
|
|
|
2015-08-30 14:29:12 +02:00
|
|
|
$formats[] = [
|
|
|
|
'name' => $name,
|
|
|
|
'extension' => $format['extension'],
|
|
|
|
'url' => $playlist->getDownloadUrl($name),
|
2015-11-08 18:46:35 +01:00
|
|
|
'size' => Helpers::formatBytes($playlist->getFilesize($name)),
|
2016-07-11 14:40:31 +02:00
|
|
|
'isCacheable' => (in_array($name, Track::$CacheableFormats) ? true : false),
|
2021-02-14 03:39:15 +01:00
|
|
|
'isMixedLosslessness' => (in_array($name, Track::$LosslessFormats) && ! $playlist->hasLosslessTracksOnly() && $playlist->hasLosslessTracks()),
|
2015-08-30 14:29:12 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
$comments = [];
|
|
|
|
foreach ($playlist->comments as $comment) {
|
|
|
|
$comments[] = Comment::mapPublic($comment);
|
|
|
|
}
|
|
|
|
|
|
|
|
$data = self::mapPublicPlaylistSummary($playlist);
|
|
|
|
$data['tracks'] = $tracks;
|
|
|
|
$data['comments'] = $comments;
|
|
|
|
$data['formats'] = $formats;
|
|
|
|
$data['share'] = [
|
2015-12-20 16:07:36 +01:00
|
|
|
'url' => action('PlaylistsController@getShortlink', ['id' => $playlist->id]),
|
2016-06-06 08:29:37 +02:00
|
|
|
'tumblrUrl' => 'http://www.tumblr.com/share/link?url='.urlencode($playlist->url).'&name='.urlencode($playlist->title).'&description='.urlencode($playlist->description),
|
2021-02-14 03:39:15 +01:00
|
|
|
'twitterUrl' => 'https://platform.twitter.com/widgets/tweet_button.html?text='.$playlist->title.' by '.$playlist->user->display_name.' on Pony.fm',
|
2015-08-30 14:29:12 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
return $data;
|
|
|
|
}
|
|
|
|
|
2021-02-14 03:39:15 +01:00
|
|
|
public static function mapPublicPlaylistSummary(self $playlist)
|
2015-08-30 14:29:12 +02:00
|
|
|
{
|
|
|
|
$userData = [
|
|
|
|
'stats' => [
|
|
|
|
'views' => 0,
|
2021-02-14 03:39:15 +01:00
|
|
|
'downloads' => 0,
|
2015-08-30 14:29:12 +02:00
|
|
|
],
|
2021-02-14 03:39:15 +01:00
|
|
|
'is_favourited' => false,
|
2015-08-30 14:29:12 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
if (Auth::check() && $playlist->users->count()) {
|
|
|
|
$userRow = $playlist->users[0];
|
|
|
|
$userData = [
|
|
|
|
'stats' => [
|
2016-06-06 08:29:37 +02:00
|
|
|
'views' => (int) $userRow->view_count,
|
|
|
|
'downloads' => (int) $userRow->download_count,
|
2015-08-30 14:29:12 +02:00
|
|
|
],
|
2021-02-14 03:39:15 +01:00
|
|
|
'is_favourited' => (bool) $userRow->is_favourited,
|
2015-08-30 14:29:12 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
return [
|
2016-06-06 08:29:37 +02:00
|
|
|
'id' => (int) $playlist->id,
|
2015-08-30 14:29:12 +02:00
|
|
|
'track_count' => $playlist->track_count,
|
|
|
|
'title' => $playlist->title,
|
|
|
|
'slug' => $playlist->slug,
|
2015-12-26 16:20:31 +01:00
|
|
|
'created_at' => $playlist->created_at->format('c'),
|
2016-06-06 08:29:37 +02:00
|
|
|
'is_public' => (bool) $playlist->is_public,
|
2015-08-30 14:29:12 +02:00
|
|
|
'stats' => [
|
2016-06-06 08:29:37 +02:00
|
|
|
'views' => (int) $playlist->view_count,
|
|
|
|
'downloads' => (int) $playlist->download_count,
|
|
|
|
'comments' => (int) $playlist->comment_count,
|
2021-02-14 03:39:15 +01:00
|
|
|
'favourites' => (int) $playlist->favourite_count,
|
2015-08-30 14:29:12 +02:00
|
|
|
],
|
|
|
|
'covers' => [
|
|
|
|
'small' => $playlist->getCoverUrl(Image::SMALL),
|
2015-12-13 14:42:37 +01:00
|
|
|
'normal' => $playlist->getCoverUrl(Image::NORMAL),
|
2021-02-14 03:39:15 +01:00
|
|
|
'original' => $playlist->getCoverUrl(Image::ORIGINAL),
|
2015-08-30 14:29:12 +02:00
|
|
|
],
|
|
|
|
'url' => $playlist->url,
|
|
|
|
'user' => [
|
2016-06-06 08:29:37 +02:00
|
|
|
'id' => (int) $playlist->user->id,
|
2015-08-30 14:29:12 +02:00
|
|
|
'name' => $playlist->user->display_name,
|
|
|
|
'url' => $playlist->user->url,
|
|
|
|
],
|
|
|
|
'user_data' => $userData,
|
|
|
|
'permissions' => [
|
|
|
|
'delete' => Auth::check() && Auth::user()->id == $playlist->user_id,
|
2021-02-14 03:39:15 +01:00
|
|
|
'edit' => Auth::check() && Auth::user()->id == $playlist->user_id,
|
|
|
|
],
|
2015-08-30 14:29:12 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
2016-07-09 15:44:49 +02:00
|
|
|
public function tracks(bool $ordered = true)
|
2015-08-30 14:29:12 +02:00
|
|
|
{
|
2016-07-09 15:44:49 +02:00
|
|
|
$query = $this
|
2016-06-06 08:15:56 +02:00
|
|
|
->belongsToMany(Track::class)
|
2015-08-30 14:29:12 +02:00
|
|
|
->withPivot('position')
|
2016-07-05 02:40:55 +02:00
|
|
|
->withTimestamps();
|
2016-07-09 15:44:49 +02:00
|
|
|
|
|
|
|
if ($ordered) {
|
|
|
|
$query = $query->orderBy('position', 'asc');
|
|
|
|
}
|
|
|
|
|
|
|
|
return $query;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function trackCount():int
|
|
|
|
{
|
|
|
|
return $this->tracks(false)->count();
|
2015-08-30 14:29:12 +02:00
|
|
|
}
|
|
|
|
|
2015-11-10 06:49:12 +01:00
|
|
|
public function trackFiles()
|
|
|
|
{
|
2016-09-30 01:56:25 +02:00
|
|
|
$trackIds = $this->tracks->pluck('id');
|
2021-02-14 03:39:15 +01:00
|
|
|
|
2016-08-24 13:48:02 +02:00
|
|
|
return TrackFile::join('tracks', 'tracks.current_version', '=', 'track_files.version')->whereIn('track_id', $trackIds);
|
2015-11-10 06:49:12 +01:00
|
|
|
}
|
|
|
|
|
2015-08-30 14:29:12 +02:00
|
|
|
public function users()
|
|
|
|
{
|
2016-06-06 08:15:56 +02:00
|
|
|
return $this->hasMany(ResourceUser::class);
|
2015-08-30 14:29:12 +02:00
|
|
|
}
|
|
|
|
|
2016-05-27 21:12:40 +02:00
|
|
|
public function comments():HasMany
|
2015-08-30 14:29:12 +02:00
|
|
|
{
|
2016-06-06 08:15:56 +02:00
|
|
|
return $this->hasMany(Comment::class)->orderBy('created_at', 'desc');
|
2015-08-30 14:29:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function pins()
|
|
|
|
{
|
2016-06-06 08:15:56 +02:00
|
|
|
return $this->hasMany(PinnedPlaylist::class);
|
2015-08-30 14:29:12 +02:00
|
|
|
}
|
2016-07-05 02:40:55 +02:00
|
|
|
|
2016-09-30 00:26:31 +02:00
|
|
|
public function favourites():HasMany
|
|
|
|
{
|
2016-05-27 21:12:40 +02:00
|
|
|
return $this->hasMany(Favourite::class);
|
|
|
|
}
|
2015-08-30 14:29:12 +02:00
|
|
|
|
|
|
|
public function user()
|
|
|
|
{
|
2016-06-06 08:15:56 +02:00
|
|
|
return $this->belongsTo(User::class);
|
2015-08-30 14:29:12 +02:00
|
|
|
}
|
|
|
|
|
2016-09-30 00:26:31 +02:00
|
|
|
public function activities():MorphMany
|
|
|
|
{
|
2016-05-27 21:12:40 +02:00
|
|
|
return $this->morphMany(Activity::class, 'resource');
|
|
|
|
}
|
|
|
|
|
2015-08-30 14:29:12 +02:00
|
|
|
public function hasPinFor($userId)
|
|
|
|
{
|
|
|
|
foreach ($this->pins as $pin) {
|
|
|
|
if ($pin->user_id == $userId) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function canView($user)
|
|
|
|
{
|
2016-11-21 12:41:16 +01:00
|
|
|
return $this->is_public || ($user != null && $user->id == $this->user_id) || ($user != null && $user->hasRole('admin'));
|
2015-08-30 14:29:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getUrlAttribute()
|
|
|
|
{
|
2015-12-20 16:07:36 +01:00
|
|
|
return action('PlaylistsController@getPlaylist', ['id' => $this->id, 'slug' => $this->slug]);
|
2015-08-30 14:29:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getDownloadUrl($format)
|
|
|
|
{
|
2015-12-26 04:00:43 +01:00
|
|
|
return action('PlaylistsController@getDownload', ['id' => $this->id, 'format' => Track::$Formats[$format]['extension']]);
|
2015-08-30 14:29:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getCoverUrl($type = Image::NORMAL)
|
|
|
|
{
|
|
|
|
if ($this->tracks->count() == 0) {
|
|
|
|
return $this->user->getAvatarUrl($type);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $this->tracks[0]->getCoverUrl($type);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function pin($userId)
|
|
|
|
{
|
|
|
|
$pin = new PinnedPlaylist();
|
|
|
|
$pin->playlist_id = $this->id;
|
|
|
|
$pin->user_id = $userId;
|
|
|
|
$pin->save();
|
|
|
|
}
|
|
|
|
|
|
|
|
private function getCacheKey($key)
|
|
|
|
{
|
2016-06-06 08:29:37 +02:00
|
|
|
return 'playlist-'.$this->id.'-'.$key;
|
2015-08-30 14:29:12 +02:00
|
|
|
}
|
2016-01-07 19:16:37 +01:00
|
|
|
|
2016-09-30 00:26:31 +02:00
|
|
|
public function delete()
|
|
|
|
{
|
2016-07-10 03:16:25 +02:00
|
|
|
DB::transaction(function () {
|
|
|
|
$this->activities()->delete();
|
|
|
|
parent::delete();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2016-01-07 19:16:37 +01:00
|
|
|
/**
|
|
|
|
* Returns this model in Elasticsearch-friendly form. The array returned by
|
|
|
|
* this method should match the current mapping for this model's ES type.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
2016-09-30 00:26:31 +02:00
|
|
|
public function toElasticsearch():array
|
|
|
|
{
|
2016-01-16 05:10:20 +01:00
|
|
|
return [
|
|
|
|
'title' => $this->title,
|
|
|
|
'curator' => $this->user->display_name,
|
|
|
|
'tracks' => $this->tracks->pluck('title'),
|
|
|
|
];
|
2016-01-07 19:16:37 +01:00
|
|
|
}
|
2016-01-17 11:33:58 +01:00
|
|
|
|
|
|
|
/**
|
2021-02-14 03:39:15 +01:00
|
|
|
* {@inheritdoc}
|
2016-01-17 11:33:58 +01:00
|
|
|
*/
|
2016-09-30 00:26:31 +02:00
|
|
|
public function shouldBeIndexed():bool
|
|
|
|
{
|
2016-01-17 11:33:58 +01:00
|
|
|
return $this->is_public &&
|
|
|
|
$this->track_count > 0 &&
|
2021-02-14 03:39:15 +01:00
|
|
|
! $this->trashed();
|
2016-01-17 11:33:58 +01:00
|
|
|
}
|
2016-05-27 21:12:40 +02:00
|
|
|
|
|
|
|
/**
|
2021-02-14 03:39:15 +01:00
|
|
|
* {@inheritdoc}
|
2016-05-27 21:12:40 +02:00
|
|
|
*/
|
2016-09-30 00:26:31 +02:00
|
|
|
public function getResourceType():string
|
|
|
|
{
|
2016-05-27 21:12:40 +02:00
|
|
|
return 'playlist';
|
|
|
|
}
|
2015-10-25 06:17:45 +01:00
|
|
|
}
|