Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
aboelkassem committed Nov 15, 2020
1 parent a9e479f commit 43e1b58
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
Binary file modified Listify.Backend/.vs/Listify.Backend/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
2 changes: 1 addition & 1 deletion Listify.Backend/Modules/Listify.DAL/ListifyDAL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ public virtual async Task<PlaylistVM> ReadPlaylistAsync(Guid id, Guid applicatio
var entity = await _context.Playlists
.Include(s => s.PlaylistGenres)
.Include(s => s.ApplicationUser)
.FirstOrDefaultAsync(s => s.Id == id && s.ApplicationUserId == applicationUserId && s.Active);
.FirstOrDefaultAsync(s => s.Id == id && s.Active);

if (entity != null)
{
Expand Down
3 changes: 3 additions & 0 deletions Listify/src/app/playlist/playlist.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export class PlaylistComponent implements OnInit, OnDestroy {
this.playlistGenres = playlist?.playlistGenres;
this.songsPlaylist = playlist?.songsPlaylist;
this.playlistImageUrl = playlist.playlistImageUrl;
this.loading = false;

if (this.playlist.applicationUser.id === this.hubService.applicationUser.id) {
this.isOwner = true;
Expand Down Expand Up @@ -133,6 +134,7 @@ export class PlaylistComponent implements OnInit, OnDestroy {
this.route.params.subscribe(params => {
const id = params['id']; // + params converts id to numbers
if (id != null) {
this.id = id;
this.hubService.requestPlaylist(id);
}
});
Expand All @@ -141,6 +143,7 @@ export class PlaylistComponent implements OnInit, OnDestroy {

ngOnInit(): void {
// this.hubService.requestSongsPlaylist(this.playlist.id);
this.loading = true;
this.hubService.requestGenres();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export class PlaylistscommunityComponent implements OnInit, OnDestroy, AfterView
});

this.$playlistsCommunityReceivedSubscription = this.hubService.getPlaylistsCommunity().subscribe(playlists => {
this.loading = false;
this.playlists = playlists;
this.dataSource.data = this.playlists;
this.loading = false;
});
}

Expand Down
4 changes: 2 additions & 2 deletions Listify/src/app/shared/player/player.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ export class PlayerComponent implements OnInit, OnDestroy {
}

this.playerService.setCurrentSong(this.songQueued);
this.youtubeService.loadVideoAndSeek(response.songQueued.song.youtubeId, response.currentTime);
this.youtubeService.play();
// this.youtubeService.loadVideoAndSeek(response.songQueued.song.youtubeId, response.currentTime);
// this.youtubeService.play();
});

this.$updatedChatColorSubscription = this.roomService.getUpdatedChatColor().subscribe(applicationUser => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export class SongsplaylistComponent implements OnInit, OnDestroy, AfterViewInit
this.songsPlaylist = playlist.songsPlaylist;

this.dataSource.data = this.songsPlaylist;
this.dataSource.sort = this.sort;
}
});
}
Expand Down

0 comments on commit 43e1b58

Please sign in to comment.