mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	
							parent
							
								
									960f5d414c
								
							
						
					
					
						commit
						dcf6e672a9
					
				
					 1 changed files with 11 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -104,7 +104,7 @@ export default {
 | 
			
		|||
                    const json = JSON.parse(text);
 | 
			
		||||
                    this.subscriptions = json.subscriptions;
 | 
			
		||||
                }
 | 
			
		||||
                // Google Takeout
 | 
			
		||||
                // Google Takeout JSON
 | 
			
		||||
                if (text.indexOf("contentDetails") != -1) {
 | 
			
		||||
                    const json = JSON.parse(text);
 | 
			
		||||
                    json.forEach(item => {
 | 
			
		||||
| 
						 | 
				
			
			@ -112,6 +112,16 @@ export default {
 | 
			
		|||
                        this.subscriptions.push(id);
 | 
			
		||||
                    });
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                // Google Takeout CSV
 | 
			
		||||
                if (text.indexOf("Channel Id,") != -1) {
 | 
			
		||||
                    const lines = text.split("\n");
 | 
			
		||||
                    for (let i = 1; i < lines.length; i++) {
 | 
			
		||||
                        const line = lines[i];
 | 
			
		||||
                        const id = line.substr(0, line.indexOf(","));
 | 
			
		||||
                        if (id.length === 24) this.subscriptions.push(id);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        },
 | 
			
		||||
        handleImport() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue