diff --git a/MusicApp/MusicApp.csproj b/MusicApp/MusicApp.csproj index 0bbf2f7..82f3e74 100644 --- a/MusicApp/MusicApp.csproj +++ b/MusicApp/MusicApp.csproj @@ -268,6 +268,7 @@ + diff --git a/MusicApp/Resources/Portable Class/AddToPlaylistAdapter.cs b/MusicApp/Resources/Portable Class/AddToPlaylistAdapter.cs index 0ee047d..d4cfc42 100644 --- a/MusicApp/Resources/Portable Class/AddToPlaylistAdapter.cs +++ b/MusicApp/Resources/Portable Class/AddToPlaylistAdapter.cs @@ -1,4 +1,5 @@ using Android.App; +using Android.Content.Res; using Android.Graphics; using Android.Support.V7.Widget; using Android.Views; @@ -36,9 +37,17 @@ namespace MusicApp.Resources.Portable_Class if (Playlists[position].SyncState == SyncState.True) { + holder.SyncLoading.Visibility = ViewStates.Gone; holder.Status.Visibility = ViewStates.Visible; holder.Status.SetImageResource(Resource.Drawable.Sync); } + else if(Playlists[position].SyncState == SyncState.Loading) + { + holder.Status.Visibility = ViewStates.Gone; + holder.SyncLoading.Visibility = ViewStates.Visible; + if (MainActivity.Theme == 1) + holder.SyncLoading.IndeterminateTintList = ColorStateList.ValueOf(Color.White); + } else if(Playlists[position].YoutubeID != null) { holder.Status.Visibility = ViewStates.Visible; @@ -47,6 +56,7 @@ namespace MusicApp.Resources.Portable_Class else { holder.Status.Visibility = ViewStates.Gone; + holder.SyncLoading.Visibility = ViewStates.Gone; } if (MainActivity.Theme == 1) @@ -89,12 +99,14 @@ namespace MusicApp.Resources.Portable_Class public TextView Title; public CheckBox Added; public ImageView Status; + public ProgressBar SyncLoading; public AddToPlaylistHolder(View itemView, Action listener) : base(itemView) { Title = itemView.FindViewById(Resource.Id.title); Added = itemView.FindViewById(Resource.Id.added); Status = itemView.FindViewById(Resource.Id.status); + SyncLoading = itemView.FindViewById(Resource.Id.syncLoading); itemView.Click += (sender, e) => listener(AdapterPosition); } diff --git a/MusicApp/Resources/Portable Class/Browse.cs b/MusicApp/Resources/Portable Class/Browse.cs index 772a79f..a9333aa 100644 --- a/MusicApp/Resources/Portable Class/Browse.cs +++ b/MusicApp/Resources/Portable Class/Browse.cs @@ -331,7 +331,7 @@ namespace MusicApp.Resources.Portable_Class context.StartService(intent); } - public static bool SongIsContained(long audioID, long playlistID) + private static bool SongIsContained(long audioID, long playlistID) { Uri uri = MediaStore.Audio.Playlists.Members.GetContentUri("external", playlistID); CursorLoader loader = new CursorLoader(Android.App.Application.Context, uri, null, null, null, null); @@ -352,8 +352,37 @@ namespace MusicApp.Resources.Portable_Class return false; } + private async static Task SongIsContained(string audioID, string playlistID) + { + try + { + var request = YoutubeEngine.youtubeService.PlaylistItems.List("snippet, contentDetails"); + request.PlaylistId = playlistID; + request.VideoId = audioID; + request.MaxResults = 1; + + var response = await request.ExecuteAsync(); + if (response.Items.Count > 0) + return true; + } + catch (System.Net.Http.HttpRequestException) + { + MainActivity.instance.Timout(); + } + return false; + } + public static async void GetPlaylist(Song item) { + List SyncedPlaylists = new List(); + await Task.Run(() => + { + SQLiteConnection db = new SQLiteConnection(System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "SyncedPlaylists.sqlite")); + db.CreateTable(); + + SyncedPlaylists = db.Table().ToList(); + }); + List Playlists = new List(); Uri uri = MediaStore.Audio.Playlists.ExternalContentUri; @@ -373,6 +402,17 @@ namespace MusicApp.Resources.Portable_Class { SongContained = SongIsContained(item.Id, id) }; + PlaylistItem synced = SyncedPlaylists.Find(x => x.LocalID == id); + if (synced != null) + { + if (synced.YoutubeID == null) + playlist.SyncState = SyncState.Loading; + else + { + playlist.SyncState = SyncState.True; + playlist.YoutubeID = synced.YoutubeID; + } + } Playlists.Add(playlist); } while (cursor.MoveToNext()); @@ -405,6 +445,8 @@ namespace MusicApp.Resources.Portable_Class { if (playlist.LocalID != 0) AddToPlaylist(item, playlist.Name, playlist.LocalID); + if (playlist.YoutubeID != null) + YoutubeEngine.AddToPlaylist(item, playlist.YoutubeID); } else { @@ -427,20 +469,24 @@ namespace MusicApp.Resources.Portable_Class Layout.FindViewById(Resource.Id.CreatePlaylist).Click += (sender, e) => { dialog.Dismiss(); CreatePlalistDialog(item); }; dialog.Show(); + if(item.youtubeID == null) { item = CompleteItem(item); if (item.youtubeID == null) { Toast.MakeText(MainActivity.instance, "Song can't be found on youtube, can't add it to a youtube playlist.", ToastLength.Long).Show(); + Playlists.Remove(Loading); + adapter.NotifyItemRemoved(Playlists.Count); return; } } - if (!await MainActivity.instance.WaitForYoutube()) { Toast.MakeText(MainActivity.instance, "Error while loading.\nCheck your internet connection and check if your logged in.", ToastLength.Long).Show(); + Playlists.Remove(Loading); + adapter.NotifyItemRemoved(Playlists.Count); return; } @@ -453,8 +499,29 @@ namespace MusicApp.Resources.Portable_Class foreach(var playlist in response.Items) { - Playlists.Insert(Playlists.Count - 1, new PlaylistItem(playlist.Snippet.Title, playlist.Id)); - adapter.NotifyItemInserted(Playlists.Count - 1); + if (SyncedPlaylists.Find(x => x.Name == playlist.Snippet.Title) != null) + { + int position = Playlists.FindIndex(x => x.Name == playlist.Snippet.Title && x.SyncState == SyncState.Loading); + if(position != -1) + { + Playlists[position].SyncState = SyncState.True; + Playlists[position].YoutubeID = playlist.Id; + + AddToPlaylistHolder holder = (AddToPlaylistHolder)ListView.GetChildViewHolder(ListView.GetChildAt(position)); + holder.SyncLoading.Visibility = ViewStates.Gone; + holder.Status.Visibility = ViewStates.Visible; + holder.Status.SetImageResource(Resource.Drawable.Sync); + } + } + else + { + PlaylistItem YtPlaylist = new PlaylistItem(playlist.Snippet.Title, playlist.Id) + { + SongContained = await SongIsContained(item.youtubeID, playlist.Id) + }; + Playlists.Insert(Playlists.Count - 1, YtPlaylist); + adapter.NotifyItemInserted(Playlists.Count - 1); + } } } catch (System.Net.Http.HttpRequestException) @@ -481,7 +548,7 @@ namespace MusicApp.Resources.Portable_Class return; } - public async static void AddToPlaylist(Song item, string playList, long LocalID, int position = -1, bool SyncBehave = true, bool saveAsSynced = false) + public async static void AddToPlaylist(Song item, string playList, long LocalID, bool saveAsSynced = false) { if(LocalID == -1) { @@ -489,7 +556,7 @@ namespace MusicApp.Resources.Portable_Class if (LocalID == -1) CreatePlaylist(playList, item, saveAsSynced); else - AddToPlaylist(item, playList, LocalID, position); + AddToPlaylist(item, playList, LocalID); } else { @@ -501,32 +568,32 @@ namespace MusicApp.Resources.Portable_Class value.Put(MediaStore.Audio.Playlists.Members.PlayOrder, 0); resolver.Insert(MediaStore.Audio.Playlists.Members.GetContentUri("external", LocalID), value); - //Check if this playlist is synced, if it his, add the song to the youtube playlist - if (SyncBehave) - { - PlaylistItem SyncedPlaylist = null; - await Task.Run(() => - { - SQLiteConnection db = new SQLiteConnection(Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "SyncedPlaylists.sqlite")); - db.CreateTable(); + ////Check if this playlist is synced, if it his, add the song to the youtube playlist + //if (SyncBehave) + //{ + // PlaylistItem SyncedPlaylist = null; + // await Task.Run(() => + // { + // SQLiteConnection db = new SQLiteConnection(Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "SyncedPlaylists.sqlite")); + // db.CreateTable(); - SyncedPlaylist = db.Table().ToList().Find(x => x.LocalID == LocalID); - }); + // SyncedPlaylist = db.Table().ToList().Find(x => x.LocalID == LocalID); + // }); - if (SyncedPlaylist != null) - { - if (SyncedPlaylist.YoutubeID != null && SyncedPlaylist.HasWritePermission) - { - Song song = CompleteItem(item); - if (song.youtubeID != null) - YoutubeEngine.AddToPlaylist(song, playList, SyncedPlaylist.YoutubeID, MainActivity.instance, false); - else - Toast.MakeText(MainActivity.instance, "Can't find this song on youtube, it has only been added to the local playlist.", ToastLength.Long).Show(); - } - else - Toast.MakeText(MainActivity.instance, "Playlist has not finished syncing yet, can't add this song to the youtube playlist (but has been added locally). Please check on the playlist view for more details.", ToastLength.Long).Show(); - } - } + // if (SyncedPlaylist != null) + // { + // if (SyncedPlaylist.YoutubeID != null && SyncedPlaylist.HasWritePermission) + // { + // Song song = CompleteItem(item); + // if (song.youtubeID != null) + // YoutubeEngine.AddToPlaylist(song, playList, SyncedPlaylist.YoutubeID, MainActivity.instance, false); + // else + // Toast.MakeText(MainActivity.instance, "Can't find this song on youtube, it has only been added to the local playlist.", ToastLength.Long).Show(); + // } + // else + // Toast.MakeText(MainActivity.instance, "Playlist has not finished syncing yet, can't add this song to the youtube playlist (but has been added locally). Please check on the playlist view for more details.", ToastLength.Long).Show(); + // } + //} } } @@ -536,10 +603,28 @@ namespace MusicApp.Resources.Portable_Class builder.SetTitle("Playlist name"); View view = inflater.Inflate(Resource.Layout.CreatePlaylistDialog, null); builder.SetView(view); + PlaylistLocationAdapter adapter = new PlaylistLocationAdapter(MainActivity.instance, Android.Resource.Layout.SimpleSpinnerItem, new string[] { "Local playlist", "Youtube playlist", "Synced playlist (both local and youtube)" }) + { + YoutubeWorkflow = item.youtubeID != null + }; + adapter.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem); + view.FindViewById(Resource.Id.playlistLocation).Adapter = adapter; builder.SetNegativeButton("Cancel", (senderAlert, args) => { }); builder.SetPositiveButton("Create", (senderAlert, args) => { - CreatePlaylist(view.FindViewById(Resource.Id.playlistName).Text, item); + switch (view.FindViewById(Resource.Id.playlistLocation).SelectedItemPosition) + { + case 0: + CreatePlaylist(view.FindViewById(Resource.Id.playlistName).Text, item); + break; + case 1: + YoutubeEngine.CreatePlaylist(view.FindViewById(Resource.Id.playlistName).Text, item); + break; + case 2: + CreatePlaylist(view.FindViewById(Resource.Id.playlistName).Text, item, true); + YoutubeEngine.CreatePlaylist(view.FindViewById(Resource.Id.playlistName).Text, item); + break; + } }); builder.Show(); } diff --git a/MusicApp/Resources/Portable Class/Downloader.cs b/MusicApp/Resources/Portable Class/Downloader.cs index 424fe83..2a94746 100644 --- a/MusicApp/Resources/Portable Class/Downloader.cs +++ b/MusicApp/Resources/Portable Class/Downloader.cs @@ -244,7 +244,7 @@ namespace MusicApp.Resources.Portable_Class handler.Post(() => { Browse.act = MainActivity.instance; - Browse.AddToPlaylist(Browse.GetSong(path), playlist, -1, queue.FindIndex(x => x.path == path), false, true); + Browse.AddToPlaylist(Browse.GetSong(path), playlist, -1, true); }); } } diff --git a/MusicApp/Resources/Portable Class/LineAdapter.cs b/MusicApp/Resources/Portable Class/LineAdapter.cs index 3cb117d..648c8ab 100644 --- a/MusicApp/Resources/Portable Class/LineAdapter.cs +++ b/MusicApp/Resources/Portable Class/LineAdapter.cs @@ -127,10 +127,7 @@ namespace MusicApp.Resources.Portable_Class break; case 3: - if (item.IsYt) - YoutubeEngine.GetPlaylists(item, MainActivity.instance); - else - Browse.GetPlaylist(item); + Browse.GetPlaylist(item); break; case 5: diff --git a/MusicApp/Resources/Portable Class/Player.cs b/MusicApp/Resources/Portable Class/Player.cs index 26d60c3..f3807ec 100644 --- a/MusicApp/Resources/Portable Class/Player.cs +++ b/MusicApp/Resources/Portable Class/Player.cs @@ -403,16 +403,9 @@ namespace MusicApp.Resources.Portable_Class private void AddToPlaylist_Click(object sender, EventArgs e) { - if (MusicPlayer.queue[MusicPlayer.CurrentID()].IsYt) - { - YoutubeEngine.GetPlaylists(MusicPlayer.queue[MusicPlayer.CurrentID()], MainActivity.instance); - } - else - { - Browse.act = MainActivity.instance; - Browse.inflater = LayoutInflater; - Browse.GetPlaylist(MusicPlayer.queue[MusicPlayer.CurrentID()]); - } + Browse.act = MainActivity.instance; + Browse.inflater = LayoutInflater; + Browse.GetPlaylist(MusicPlayer.queue[MusicPlayer.CurrentID()]); } public void UpdateSeekBar() diff --git a/MusicApp/Resources/Portable Class/Playlist.cs b/MusicApp/Resources/Portable Class/Playlist.cs index 464365d..92d910a 100644 --- a/MusicApp/Resources/Portable Class/Playlist.cs +++ b/MusicApp/Resources/Portable Class/Playlist.cs @@ -509,7 +509,7 @@ namespace MusicApp.Resources.Portable_Class } else if (local) { - builder.SetItems(new string[] { "Play in order", "Random play", "Add To Queue", "Rename", "Sync Playlist" }, (senderAlert, args) => + builder.SetItems(new string[] { "Play in order", "Random play", "Add To Queue", "Rename", "Delete" }, (senderAlert, args) => { switch (args.Which) { @@ -981,8 +981,9 @@ namespace MusicApp.Resources.Portable_Class void RemoveYoutubePlaylist(int position, string playlistID) { + System.Console.WriteLine("&1: Removing playlist at position " + position + " with local playlist count: " + LocalPlaylists.Count + ", playlist name: " + YoutubePlaylists[position - LocalPlaylists.Count].Name); AlertDialog dialog = new AlertDialog.Builder(MainActivity.instance, MainActivity.dialogTheme) - .SetTitle("Do you want to delete the playlist \"" + YoutubePlaylists[position].Name + "\"?") + .SetTitle("Do you want to delete the playlist \"" + YoutubePlaylists[position - LocalPlaylists.Count].Name + "\"?") .SetPositiveButton("Yes", async (sender, e) => { try @@ -990,6 +991,7 @@ namespace MusicApp.Resources.Portable_Class PlaylistsResource.DeleteRequest deleteRequest = YoutubeEngine.youtubeService.Playlists.Delete(playlistID); await deleteRequest.ExecuteAsync(); + System.Console.WriteLine("&2: Removing playlist at position " + position + " with local playlist count: " + LocalPlaylists.Count + ", playlist name: " + YoutubePlaylists[position - LocalPlaylists.Count].Name); YoutubePlaylists.RemoveAt(position - LocalPlaylists.Count); adapter.NotifyItemRemoved(position - LocalPlaylists.Count); diff --git a/MusicApp/Resources/Portable Class/PlaylistAdapter.cs b/MusicApp/Resources/Portable Class/PlaylistAdapter.cs index 04bd02c..d2e9ae5 100644 --- a/MusicApp/Resources/Portable Class/PlaylistAdapter.cs +++ b/MusicApp/Resources/Portable Class/PlaylistAdapter.cs @@ -94,13 +94,11 @@ namespace MusicApp.Resources.Portable_Class holder.Line1.Text = LocalPlaylists[position].Name; holder.Line2.Text = LocalPlaylists[position].Count.ToString() + ((LocalPlaylists[position].Count > 1) ? " elements" : " element"); - holder.more.Tag = position; if (!holder.more.HasOnClickListeners) { holder.more.Click += (sender, e) => { - int tagPosition = (int)((ImageView)sender).Tag; - Playlist.instance.More(tagPosition); + Playlist.instance.More(holder.AdapterPosition); }; } diff --git a/MusicApp/Resources/Portable Class/PlaylistLocationAdapter.cs b/MusicApp/Resources/Portable Class/PlaylistLocationAdapter.cs new file mode 100644 index 0000000..7080bdc --- /dev/null +++ b/MusicApp/Resources/Portable Class/PlaylistLocationAdapter.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using Android.App; +using Android.Content; +using Android.OS; +using Android.Runtime; +using Android.Views; +using Android.Widget; +using Java.Lang; + +namespace MusicApp.Resources.Portable_Class +{ + public class PlaylistLocationAdapter : ArrayAdapter + { + public bool YoutubeWorkflow; + + public PlaylistLocationAdapter(Context context, int resource) : base(context, resource) { } + + public PlaylistLocationAdapter(Context context, int resource, int textViewResourceId) : base(context, resource, textViewResourceId) { } + + public PlaylistLocationAdapter(Context context, int resource, IList objects) : base(context, resource, objects) { } + + public PlaylistLocationAdapter(Context context, int resource, Java.Lang.Object[] objects) : base(context, resource, objects) { } + + public PlaylistLocationAdapter(Context context, int resource, int textViewResourceId, IList objects) : base(context, resource, textViewResourceId, objects) { } + + public PlaylistLocationAdapter(Context context, int resource, int textViewResourceId, Java.Lang.Object[] objects) : base(context, resource, textViewResourceId, objects) { } + + protected PlaylistLocationAdapter(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer) { } + + public override bool AreAllItemsEnabled() + { + return false; + } + + public override bool IsEnabled(int position) + { + if (position == 0) + return true; + else if (YoutubeWorkflow) + return true; + else + return false; + } + } +} \ No newline at end of file diff --git a/MusicApp/Resources/Portable Class/PlaylistTracks.cs b/MusicApp/Resources/Portable Class/PlaylistTracks.cs index 79dddb6..2a15921 100644 --- a/MusicApp/Resources/Portable Class/PlaylistTracks.cs +++ b/MusicApp/Resources/Portable Class/PlaylistTracks.cs @@ -725,10 +725,7 @@ namespace MusicApp.Resources.Portable_Class break; case 4: - if (item.IsYt) - YoutubeEngine.GetPlaylists(item, Activity); - else - Browse.GetPlaylist(item); + Browse.GetPlaylist(item); break; case 5: @@ -769,10 +766,7 @@ namespace MusicApp.Resources.Portable_Class break; case 3: - if (item.IsYt) - YoutubeEngine.GetPlaylists(item, Activity); - else - Browse.GetPlaylist(item); + Browse.GetPlaylist(item); break; case 4: diff --git a/MusicApp/Resources/Portable Class/YoutubeEngine.cs b/MusicApp/Resources/Portable Class/YoutubeEngine.cs index ec0ca45..93af46b 100644 --- a/MusicApp/Resources/Portable Class/YoutubeEngine.cs +++ b/MusicApp/Resources/Portable Class/YoutubeEngine.cs @@ -373,7 +373,7 @@ namespace MusicApp.Resources.Portable_Class PlayLast(item.youtubeID, item.Title, item.Artist, item.Album); break; case 3: - GetPlaylists(item, Activity); + Browse.GetPlaylist(item); break; case 4: Download(item.Title, item.youtubeID); @@ -656,7 +656,6 @@ namespace MusicApp.Resources.Portable_Class public static async void RemoveFromPlaylist(string TrackID) { - System.Console.WriteLine("&Deleting trackID: " + TrackID); try { await youtubeService.PlaylistItems.Delete(TrackID).ExecuteAsync(); @@ -667,108 +666,52 @@ namespace MusicApp.Resources.Portable_Class } } - public static async void GetPlaylists(Song item, Context context) + public async static void AddToPlaylist(Song item, string YoutubeID) { - if(!await MainActivity.instance.WaitForYoutube()) - { - Toast.MakeText(context, "Error while loading.\nCheck your internet connection and check if your logged in.", ToastLength.Long).Show(); - return; - } - - List playList = new List(); - List playListId = new List(); - playList.Add("Create a playlist"); - playListId.Add("newPlaylist"); - try { - PlaylistsResource.ListRequest ytPlaylists = youtubeService.Playlists.List("snippet,contentDetails"); - ytPlaylists.Mine = true; - ytPlaylists.MaxResults = 25; - PlaylistListResponse response = await ytPlaylists.ExecuteAsync(); - - for (int i = 0; i < response.Items.Count; i++) + Console.WriteLine("&Adding song: " + item.Title + "(" + item.youtubeID + "), PlaylistID: " + YoutubeID); + Google.Apis.YouTube.v3.Data.PlaylistItem playlistItem = new Google.Apis.YouTube.v3.Data.PlaylistItem(); + PlaylistItemSnippet snippet = new PlaylistItemSnippet { - Google.Apis.YouTube.v3.Data.Playlist playlist = response.Items[i]; - playList.Add(playlist.Snippet.Title); - playListId.Add(playlist.Id); - } + PlaylistId = YoutubeID + }; + ResourceId resourceId = new ResourceId + { + Kind = "youtube#video", + VideoId = item.youtubeID + }; + snippet.ResourceId = resourceId; + playlistItem.Snippet = snippet; + + var insertRequest = youtubeService.PlaylistItems.Insert(playlistItem, "snippet"); + await insertRequest.ExecuteAsync(); } catch (System.Net.Http.HttpRequestException) { MainActivity.instance.Timout(); } - AlertDialog.Builder builder = new AlertDialog.Builder(context, MainActivity.dialogTheme); - builder.SetTitle("Add to a playlist"); - builder.SetItems(playList.ToArray(), (senderAlert, args) => - { - AddToPlaylist(item, playList[args.Which], playListId[args.Which], context); - }); - builder.Show(); + ////Check if this playlist is synced, if it his, add the song to the local playlist + //if (SyncBehave) + //{ + // PlaylistItem SyncedPlaylist = null; + // await Task.Run(() => + // { + // SQLiteConnection db = new SQLiteConnection(System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "SyncedPlaylists.sqlite")); + // db.CreateTable(); + + // SyncedPlaylist = db.Table().ToList().Find(x => x.YoutubeID == YoutubeID); + // }); + + // if (SyncedPlaylist != null) + // { + // Download(item.Title, item.youtubeID, playlistName); + // } + //} } - public async static void AddToPlaylist(Song item, string playlistName, string YoutubeID, Context context, bool SyncBehave = true) - { - if(YoutubeID == "newPlaylist") - { - AlertDialog.Builder builder = new AlertDialog.Builder(context, MainActivity.dialogTheme); - builder.SetTitle("Playlist name"); - View view = MainActivity.instance.LayoutInflater.Inflate(Resource.Layout.CreatePlaylistDialog, null); - builder.SetView(view); - builder.SetNegativeButton("Cancel", (senderAlert, args) => { }); - builder.SetPositiveButton("Create", (senderAlert, args) => - { - NewPlaylist(view.FindViewById(Resource.Id.playlistName).Text, item.youtubeID); - }); - builder.Show(); - } - else - { - try - { - Google.Apis.YouTube.v3.Data.PlaylistItem playlistItem = new Google.Apis.YouTube.v3.Data.PlaylistItem(); - PlaylistItemSnippet snippet = new PlaylistItemSnippet - { - PlaylistId = YoutubeID - }; - ResourceId resourceId = new ResourceId - { - Kind = "youtube#video", - VideoId = item.youtubeID - }; - snippet.ResourceId = resourceId; - playlistItem.Snippet = snippet; - - var insertRequest = youtubeService.PlaylistItems.Insert(playlistItem, "snippet"); - insertRequest.Execute(); - } - catch (System.Net.Http.HttpRequestException) - { - MainActivity.instance.Timout(); - } - - //Check if this playlist is synced, if it his, add the song to the local playlist - if (SyncBehave) - { - PlaylistItem SyncedPlaylist = null; - await Task.Run(() => - { - SQLiteConnection db = new SQLiteConnection(System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "SyncedPlaylists.sqlite")); - db.CreateTable(); - - SyncedPlaylist = db.Table().ToList().Find(x => x.YoutubeID == YoutubeID); - }); - - if (SyncedPlaylist != null) - { - Download(item.Title, item.youtubeID, playlistName); - } - } - } - } - - public async static void NewPlaylist(string playlistName, string videoID) + public async static void CreatePlaylist(string playlistName, Song item) { try { @@ -782,22 +725,7 @@ namespace MusicApp.Resources.Portable_Class var createRequest = youtubeService.Playlists.Insert(playlist, "snippet, status"); Google.Apis.YouTube.v3.Data.Playlist response = await createRequest.ExecuteAsync(); - - Google.Apis.YouTube.v3.Data.PlaylistItem playlistItem = new Google.Apis.YouTube.v3.Data.PlaylistItem(); - PlaylistItemSnippet snippetItem = new PlaylistItemSnippet - { - PlaylistId = response.Id - }; - ResourceId resourceId = new ResourceId - { - Kind = "youtube#video", - VideoId = videoID - }; - snippetItem.ResourceId = resourceId; - playlistItem.Snippet = snippetItem; - - var insertRequest = youtubeService.PlaylistItems.Insert(playlistItem, "snippet"); - insertRequest.ExecuteAsync(); + AddToPlaylist(item, playlistName); } catch (System.Net.Http.HttpRequestException) { diff --git a/MusicApp/Resources/Resource.Designer.cs b/MusicApp/Resources/Resource.Designer.cs index e750147..bb230a5 100644 --- a/MusicApp/Resources/Resource.Designer.cs +++ b/MusicApp/Resources/Resource.Designer.cs @@ -3118,8 +3118,8 @@ namespace MusicApp // aapt resource value: 0x7f0a004f public const int CTRL = 2131361871; - // aapt resource value: 0x7f0a00b1 - public const int CreatePlaylist = 2131361969; + // aapt resource value: 0x7f0a00b2 + public const int CreatePlaylist = 2131361970; // aapt resource value: 0x7f0a0050 public const int FUNCTION = 2131361872; @@ -3127,8 +3127,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0051 public const int META = 2131361873; - // aapt resource value: 0x7f0a013c - public const int PreferenceScreen = 2131362108; + // aapt resource value: 0x7f0a013d + public const int PreferenceScreen = 2131362109; // aapt resource value: 0x7f0a0052 public const int SHIFT = 2131361874; @@ -3136,14 +3136,14 @@ namespace MusicApp // aapt resource value: 0x7f0a0053 public const int SYM = 2131361875; - // aapt resource value: 0x7f0a013d - public const int accountPreference = 2131362109; + // aapt resource value: 0x7f0a013e + public const int accountPreference = 2131362110; - // aapt resource value: 0x7f0a00b7 - public const int action = 2131361975; + // aapt resource value: 0x7f0a00b8 + public const int action = 2131361976; - // aapt resource value: 0x7f0a0100 - public const int action0 = 2131362048; + // aapt resource value: 0x7f0a0102 + public const int action0 = 2131362050; // aapt resource value: 0x7f0a009e public const int action_bar = 2131361950; @@ -3166,17 +3166,17 @@ namespace MusicApp // aapt resource value: 0x7f0a007c public const int action_bar_title = 2131361916; - // aapt resource value: 0x7f0a00fd - public const int action_container = 2131362045; + // aapt resource value: 0x7f0a00ff + public const int action_container = 2131362047; // aapt resource value: 0x7f0a009f public const int action_context_bar = 2131361951; - // aapt resource value: 0x7f0a0104 - public const int action_divider = 2131362052; + // aapt resource value: 0x7f0a0106 + public const int action_divider = 2131362054; - // aapt resource value: 0x7f0a00fe - public const int action_image = 2131362046; + // aapt resource value: 0x7f0a0100 + public const int action_image = 2131362048; // aapt resource value: 0x7f0a0003 public const int action_menu_divider = 2131361795; @@ -3193,11 +3193,11 @@ namespace MusicApp // aapt resource value: 0x7f0a007e public const int action_mode_close_button = 2131361918; - // aapt resource value: 0x7f0a00ff - public const int action_text = 2131362047; + // aapt resource value: 0x7f0a0101 + public const int action_text = 2131362049; - // aapt resource value: 0x7f0a010d - public const int actions = 2131362061; + // aapt resource value: 0x7f0a010f + public const int actions = 2131362063; // aapt resource value: 0x7f0a007f public const int activity_chooser_view_content = 2131361919; @@ -3205,8 +3205,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0043 public const int add = 2131361859; - // aapt resource value: 0x7f0a0155 - public const int addToQueue = 2131362133; + // aapt resource value: 0x7f0a0156 + public const int addToQueue = 2131362134; // aapt resource value: 0x7f0a00ad public const int added = 2131361965; @@ -3217,8 +3217,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0032 public const int adjust_width = 2131361842; - // aapt resource value: 0x7f0a00b5 - public const int albumArt = 2131361973; + // aapt resource value: 0x7f0a00b6 + public const int albumArt = 2131361974; // aapt resource value: 0x7f0a0092 public const int alertTitle = 2131361938; @@ -3229,11 +3229,11 @@ namespace MusicApp // aapt resource value: 0x7f0a0054 public const int always = 2131361876; - // aapt resource value: 0x7f0a00cd - public const int appbar = 2131361997; + // aapt resource value: 0x7f0a00cf + public const int appbar = 2131361999; - // aapt resource value: 0x7f0a00b9 - public const int artist = 2131361977; + // aapt resource value: 0x7f0a00ba + public const int artist = 2131361978; // aapt resource value: 0x7f0a0071 public const int async = 2131361905; @@ -3241,8 +3241,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0037 public const int auto = 2131361847; - // aapt resource value: 0x7f0a00d2 - public const int backToolbar = 2131362002; + // aapt resource value: 0x7f0a00d4 + public const int backToolbar = 2131362004; // aapt resource value: 0x7f0a004b public const int beginning = 2131361867; @@ -3253,23 +3253,23 @@ namespace MusicApp // aapt resource value: 0x7f0a0059 public const int bottom = 2131361881; - // aapt resource value: 0x7f0a00e8 - public const int bottomView = 2131362024; + // aapt resource value: 0x7f0a00ea + public const int bottomView = 2131362026; - // aapt resource value: 0x7f0a0150 - public const int browseLayout = 2131362128; + // aapt resource value: 0x7f0a0151 + public const int browseLayout = 2131362129; + + // aapt resource value: 0x7f0a00b5 + public const int browseList = 2131361973; // aapt resource value: 0x7f0a00b4 - public const int browseList = 2131361972; - - // aapt resource value: 0x7f0a00b3 - public const int button = 2131361971; + public const int button = 2131361972; // aapt resource value: 0x7f0a0085 public const int buttonPanel = 2131361925; - // aapt resource value: 0x7f0a0101 - public const int cancel_action = 2131362049; + // aapt resource value: 0x7f0a0103 + public const int cancel_action = 2131362051; // aapt resource value: 0x7f0a0060 public const int center = 2131361888; @@ -3280,14 +3280,14 @@ namespace MusicApp // aapt resource value: 0x7f0a0062 public const int center_vertical = 2131361890; - // aapt resource value: 0x7f0a00b6 - public const int checkBox = 2131361974; + // aapt resource value: 0x7f0a00b7 + public const int checkBox = 2131361975; // aapt resource value: 0x7f0a0095 public const int checkbox = 2131361941; - // aapt resource value: 0x7f0a0109 - public const int chronometer = 2131362057; + // aapt resource value: 0x7f0a010b + public const int chronometer = 2131362059; // aapt resource value: 0x7f0a0069 public const int clip_horizontal = 2131361897; @@ -3298,26 +3298,26 @@ namespace MusicApp // aapt resource value: 0x7f0a0055 public const int collapseActionView = 2131361877; - // aapt resource value: 0x7f0a00d0 - public const int collapsingToolbar = 2131362000; + // aapt resource value: 0x7f0a00d2 + public const int collapsingToolbar = 2131362002; - // aapt resource value: 0x7f0a00bd - public const int container = 2131361981; + // aapt resource value: 0x7f0a00bf + public const int container = 2131361983; - // aapt resource value: 0x7f0a00e3 - public const int contentLayout = 2131362019; + // aapt resource value: 0x7f0a00e5 + public const int contentLayout = 2131362021; // aapt resource value: 0x7f0a0088 public const int contentPanel = 2131361928; - // aapt resource value: 0x7f0a00e6 - public const int contentRefresh = 2131362022; + // aapt resource value: 0x7f0a00e8 + public const int contentRefresh = 2131362024; - // aapt resource value: 0x7f0a00e7 - public const int contentView = 2131362023; + // aapt resource value: 0x7f0a00e9 + public const int contentView = 2131362025; - // aapt resource value: 0x7f0a00be - public const int coordinator = 2131361982; + // aapt resource value: 0x7f0a00c0 + public const int coordinator = 2131361984; // aapt resource value: 0x7f0a008f public const int custom = 2131361935; @@ -3334,56 +3334,56 @@ namespace MusicApp // aapt resource value: 0x7f0a0082 public const int default_activity_button = 2131361922; - // aapt resource value: 0x7f0a0152 - public const int delete = 2131362130; + // aapt resource value: 0x7f0a0153 + public const int delete = 2131362131; - // aapt resource value: 0x7f0a00c0 - public const int design_bottom_sheet = 2131361984; + // aapt resource value: 0x7f0a00c2 + public const int design_bottom_sheet = 2131361986; + + // aapt resource value: 0x7f0a00c9 + public const int design_menu_item_action_area = 2131361993; + + // aapt resource value: 0x7f0a00c8 + public const int design_menu_item_action_area_stub = 2131361992; // aapt resource value: 0x7f0a00c7 - public const int design_menu_item_action_area = 2131361991; + public const int design_menu_item_text = 2131361991; // aapt resource value: 0x7f0a00c6 - public const int design_menu_item_action_area_stub = 2131361990; - - // aapt resource value: 0x7f0a00c5 - public const int design_menu_item_text = 2131361989; - - // aapt resource value: 0x7f0a00c4 - public const int design_navigation_view = 2131361988; + public const int design_navigation_view = 2131361990; // aapt resource value: 0x7f0a003d public const int disableHome = 2131361853; - // aapt resource value: 0x7f0a00b0 - public const int divider = 2131361968; + // aapt resource value: 0x7f0a00b1 + public const int divider = 2131361969; - // aapt resource value: 0x7f0a0129 - public const int downFAB = 2131362089; + // aapt resource value: 0x7f0a012b + public const int downFAB = 2131362091; - // aapt resource value: 0x7f0a015b - public const int download = 2131362139; + // aapt resource value: 0x7f0a015c + public const int download = 2131362140; - // aapt resource value: 0x7f0a0153 - public const int downloadMDfromYT = 2131362131; + // aapt resource value: 0x7f0a0154 + public const int downloadMDfromYT = 2131362132; - // aapt resource value: 0x7f0a00ca - public const int downloadStatus = 2131361994; + // aapt resource value: 0x7f0a00cc + public const int downloadStatus = 2131361996; - // aapt resource value: 0x7f0a0133 - public const int edit = 2131362099; + // aapt resource value: 0x7f0a0135 + public const int edit = 2131362101; // aapt resource value: 0x7f0a00a0 public const int edit_query = 2131361952; - // aapt resource value: 0x7f0a00d9 - public const int emptyLoadingLayout = 2131362009; + // aapt resource value: 0x7f0a00db + public const int emptyLoadingLayout = 2131362011; // aapt resource value: 0x7f0a004c public const int end = 2131361868; - // aapt resource value: 0x7f0a010f - public const int end_padder = 2131362063; + // aapt resource value: 0x7f0a0111 + public const int end_padder = 2131362065; // aapt resource value: 0x7f0a005b public const int enterAlways = 2131361883; @@ -3454,8 +3454,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0030 public const int exo_subtitles = 2131361840; - // aapt resource value: 0x7f0a00da - public const int exo_track_selection_view = 2131362010; + // aapt resource value: 0x7f0a00dc + public const int exo_track_selection_view = 2131362012; // aapt resource value: 0x7f0a0080 public const int expand_activities_button = 2131361920; @@ -3463,11 +3463,11 @@ namespace MusicApp // aapt resource value: 0x7f0a0094 public const int expanded_menu = 2131361940; - // aapt resource value: 0x7f0a00dc - public const int expendChilds = 2131362012; + // aapt resource value: 0x7f0a00de + public const int expendChilds = 2131362014; - // aapt resource value: 0x7f0a00cb - public const int fileName = 2131361995; + // aapt resource value: 0x7f0a00cd + public const int fileName = 2131361997; // aapt resource value: 0x7f0a006b public const int fill = 2131361899; @@ -3478,8 +3478,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0063 public const int fill_vertical = 2131361891; - // aapt resource value: 0x7f0a0159 - public const int filter = 2131362137; + // aapt resource value: 0x7f0a015a + public const int filter = 2131362138; // aapt resource value: 0x7f0a0076 public const int fit = 2131361910; @@ -3493,44 +3493,44 @@ namespace MusicApp // aapt resource value: 0x7f0a0078 public const int fixed_width = 2131361912; - // aapt resource value: 0x7f0a00db - public const int folderList = 2131362011; - // aapt resource value: 0x7f0a00dd - public const int folderName = 2131362013; + public const int folderList = 2131362013; - // aapt resource value: 0x7f0a00de - public const int folderUsed = 2131362014; + // aapt resource value: 0x7f0a00df + public const int folderName = 2131362015; + + // aapt resource value: 0x7f0a00e0 + public const int folderUsed = 2131362016; // aapt resource value: 0x7f0a0073 public const int forever = 2131361907; - // aapt resource value: 0x7f0a015c - public const int fork = 2131362140; + // aapt resource value: 0x7f0a015d + public const int fork = 2131362141; // aapt resource value: 0x7f0a000a public const int ghost_view = 2131361802; - // aapt resource value: 0x7f0a012a - public const int headerArt = 2131362090; - - // aapt resource value: 0x7f0a012d - public const int headerAuthor = 2131362093; - - // aapt resource value: 0x7f0a0131 - public const int headerMore = 2131362097; - - // aapt resource value: 0x7f0a012e - public const int headerNumber = 2131362094; + // aapt resource value: 0x7f0a012c + public const int headerArt = 2131362092; // aapt resource value: 0x7f0a012f - public const int headerPlay = 2131362095; + public const int headerAuthor = 2131362095; + + // aapt resource value: 0x7f0a0133 + public const int headerMore = 2131362099; // aapt resource value: 0x7f0a0130 - public const int headerShuffle = 2131362096; + public const int headerNumber = 2131362096; - // aapt resource value: 0x7f0a012c - public const int headerTitle = 2131362092; + // aapt resource value: 0x7f0a0131 + public const int headerPlay = 2131362097; + + // aapt resource value: 0x7f0a0132 + public const int headerShuffle = 2131362098; + + // aapt resource value: 0x7f0a012e + public const int headerTitle = 2131362094; // aapt resource value: 0x7f0a0005 public const int home = 2131361797; @@ -3541,14 +3541,14 @@ namespace MusicApp // aapt resource value: 0x7f0a0084 public const int icon = 2131361924; - // aapt resource value: 0x7f0a0148 - public const int icon1 = 2131362120; + // aapt resource value: 0x7f0a0149 + public const int icon1 = 2131362121; - // aapt resource value: 0x7f0a0137 - public const int icon_frame = 2131362103; + // aapt resource value: 0x7f0a0138 + public const int icon_frame = 2131362104; - // aapt resource value: 0x7f0a010e - public const int icon_group = 2131362062; + // aapt resource value: 0x7f0a0110 + public const int icon_group = 2131362064; // aapt resource value: 0x7f0a0034 public const int icon_only = 2131361844; @@ -3559,14 +3559,14 @@ namespace MusicApp // aapt resource value: 0x7f0a0081 public const int image = 2131361921; - // aapt resource value: 0x7f0a010a - public const int info = 2131362058; + // aapt resource value: 0x7f0a010c + public const int info = 2131362060; - // aapt resource value: 0x7f0a011e - public const int infoPanel = 2131362078; + // aapt resource value: 0x7f0a0120 + public const int infoPanel = 2131362080; - // aapt resource value: 0x7f0a0146 - public const int isLive = 2131362118; + // aapt resource value: 0x7f0a0147 + public const int isLive = 2131362119; // aapt resource value: 0x7f0a0074 public const int italic = 2131361908; @@ -3574,20 +3574,20 @@ namespace MusicApp // aapt resource value: 0x7f0a0000 public const int item_touch_helper_previous_elevation = 2131361792; - // aapt resource value: 0x7f0a00bc - public const int largeLabel = 2131361980; + // aapt resource value: 0x7f0a00be + public const int largeLabel = 2131361982; - // aapt resource value: 0x7f0a0113 - public const int lastButton = 2131362067; + // aapt resource value: 0x7f0a0115 + public const int lastButton = 2131362069; // aapt resource value: 0x7f0a0064 public const int left = 2131361892; - // aapt resource value: 0x7f0a0144 - public const int leftButtons = 2131362116; + // aapt resource value: 0x7f0a0145 + public const int leftButtons = 2131362117; - // aapt resource value: 0x7f0a00b2 - public const int leftIcon = 2131361970; + // aapt resource value: 0x7f0a00b3 + public const int leftIcon = 2131361971; // aapt resource value: 0x7f0a0039 public const int light = 2131361849; @@ -3595,17 +3595,17 @@ namespace MusicApp // aapt resource value: 0x7f0a0017 public const int line1 = 2131361815; - // aapt resource value: 0x7f0a014c - public const int line2 = 2131362124; + // aapt resource value: 0x7f0a014d + public const int line2 = 2131362125; // aapt resource value: 0x7f0a0018 public const int line3 = 2131361816; - // aapt resource value: 0x7f0a00df - public const int lineRecycler = 2131362015; + // aapt resource value: 0x7f0a00e1 + public const int lineRecycler = 2131362017; - // aapt resource value: 0x7f0a00cf - public const int list = 2131361999; + // aapt resource value: 0x7f0a00d1 + public const int list = 2131362001; // aapt resource value: 0x7f0a003a public const int listMode = 2131361850; @@ -3613,89 +3613,89 @@ namespace MusicApp // aapt resource value: 0x7f0a0083 public const int list_item = 2131361923; - // aapt resource value: 0x7f0a00f8 - public const int localPlay = 2131362040; + // aapt resource value: 0x7f0a00fa + public const int localPlay = 2131362042; - // aapt resource value: 0x7f0a00e2 - public const int logButton = 2131362018; + // aapt resource value: 0x7f0a00e4 + public const int logButton = 2131362020; - // aapt resource value: 0x7f0a014e - public const int masked = 2131362126; + // aapt resource value: 0x7f0a014f + public const int masked = 2131362127; - // aapt resource value: 0x7f0a0143 - public const int maxValue = 2131362115; + // aapt resource value: 0x7f0a0144 + public const int maxValue = 2131362116; - // aapt resource value: 0x7f0a0103 - public const int media_actions = 2131362051; + // aapt resource value: 0x7f0a0105 + public const int media_actions = 2131362053; - // aapt resource value: 0x7f0a014b - public const int message = 2131362123; - - // aapt resource value: 0x7f0a00d6 - public const int metadataAlbum = 2131362006; - - // aapt resource value: 0x7f0a00d1 - public const int metadataArt = 2131362001; - - // aapt resource value: 0x7f0a00d5 - public const int metadataArtist = 2131362005; - - // aapt resource value: 0x7f0a00d3 - public const int metadataCardView = 2131362003; + // aapt resource value: 0x7f0a014c + public const int message = 2131362124; // aapt resource value: 0x7f0a00d8 - public const int metadataFAB = 2131362008; + public const int metadataAlbum = 2131362008; - // aapt resource value: 0x7f0a00d4 - public const int metadataTitle = 2131362004; + // aapt resource value: 0x7f0a00d3 + public const int metadataArt = 2131362003; // aapt resource value: 0x7f0a00d7 - public const int metadataYID = 2131362007; + public const int metadataArtist = 2131362007; + + // aapt resource value: 0x7f0a00d5 + public const int metadataCardView = 2131362005; + + // aapt resource value: 0x7f0a00da + public const int metadataFAB = 2131362010; + + // aapt resource value: 0x7f0a00d6 + public const int metadataTitle = 2131362006; + + // aapt resource value: 0x7f0a00d9 + public const int metadataYID = 2131362009; // aapt resource value: 0x7f0a004d public const int middle = 2131361869; - // aapt resource value: 0x7f0a0142 - public const int minValue = 2131362114; + // aapt resource value: 0x7f0a0143 + public const int minValue = 2131362115; // aapt resource value: 0x7f0a006e public const int mini = 2131361902; - // aapt resource value: 0x7f0a00c9 - public const int more = 2131361993; + // aapt resource value: 0x7f0a00cb + public const int more = 2131361995; - // aapt resource value: 0x7f0a0136 - public const int moreButton = 2131362102; + // aapt resource value: 0x7f0a0137 + public const int moreButton = 2131362103; // aapt resource value: 0x7f0a0044 public const int multiply = 2131361860; - // aapt resource value: 0x7f0a014f - public const int musicLayout = 2131362127; + // aapt resource value: 0x7f0a0150 + public const int musicLayout = 2131362128; - // aapt resource value: 0x7f0a00c3 - public const int navigation_header_container = 2131361987; + // aapt resource value: 0x7f0a00c5 + public const int navigation_header_container = 2131361989; // aapt resource value: 0x7f0a0057 public const int never = 2131361879; - // aapt resource value: 0x7f0a0123 - public const int nextArt = 2131362083; - - // aapt resource value: 0x7f0a0126 - public const int nextArtist = 2131362086; - - // aapt resource value: 0x7f0a0116 - public const int nextButton = 2131362070; - - // aapt resource value: 0x7f0a0122 - public const int nextSong = 2131362082; - // aapt resource value: 0x7f0a0125 - public const int nextTitle = 2131362085; + public const int nextArt = 2131362085; - // aapt resource value: 0x7f0a00fc - public const int noPlaylist = 2131362044; + // aapt resource value: 0x7f0a0128 + public const int nextArtist = 2131362088; + + // aapt resource value: 0x7f0a0118 + public const int nextButton = 2131362072; + + // aapt resource value: 0x7f0a0124 + public const int nextSong = 2131362084; + + // aapt resource value: 0x7f0a0127 + public const int nextTitle = 2131362087; + + // aapt resource value: 0x7f0a00fe + public const int noPlaylist = 2131362046; // aapt resource value: 0x7f0a0033 public const int none = 2131361843; @@ -3703,23 +3703,23 @@ namespace MusicApp // aapt resource value: 0x7f0a003b public const int normal = 2131361851; - // aapt resource value: 0x7f0a010c - public const int notification_background = 2131362060; + // aapt resource value: 0x7f0a010e + public const int notification_background = 2131362062; - // aapt resource value: 0x7f0a0106 - public const int notification_main_column = 2131362054; + // aapt resource value: 0x7f0a0108 + public const int notification_main_column = 2131362056; - // aapt resource value: 0x7f0a0105 - public const int notification_main_column_container = 2131362053; + // aapt resource value: 0x7f0a0107 + public const int notification_main_column_container = 2131362055; - // aapt resource value: 0x7f0a0110 - public const int numberPicker = 2131362064; + // aapt resource value: 0x7f0a0112 + public const int numberPicker = 2131362066; // aapt resource value: 0x7f0a0075 public const int one = 2131361909; - // aapt resource value: 0x7f0a014a - public const int pager = 2131362122; + // aapt resource value: 0x7f0a014b + public const int pager = 2131362123; // aapt resource value: 0x7f0a0067 public const int parallax = 2131361895; @@ -3733,62 +3733,65 @@ namespace MusicApp // aapt resource value: 0x7f0a0068 public const int pin = 2131361896; + // aapt resource value: 0x7f0a0116 + public const int playButton = 2131362070; + // aapt resource value: 0x7f0a0114 - public const int playButton = 2131362068; + public const int playerAlbum = 2131362068; - // aapt resource value: 0x7f0a0112 - public const int playerAlbum = 2131362066; - - // aapt resource value: 0x7f0a0120 - public const int playerArtist = 2131362080; - - // aapt resource value: 0x7f0a0115 - public const int playerBuffer = 2131362069; - - // aapt resource value: 0x7f0a011b - public const int playerDark = 2131362075; - - // aapt resource value: 0x7f0a0119 - public const int playerDownload = 2131362073; - - // aapt resource value: 0x7f0a00f5 - public const int playerFrame = 2131362037; - - // aapt resource value: 0x7f0a0118 - public const int playerPlaylistAdd = 2131362072; - - // aapt resource value: 0x7f0a00e9 - public const int playerSheet = 2131362025; + // aapt resource value: 0x7f0a0122 + public const int playerArtist = 2131362082; // aapt resource value: 0x7f0a0117 - public const int playerSleep = 2131362071; + public const int playerBuffer = 2131362071; - // aapt resource value: 0x7f0a011f - public const int playerTitle = 2131362079; + // aapt resource value: 0x7f0a011d + public const int playerDark = 2131362077; - // aapt resource value: 0x7f0a0111 - public const int playerView = 2131362065; + // aapt resource value: 0x7f0a011b + public const int playerDownload = 2131362075; + + // aapt resource value: 0x7f0a00f7 + public const int playerFrame = 2131362039; // aapt resource value: 0x7f0a011a - public const int playerYoutube = 2131362074; + public const int playerPlaylistAdd = 2131362074; - // aapt resource value: 0x7f0a012b - public const int playlistDark = 2131362091; + // aapt resource value: 0x7f0a00eb + public const int playerSheet = 2131362027; - // aapt resource value: 0x7f0a00e4 - public const int playlistHeader = 2131362020; + // aapt resource value: 0x7f0a0119 + public const int playerSleep = 2131362073; - // aapt resource value: 0x7f0a0151 - public const int playlistLayout = 2131362129; + // aapt resource value: 0x7f0a0121 + public const int playerTitle = 2131362081; - // aapt resource value: 0x7f0a00ba - public const int playlistName = 2131361978; + // aapt resource value: 0x7f0a0113 + public const int playerView = 2131362067; - // aapt resource value: 0x7f0a013f - public const int playlistURL = 2131362111; + // aapt resource value: 0x7f0a011c + public const int playerYoutube = 2131362076; - // aapt resource value: 0x7f0a00cc - public const int progress = 2131361996; + // aapt resource value: 0x7f0a012d + public const int playlistDark = 2131362093; + + // aapt resource value: 0x7f0a00e6 + public const int playlistHeader = 2131362022; + + // aapt resource value: 0x7f0a0152 + public const int playlistLayout = 2131362130; + + // aapt resource value: 0x7f0a00bc + public const int playlistLocation = 2131361980; + + // aapt resource value: 0x7f0a00bb + public const int playlistName = 2131361979; + + // aapt resource value: 0x7f0a0140 + public const int playlistURL = 2131362112; + + // aapt resource value: 0x7f0a00ce + public const int progress = 2131361998; // aapt resource value: 0x7f0a0006 public const int progress_circular = 2131361798; @@ -3796,47 +3799,47 @@ namespace MusicApp // aapt resource value: 0x7f0a0007 public const int progress_horizontal = 2131361799; - // aapt resource value: 0x7f0a013e - public const int queueSwitch = 2131362110; + // aapt resource value: 0x7f0a013f + public const int queueSwitch = 2131362111; - // aapt resource value: 0x7f0a00fa - public const int quickPlay = 2131362042; + // aapt resource value: 0x7f0a00fc + public const int quickPlay = 2131362044; - // aapt resource value: 0x7f0a00f7 - public const int quickPlayLinear = 2131362039; + // aapt resource value: 0x7f0a00f9 + public const int quickPlayLinear = 2131362041; // aapt resource value: 0x7f0a0097 public const int radio = 2131361943; - // aapt resource value: 0x7f0a00af - public const int recycler = 2131361967; + // aapt resource value: 0x7f0a00b0 + public const int recycler = 2131361968; - // aapt resource value: 0x7f0a0149 - public const int refine = 2131362121; + // aapt resource value: 0x7f0a014a + public const int refine = 2131362122; - // aapt resource value: 0x7f0a0156 - public const int rename = 2131362134; + // aapt resource value: 0x7f0a0157 + public const int rename = 2131362135; - // aapt resource value: 0x7f0a0145 - public const int reorder = 2131362117; + // aapt resource value: 0x7f0a0146 + public const int reorder = 2131362118; - // aapt resource value: 0x7f0a0158 - public const int repeat = 2131362136; + // aapt resource value: 0x7f0a0159 + public const int repeat = 2131362137; - // aapt resource value: 0x7f0a0121 - public const int reveal = 2131362081; + // aapt resource value: 0x7f0a0123 + public const int reveal = 2131362083; // aapt resource value: 0x7f0a0065 public const int right = 2131361893; - // aapt resource value: 0x7f0a0132 - public const int rightButtons = 2131362098; + // aapt resource value: 0x7f0a0134 + public const int rightButtons = 2131362100; - // aapt resource value: 0x7f0a010b - public const int right_icon = 2131362059; + // aapt resource value: 0x7f0a010d + public const int right_icon = 2131362061; - // aapt resource value: 0x7f0a0107 - public const int right_side = 2131362055; + // aapt resource value: 0x7f0a0109 + public const int right_side = 2131362057; // aapt resource value: 0x7f0a000c public const int save_image_matrix = 2131361804; @@ -3865,11 +3868,11 @@ namespace MusicApp // aapt resource value: 0x7f0a0070 public const int scrollable = 2131361904; - // aapt resource value: 0x7f0a0140 - public const int search = 2131362112; - // aapt resource value: 0x7f0a0141 - public const int searchSuggestions = 2131362113; + public const int search = 2131362113; + + // aapt resource value: 0x7f0a0142 + public const int searchSuggestions = 2131362114; // aapt resource value: 0x7f0a00a2 public const int search_badge = 2131361954; @@ -3901,17 +3904,17 @@ namespace MusicApp // aapt resource value: 0x7f0a00ab public const int search_voice_btn = 2131361963; - // aapt resource value: 0x7f0a0139 - public const int seekbar = 2131362105; - // aapt resource value: 0x7f0a013a - public const int seekbar_value = 2131362106; + public const int seekbar = 2131362106; + + // aapt resource value: 0x7f0a013b + public const int seekbar_value = 2131362107; // aapt resource value: 0x7f0a00ac public const int select_dialog_listview = 2131361964; - // aapt resource value: 0x7f0a015a - public const int settings = 2131362138; + // aapt resource value: 0x7f0a015b + public const int settings = 2131362139; // aapt resource value: 0x7f0a0096 public const int shortcut = 2131361942; @@ -3922,74 +3925,74 @@ namespace MusicApp // aapt resource value: 0x7f0a0040 public const int showHome = 2131361856; - // aapt resource value: 0x7f0a0127 - public const int showQueue = 2131362087; + // aapt resource value: 0x7f0a0129 + public const int showQueue = 2131362089; // aapt resource value: 0x7f0a0041 public const int showTitle = 2131361857; - // aapt resource value: 0x7f0a0157 - public const int shuffle = 2131362135; + // aapt resource value: 0x7f0a0158 + public const int shuffle = 2131362136; - // aapt resource value: 0x7f0a00bb - public const int smallLabel = 2131361979; + // aapt resource value: 0x7f0a00bd + public const int smallLabel = 2131361981; - // aapt resource value: 0x7f0a00ea - public const int smallPlayer = 2131362026; + // aapt resource value: 0x7f0a00ec + public const int smallPlayer = 2131362028; - // aapt resource value: 0x7f0a0124 - public const int smallQueue = 2131362084; + // aapt resource value: 0x7f0a0126 + public const int smallQueue = 2131362086; - // aapt resource value: 0x7f0a00f6 - public const int snackBar = 2131362038; + // aapt resource value: 0x7f0a00f8 + public const int snackBar = 2131362040; - // aapt resource value: 0x7f0a00c2 - public const int snackbar_action = 2131361986; + // aapt resource value: 0x7f0a00c4 + public const int snackbar_action = 2131361988; - // aapt resource value: 0x7f0a00c1 - public const int snackbar_text = 2131361985; + // aapt resource value: 0x7f0a00c3 + public const int snackbar_text = 2131361987; // aapt resource value: 0x7f0a005f public const int snap = 2131361887; - // aapt resource value: 0x7f0a0128 - public const int songTimer = 2131362088; - - // aapt resource value: 0x7f0a00ed - public const int spArt = 2131362029; + // aapt resource value: 0x7f0a012a + public const int songTimer = 2131362090; // aapt resource value: 0x7f0a00ef - public const int spArtist = 2131362031; - - // aapt resource value: 0x7f0a00f2 - public const int spBuffer = 2131362034; - - // aapt resource value: 0x7f0a00ec - public const int spContainer = 2131362028; - - // aapt resource value: 0x7f0a00f3 - public const int spLast = 2131362035; - - // aapt resource value: 0x7f0a00f0 - public const int spNext = 2131362032; + public const int spArt = 2131362031; // aapt resource value: 0x7f0a00f1 - public const int spPlay = 2131362033; + public const int spArtist = 2131362033; // aapt resource value: 0x7f0a00f4 - public const int spProgress = 2131362036; - - // aapt resource value: 0x7f0a00eb - public const int spReveal = 2131362027; + public const int spBuffer = 2131362036; // aapt resource value: 0x7f0a00ee - public const int spTitle = 2131362030; + public const int spContainer = 2131362030; + + // aapt resource value: 0x7f0a00f5 + public const int spLast = 2131362037; + + // aapt resource value: 0x7f0a00f2 + public const int spNext = 2131362034; + + // aapt resource value: 0x7f0a00f3 + public const int spPlay = 2131362035; + + // aapt resource value: 0x7f0a00f6 + public const int spProgress = 2131362038; + + // aapt resource value: 0x7f0a00ed + public const int spReveal = 2131362029; + + // aapt resource value: 0x7f0a00f0 + public const int spTitle = 2131362032; // aapt resource value: 0x7f0a0086 public const int spacer = 2131361926; - // aapt resource value: 0x7f0a0138 - public const int spinner = 2131362104; + // aapt resource value: 0x7f0a0139 + public const int spinner = 2131362105; // aapt resource value: 0x7f0a0008 public const int split_action_bar = 2131361800; @@ -4012,8 +4015,8 @@ namespace MusicApp // aapt resource value: 0x7f0a00ae public const int status = 2131361966; - // aapt resource value: 0x7f0a0102 - public const int status_bar_latest_event_content = 2131362050; + // aapt resource value: 0x7f0a0104 + public const int status_bar_latest_event_content = 2131362052; // aapt resource value: 0x7f0a0098 public const int submenuarrow = 2131361944; @@ -4024,20 +4027,20 @@ namespace MusicApp // aapt resource value: 0x7f0a007a public const int surface_view = 2131361914; - // aapt resource value: 0x7f0a013b - public const int switchWidget = 2131362107; + // aapt resource value: 0x7f0a013c + public const int switchWidget = 2131362108; - // aapt resource value: 0x7f0a0135 - public const int sync = 2131362101; + // aapt resource value: 0x7f0a0136 + public const int sync = 2131362102; - // aapt resource value: 0x7f0a0134 - public const int syncLoading = 2131362100; + // aapt resource value: 0x7f0a00af + public const int syncLoading = 2131361967; // aapt resource value: 0x7f0a003c public const int tabMode = 2131361852; - // aapt resource value: 0x7f0a00e5 - public const int tabs = 2131362021; + // aapt resource value: 0x7f0a00e7 + public const int tabs = 2131362023; // aapt resource value: 0x7f0a0019 public const int tag_transition_group = 2131361817; @@ -4045,14 +4048,14 @@ namespace MusicApp // aapt resource value: 0x7f0a001a public const int text = 2131361818; - // aapt resource value: 0x7f0a00fb - public const int text1 = 2131362043; + // aapt resource value: 0x7f0a00fd + public const int text1 = 2131362045; // aapt resource value: 0x7f0a001b public const int text2 = 2131361819; - // aapt resource value: 0x7f0a00b8 - public const int textLayout = 2131361976; + // aapt resource value: 0x7f0a00b9 + public const int textLayout = 2131361977; // aapt resource value: 0x7f0a008c public const int textSpacerNoButtons = 2131361932; @@ -4060,8 +4063,8 @@ namespace MusicApp // aapt resource value: 0x7f0a008b public const int textSpacerNoTitle = 2131361931; - // aapt resource value: 0x7f0a00c8 - public const int text_input_password_toggle = 2131361992; + // aapt resource value: 0x7f0a00ca + public const int text_input_password_toggle = 2131361994; // aapt resource value: 0x7f0a0014 public const int textinput_counter = 2131361812; @@ -4072,14 +4075,14 @@ namespace MusicApp // aapt resource value: 0x7f0a007b public const int texture_view = 2131361915; - // aapt resource value: 0x7f0a0108 - public const int time = 2131362056; + // aapt resource value: 0x7f0a010a + public const int time = 2131362058; - // aapt resource value: 0x7f0a011d - public const int timerEnd = 2131362077; + // aapt resource value: 0x7f0a011f + public const int timerEnd = 2131362079; - // aapt resource value: 0x7f0a011c - public const int timerStart = 2131362076; + // aapt resource value: 0x7f0a011e + public const int timerStart = 2131362078; // aapt resource value: 0x7f0a001c public const int title = 2131361820; @@ -4090,8 +4093,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0091 public const int title_template = 2131361937; - // aapt resource value: 0x7f0a00ce - public const int toolbar = 2131361998; + // aapt resource value: 0x7f0a00d0 + public const int toolbar = 2131362000; // aapt resource value: 0x7f0a005a public const int top = 2131361882; @@ -4099,8 +4102,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0090 public const int topPanel = 2131361936; - // aapt resource value: 0x7f0a00bf - public const int touch_outside = 2131361983; + // aapt resource value: 0x7f0a00c1 + public const int touch_outside = 2131361985; // aapt resource value: 0x7f0a000f public const int transition_current_scene = 2131361807; @@ -4117,8 +4120,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0013 public const int transition_transform = 2131361811; - // aapt resource value: 0x7f0a0154 - public const int undoChange = 2131362132; + // aapt resource value: 0x7f0a0155 + public const int undoChange = 2131362133; // aapt resource value: 0x7f0a0049 public const int uniform = 2131361865; @@ -4129,14 +4132,14 @@ namespace MusicApp // aapt resource value: 0x7f0a0042 public const int useLogo = 2131361858; - // aapt resource value: 0x7f0a00e0 - public const int viewMore = 2131362016; + // aapt resource value: 0x7f0a00e2 + public const int viewMore = 2131362018; // aapt resource value: 0x7f0a0016 public const int view_offset_helper = 2131361814; - // aapt resource value: 0x7f0a014d - public const int visible = 2131362125; + // aapt resource value: 0x7f0a014e + public const int visible = 2131362126; // aapt resource value: 0x7f0a0036 public const int wide = 2131361846; @@ -4147,14 +4150,14 @@ namespace MusicApp // aapt resource value: 0x7f0a004a public const int wrap_content = 2131361866; - // aapt resource value: 0x7f0a0147 - public const int youtubeIcon = 2131362119; + // aapt resource value: 0x7f0a0148 + public const int youtubeIcon = 2131362120; - // aapt resource value: 0x7f0a00f9 - public const int ytPlay = 2131362041; + // aapt resource value: 0x7f0a00fb + public const int ytPlay = 2131362043; - // aapt resource value: 0x7f0a00e1 - public const int ytProgress = 2131362017; + // aapt resource value: 0x7f0a00e3 + public const int ytProgress = 2131362019; // aapt resource value: 0x7f0a0079 public const int zoom = 2131361913; diff --git a/MusicApp/Resources/layout/AddToPlaylistItem.xml b/MusicApp/Resources/layout/AddToPlaylistItem.xml index 9ad522e..49aaf9b 100644 --- a/MusicApp/Resources/layout/AddToPlaylistItem.xml +++ b/MusicApp/Resources/layout/AddToPlaylistItem.xml @@ -25,4 +25,14 @@ android:paddingRight="15dp" android:layout_centerVertical="true" android:layout_alignParentRight="true" /> + \ No newline at end of file diff --git a/MusicApp/Resources/layout/CreatePlaylistDialog.xml b/MusicApp/Resources/layout/CreatePlaylistDialog.xml index dacfd87..c58107d 100644 --- a/MusicApp/Resources/layout/CreatePlaylistDialog.xml +++ b/MusicApp/Resources/layout/CreatePlaylistDialog.xml @@ -14,4 +14,8 @@ android:layout_marginRight="8dp" android:layout_marginBottom="4dp" android:hint="Playlist Name" /> + \ No newline at end of file diff --git a/MusicApp/Resources/layout/PlaylistItem.xml b/MusicApp/Resources/layout/PlaylistItem.xml index 5cc5b8c..1d30459 100644 --- a/MusicApp/Resources/layout/PlaylistItem.xml +++ b/MusicApp/Resources/layout/PlaylistItem.xml @@ -69,8 +69,6 @@ android:layout_width="30dp" android:layout_height="30dp" android:padding="5dp" - android:background="@null" - android:src="@drawable/Sync" android:visibility="gone" />