Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(15)  |  Call(15)  |  Derive(0)  |  Import(0)

src/m/p/mpdc-HEAD/mpdc/mpdc_playlist.py   mpdc(Download)
def add(args):
    songs = list(parser.parse(args.collection))
    if songs:
        mpd.add(songs)
 
 
def addp(args):
    songs = list(parser.parse(args.collection))
def insert(args):
    songs = list(parser.parse(args.collection))
    if songs:
        mpd.insert(songs)
 
 
def remove(args):
    songs = list(parser.parse(args.collection))
def keep(args):
    songs = parser.parse(args.collection)
    remove_songs = [s for s in mpd.get_playlist_songs() if s not in songs]
    if remove_songs:
        mpd.remove(remove_songs)

src/m/p/mpdc-HEAD/mpdc/mpdc_collections.py   mpdc(Download)
            print(format_alias(alias))
    else:
        songs = parser.parse(args.collection)
        display_songs(songs, args.f, (enable_pager or args.p) and not args.np)
 
        if 'mpd_playlist' not in collection:
            print('Checking collection [{}]...'.format(alias))
            parser.parse('"' + esc_quotes(alias) + '"')
 
 
        print('--------------')
        for alias in collectionsmanager.c:
            songs = parser.parse('"' + esc_quotes(alias) + '"')
            if args.pattern in songs:
                print(format_alias(alias))
    # assuming it's a collection
    else:
        songs = parser.parse(args.pattern)
        if songs:
            for alias in collectionsmanager.c:
                s = parser.parse('"' + esc_quotes(alias) + '"')
                if args.pattern.strip(' \'"') != alias and songs.issubset(s):
                    print(format_alias(alias))