mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-04 07:17:07 -05:00 
			
		
		
		
	[utils] Fix --match-filter for int-like strings (closes #11082)
This commit is contained in:
		@@ -605,6 +605,7 @@ class TestYoutubeDL(unittest.TestCase):
 | 
			
		||||
            'extractor': 'TEST',
 | 
			
		||||
            'duration': 30,
 | 
			
		||||
            'filesize': 10 * 1024,
 | 
			
		||||
            'playlist_id': '42',
 | 
			
		||||
        }
 | 
			
		||||
        second = {
 | 
			
		||||
            'id': '2',
 | 
			
		||||
@@ -614,6 +615,7 @@ class TestYoutubeDL(unittest.TestCase):
 | 
			
		||||
            'duration': 10,
 | 
			
		||||
            'description': 'foo',
 | 
			
		||||
            'filesize': 5 * 1024,
 | 
			
		||||
            'playlist_id': '43',
 | 
			
		||||
        }
 | 
			
		||||
        videos = [first, second]
 | 
			
		||||
 | 
			
		||||
@@ -650,6 +652,10 @@ class TestYoutubeDL(unittest.TestCase):
 | 
			
		||||
        res = get_videos(f)
 | 
			
		||||
        self.assertEqual(res, ['1'])
 | 
			
		||||
 | 
			
		||||
        f = match_filter_func('playlist_id = 42')
 | 
			
		||||
        res = get_videos(f)
 | 
			
		||||
        self.assertEqual(res, ['1'])
 | 
			
		||||
 | 
			
		||||
    def test_playlist_items_selection(self):
 | 
			
		||||
        entries = [{
 | 
			
		||||
            'id': compat_str(i),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user