Bläddra i källkod

Also decode channel titles and fix a bug that could lead to duplicate playlist subscriptions

Helmut Pozimski 11 år sedan
förälder
incheckning
34ac7c9722
4 ändrade filer med 3 tillägg och 3 borttagningar
  1. 1 0
      CHANGELOG
  2. 0 1
      TODO
  3. 1 2
      stov.py
  4. 1 0
      youtubeAPI.py

+ 1 - 0
CHANGELOG

@@ -7,6 +7,7 @@
 * Made the youtube-dl output shown to the user depend on the defined output level
 * Now uses youtube API version 2
 * Fixed situation when all videos fail and the output would have suggested there were no videos to be downloaded
+* Fixed a bug that lead to a duplicate subscription when a playlist was added
 * Improved output behaviour so strings will be properly encoded
 * Added "verbose" and "quiet" output modes
 

+ 0 - 1
TODO

@@ -8,4 +8,3 @@ Long term goals:
 * Improve handling of situations where a video is permanently unavailable
 * Add verbose output
 * Add option to clean database of old entries 
-* Fix Bugs that lead to double subscription entries

+ 1 - 2
stov.py

@@ -267,14 +267,13 @@ if options.add is True:
 	elif options.channel is None and options.searchparameter is not None:
 		NewSubscription = subscription.sub(type="search",
 		name=_("Search_"), search=options.searchparameter, conf=conf)
-	elif options.add is True and options.playlist is not None:
+	elif options.playlist is not None:
 		if options.searchparameter is not None:
 			printf(_("Playlists do not support searching, search option will "
 				"be ignored!"), outputlevel="default", level=conf.outputlevel,
 				descriptor="stderr")
 		NewSubscription = subscription.sub(type="playlist",
 				name=options.playlist, conf=conf)
-		NewSubscription.AddSub()
 		NewSubscription.UpdateVideos()
 	else:
 		printf(_("No valid subscription options given, "

+ 1 - 0
youtubeAPI.py

@@ -32,6 +32,7 @@ class Parser(object):
 			xmlTag = title.toxml()
 			if i == 0:
 				channel.title = xmlTag.replace('<title>','').replace('</title>','')
+				channel.title = channel.title.replace('&amp;','&').replace('&quot;','"')
 			else:
 				video_title = xmlTag.replace('<title>','').replace('</title>','')
 				video_title = video_title.replace('&amp;','&').replace('&quot;','"')