mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	Fix: FreeTube Subscription Import (#2744)
* Fix: FreeTube Subscription Import * Use for of loop Co-authored-by: Bnyro <82752168+Bnyro@users.noreply.github.com> --------- Co-authored-by: Bnyro <82752168+Bnyro@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									6978f52246
								
							
						
					
					
						commit
						a9305f26c5
					
				
					 1 changed files with 8 additions and 4 deletions
				
			
		| 
						 | 
					@ -105,11 +105,15 @@ export default {
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                // FreeTube DB
 | 
					                // FreeTube DB
 | 
				
			||||||
                else if (text.indexOf("allChannels") != -1) {
 | 
					                else if (text.indexOf("allChannels") != -1) {
 | 
				
			||||||
                    const json = JSON.parse(text);
 | 
					                    const lines = text.split("\n");
 | 
				
			||||||
 | 
					                    for (let line of lines) {
 | 
				
			||||||
 | 
					                        if (line === "") continue;
 | 
				
			||||||
 | 
					                        const json = JSON.parse(line);
 | 
				
			||||||
                        json.subscriptions.forEach(item => {
 | 
					                        json.subscriptions.forEach(item => {
 | 
				
			||||||
                            this.subscriptions.push(item.id);
 | 
					                            this.subscriptions.push(item.id);
 | 
				
			||||||
                        });
 | 
					                        });
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
                // Google Takeout JSON
 | 
					                // Google Takeout JSON
 | 
				
			||||||
                else if (text.indexOf("contentDetails") != -1) {
 | 
					                else if (text.indexOf("contentDetails") != -1) {
 | 
				
			||||||
                    const json = JSON.parse(text);
 | 
					                    const json = JSON.parse(text);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue