Skip to content

Instantly share code, notes, and snippets.

Как перенести музыку из Вконтакте (ВК) в Яндекс Музыку на 01.08.2025

Экспорт своей музыки в плейлист (т.к сейчас музыку можно перенести только если она у вас в плейлисте...) Скрипт работает по принципу забрал все что прогрузил и отметил для переноса

2 простых шага

//
// Created by Dmitry Marinin on 2019-03-04.
// Copyright (c) 2019. All rights reserved.
//
import UIKit
protocol AdaptiveCollectionLayoutDelegate: class {
// Declare a protocol for provide cell height
func collectionView(_ collectionView: UICollectionView, heightForTextAtIndexPath indexPath: IndexPath) -> CGFloat
// MARK: - UICollectionViewDelegate
extension MyCollectionAdapter: AdaptiveCollectionLayoutDelegate {
func collectionView(_ collectionView: UICollectionView,
heightForTextAtIndexPath indexPath: IndexPath) -> CGFloat {
if (indexPath.section == 0 && provider.isNeedToShowInfo) {
// In this case I use this for banner in first section where it's occupies the whole area
return AdaptiveCollectionConfig.bannerHeight
} else if let _ = provider.items[indexPath.row] as? Bool {
@YaphetS1
YaphetS1 / AdaptiveCollectionConfig.swift
Last active July 15, 2019 16:34
Adaptive_Height_UICollectionView_Swift
//
// Created by Dmitry Marinin on 2019-03-04.
// Copyright (c) 2019. All rights reserved.
//
import UIKit
struct AdaptiveCollectionConfig {
static let bannerHeight: CGFloat = 120
@YaphetS1
YaphetS1 / Apple_mobile_device_types.txt
Created October 17, 2018 15:47 — forked from adamawolf/Apple_mobile_device_types.txt
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
iPhone5,1 : iPhone 5 (GSM)
public class TransferData extends AsyncTask<Void, String, Void> {
private Context context;
private FilesSendAdapter sendFilesAdapter;
private ArrayList<Uri> uris;
private ArrayList<String> fileNames;
private InetAddress serverAddress;
private WifiP2pManager manager;
private WifiP2pManager.Channel channel;
private ArrayList<Long> filesLength;
public class FileServerAsyncTask extends AsyncTask<Void, CustomObject, Void> {
private Context context;
private ServerSocket serverSocket;
private Socket client;
private File file;
private Long fileSize;
private Long fileSizeOriginal;
private FilesAdapter fileList;
private Callback referenceCallback;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_send_file);
//Find sending file list and set adapter
rvSendingFilesList = findViewById(R.id.rvSendingFilesList);
LinearLayoutManager filesListLayoutManager = new LinearLayoutManager(
this, LinearLayoutManager.VERTICAL, false);
rvSendingFilesList.setLayoutManager(filesListLayoutManager);