title: Music covers read incorrectly
body: <p>Instead of the code reading the album cover inside the folder, it reads the covers of the playlist
  <a href="https://i.stack.imgur.com/HPQ7D.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HPQ7D.jpg" alt="enter image description here" /></a></p>
  <pre><code>private ArrayList&lt;String&gt; folderNames;
  static ArrayList&lt;MusicFiles&gt; musicFiles;
  private Context mContext;
  
  public FolderAdapter(ArrayList&lt;String&gt; folderNames, ArrayList&lt;MusicFiles&gt; musicFiles, Context mContext) {
      this.folderNames = folderNames;
      this.musicFiles = musicFiles;
      this.mContext = mContext;
  }
  @NonNull
  @Override
  public MyHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
     View view = LayoutInflater.from(mContext).inflate(R.layout.folder_item, parent,
             false);
      return new MyHolder(view);
  }
  @Override
  public void onBindViewHolder(@NonNull MyHolder holder,  final int position) {
      int index = folderNames.get(position).lastIndexOf(&quot;/&quot;);
      String folder = folderNames.get(position).substring(index + 1);
      holder.folder.setText(folder);
      holder.counterFiles.setText(String.valueOf(NumberOffFiles(folderNames.get(position))));
      Bitmap image = getAlbum(musicFiles.get(position).getPatch());
      if (image != null) {
          Glide.with(mContext).asBitmap()
                  .load(image)
                  .into(holder.cover);
      } else {
          Glide.with(mContext)
                  .load(R.drawable.img_music)
                  .into(holder.cover);
      }
      holder.itemView.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              Intent intent = new Intent(mContext,VideoFolderActivity.class);
              intent.putExtra(&quot;folderNames&quot;, folderNames.get(position));
              mContext.startActivity(intent);
          }
      });
  }
  @Override
  public int getItemCount() {
      return folderNames.size();
  }
  
  static class MyHolder extends RecyclerView.ViewHolder {
      TextView folder, counterFiles;
      ImageView capa_da_pasta;
      public MyHolder(@NonNull View itemView) {
          super(itemView);
          folder = itemView.findViewById(R.id.folderName);
          counterFiles = itemView.findViewById(R.id.count_files_folder);
          cover = itemView.findViewById(R.id.folderImage);
      }
  }
  int NumberOffFiles(String folderNames){
      int countFiles = 0;
      for (MusicFiles musicFiles : musicFiles) {
          if (musicFiles.getPatch()
                  .substring(0, musicFiles.getPatch().lastIndexOf(&quot;/&quot;))
          .endsWith(folderNames)) {
              countFiles++;
          }
      }
      return countFiles;
  }
  </code></pre>
  <p>The code has to read the album covers!!!</p>
  <p>The code has to read the album covers!!!</p>
  <p>Instead of the code reading the album cover inside the folder, it reads the covers of the playlist</p>