Ticket #1721: mc.ext.diff

File mc.ext.diff, 2.8 KB (added by birdie, 8 years ago)

Simplify and unify audio/video handling

  • mc.ext.in

    old new  
    403403        Include=image 
    404404 
    405405include/image 
    406         Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi 
     406        Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (xdg-open %f >/dev/null 2>&1 &); fi 
    407407        View=%view{ascii} identify %f 
    408408        #View=%view{ascii} asciiview %f 
    409409 
     
    411411### Sound files ### 
    412412 
    413413regex/\.([wW][aA][vV]|[sS][nN][dD]|[vV][oO][cC]|[aA][uU]|[sS][mM][pP]|[aA][iI][fF][fF]|[sS][nN][dD])$ 
    414        Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi 
     414        Include=audio 
    415415 
    416416regex/\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$ 
    417        Open=mikmod %f 
    418        #Open=tracker %f 
     417        Open=mikmod %f 
     418        #Open=tracker %f 
    419419 
    420420regex/\.([wW][aA][wW]22)$ 
    421        Open=vplay -s 22 %f 
     421        Open=vplay -s 22 %f 
    422422 
    423 regex/\.([mM][pP]3)$ 
    424         Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f >/dev/null 2>&1 &); fi 
    425         View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p' 
    426  
    427 regex/\.([oO][gG][gG|aA|vV|xX])$ 
    428         Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f >/dev/null 2>&1 &); fi 
    429         View=%view{ascii} ogginfo %s 
    430  
    431 regex/\.([sS][pP][xX]|[fF][lL][aA][cC])$ 
     423regex/\.([sS][pP][xX])$ 
    432424        Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi 
    433425 
    434426regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$ 
    435427        Open=timidity %f 
    436428 
    437 regex/\.([wW][mM][aA])$ 
    438         Open=mplayer -vo null %f 
    439         View=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | tail +13 || file %f 
     429regex/\.([wW][mM][aA]|[aA][pP][eE]|[aA][aA][cC]|[wW][vV]|[mM]4[aA]|[fF][lL][aA][cC]|[fF][lL][aA]|[mM][pP]3|[oO][gG][gG|aA|xX])$ 
     430        Include=audio 
     431 
     432include/audio 
     433        Open=if [ -z "$DISPLAY" ]; then mplayer -vo null %f; else (xdg-open %f >/dev/null 2>&1 &); fi 
     434        View=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | grep ID_ | sed 's/ID_//' || file %f 
     435 
    440436 
    441437 
    442438### Play lists ### 
    443439 
    444440regex/\.([mM]3[uU]|[pP][lL][sS])$ 
    445         Open=if [ -z "$DISPLAY" ]; then mplayer -vo null -playlist %f; else (xmms -p %f >/dev/null 2>&1 &); fi 
     441        Open=if [ -z "$DISPLAY" ]; then mplayer -vo null -playlist %f; else (xdg-open %f >/dev/null 2>&1 &); fi 
    446442 
    447443 
    448444### Video ### 
    449445 
     446regex/\.(3[gG][pP])$ 
     447        Include=video 
     448 
    450449regex/\.([aA][vV][iI])$ 
    451450        Include=video 
    452451 
     
    478477regex/\.([fF][lL][iIcCvV])$ 
    479478        Include=video 
    480479 
    481 regex/\.([oO][gG][mM])$ 
     480regex/\.([oO][gG][mM|vV])$ 
    482481        Include=video 
    483482 
    484483regex/\.([rR][aA]?[mM])$ 
     
    486485 
    487486include/video 
    488487        Open=(mplayer %f >/dev/null 2>&1 &) 
     488        View=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | grep ID_ | sed 's/ID_//' || file %f 
    489489        #Open=(gtv %f >/dev/null 2>&1 &) 
    490490        #Open=(xanim %f >/dev/null 2>&1 &) 
    491491