File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/renderer/components/data-settings Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,9 @@ export default Vue.extend({
248
248
return
249
249
}
250
250
const textDecode = new TextDecoder ( 'utf-8' ) . decode ( data )
251
- const youtubeSubscriptions = textDecode . split ( '\n' )
251
+ const youtubeSubscriptions = textDecode . split ( '\n' ) . filter ( sub => {
252
+ return sub !== ''
253
+ } )
252
254
const primaryProfile = JSON . parse ( JSON . stringify ( this . profileList [ 0 ] ) )
253
255
const subscriptions = [ ]
254
256
@@ -855,7 +857,11 @@ export default Vue.extend({
855
857
let exportText = 'Channel ID,Channel URL,Channel title\n'
856
858
this . profileList [ 0 ] . subscriptions . forEach ( ( channel ) => {
857
859
const channelUrl = `https://www.youtube.com/channel/${ channel . id } `
858
- exportText += `${ channel . id } ,${ channelUrl } ,${ channel . name } \n`
860
+ let channelName = channel . name
861
+ if ( channelName . search ( ',' ) !== - 1 ) { // add quotations if channel has comma in name
862
+ channelName = `"${ channelName } "`
863
+ }
864
+ exportText += `${ channel . id } ,${ channelUrl } ,${ channelName } \n`
859
865
} )
860
866
exportText += '\n'
861
867
const response = await this . showSaveDialog ( options )
You can’t perform that action at this time.
0 commit comments