Pomoc wywolanie scryptu post processing w Bazarr

Discussion in 'Oh'Linux? Software hacking' started by lukjod, Sep 8, 2019.

Loading...
  1. lukjod
    Offline

    lukjod Entry Technician Q Associate

    Joined:
    Jul 2, 2014
    Messages:
    41
    Location:
    Warszawa
    Local Time:
    2:33 AM
    Ratings:
    +9 / 0 / -0
    Followers:
    0
    QNAP:
    null
    Ethernet:
    1 GbE
    null 1 GbE
    po sciagnieciu napisow przez bazarr chce wywolac skrypt postprocessing ktory skopiuje i zmieni napisy name.pl.srt na name.1.srt aby moj przed web os LG TV wyswietlil napisy po polsku jezeli beda dostepne gdyz tylko alfabetycznie moze je wywolac przez dlna. Gdy sa napisy .en.srt i pl.srt w tym samym katalogu zawsze wybierze .en.srt chyba zeby pl.srt ny,y zapisane rowniez jako np 1.srt wtedy bedzie ok.

    problem:
    skrypt podaje wartosci w pythonie i nie wiem jak to ugryzc z basha, choc pewnie da tez rade to jakos zrobic pythonem:
    bazarr udostepnia
    Code (Text):
    1.  
    2. {{directory}}
    3. The full path of the episode file parent directory.
    4. {{episode}}
    5. The full path of the episode file.
    6. {{episode_name}}
    7. The filename of the episode without parent directory or extension.
    8. {{subtitles}}
    9. The full path of the subtitles file.
    10. {{subtitles_language}}
    11. The language of the subtitles file.
    12. {{subtitles_language_code2}}
    13. The 2-letter ISO-639 language code of the subtitles language.
    14. {{subtitles_language_code3}}
    15. The 3-letter ISO-639 language code of the subtitles language.
    16.  
    a ja chce wywolac cos w stylu:
    Code (Text):
    1. #!/bin/bash
    2.  
    3. for f in "{{subtitles}}"/*.pl.srt; do cp "$f" "${f%.pl.srt}.1.srt" ; done
    4. for f in "{{subtitles}}"/*.en.srt; do cp "$f" "${f%.en.srt}.2.srt" ; done

    Prosze o jakas pomoc