Jump to content

alturismo

Members
  • Content Count

    451
  • Joined

  • Last visited

Community Reputation

11 Good

About alturismo

  • Rank
    Advanced Member

Converted

  • Gender
    Undisclosed

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. alturismo

    Additional Scripts For User.Scripts Plugin

    Hi, before u move to look if file is busy, i updated my tvheadend move and update script now a little and dont use the loop as described, i use now if file is busy do nothing, next cron will come so i dont touch anything while there is any actions running. i look for new records from tvheadend (.ts files), if there is one and NOT in use i start avidemux to read the file (prepare for my com cut, creating idx2), if .ts and .idx2 is there i look for the .mkv (after i did my work cutting and remuxing), if the .mkv is there and NOT in use i move it now to a proper folder (sample, season 02 instead season 2, 2 digit ...), update TVHeadend record path, remove the "old" .ts and .idx2 and empty season 2, update emby and plex. the if ! [ -n "$(lsof "$sourcefile")" ]; then ... will trigger if NOT in use else ... i went away from the while loop cause it could take longer then my cron job and i dont want to run multiply instances now, so like this i can run the cron like every 5 minutes and im good. sample from log echo Hawaii Five-0 - S09E09 - Das letzte Kapitel.ts.idx2 already there... Hawaii Five-0 - S09E09 - Das letzte Kapitel.mkv found, processing ... File Hawaii Five-0 - S09E09 - Das letzte Kapitel.mkv free ... in the end its like i want it actually, i hope i didnt mess anything up im sure it could be done more simple, but as my scripting skills are very old ... my suggestion was to check if files are busy in case handbrake is still running ... #!/bin/bash startpath="/mnt/cache/Media/" ### main place where to look for searchpattern="*.ts" ### what type of files to look for matchpattern=".mkv" ### compare if exist - work done ? extradelpattern=".idx2" ### extra delete type - here, avidemux file seasonnaming="Season " ### Naming to check for season folders mediafolder="/Media" ### add to path beginning for TVHeadend update waittime=3 ### time to wait if file is in use embyapikey="embyapikeyhere" ### api key to update emby library tvhuser="username" tvhpass="password" tvhip="192.168.1.2" cd $startpath find . -mindepth 2 -iname $searchpattern|sed "s|^\./||"|while read fname; do echo "$fname" sourcefile=$(basename "$fname") filenameonly="${sourcefile%.*}" endfile="$filenameonly$matchpattern" extrafile="$sourcefile$extradelpattern" filepath=$(dirname "$fname") seasonpath=$(basename "$filepath") if [[ $seasonpath == "$seasonnaming"* ]]; then seasonpathnew=$(echo "$seasonpath" | sed -E 's/\<[0-9]\>/0&/') seriespath=$(dirname "$filepath") tvhfinalpath="$mediafolder/$seriespath/$seasonpathnew/$endfile" else tvhfinalpath="$mediafolder/$filepath/$endfile" fi echo "output path is: $tvhfinalpath" cd "$startpath/$filepath" if ! [ -n "$(lsof "$sourcefile")" ]; then if ! [ -f "$extrafile" ]; then docker exec Avidemux /usr/bin/avidemux3_cli --load /storage/"$fname" --quit > /dev/null echo echo "$sourcefile loading in avidemux ..." else echo echo "$extrafile already there..." fi else echo echo "$sourcefile in use ..." fi if [ -f "$endfile" ]; then echo "$endfile found, processing ..." if ! [ -n "$(lsof "$endfile")" ]; then echo "File $endfile free" if [[ $seasonpath == "$seasonnaming"* ]]; then cd .. mkdir "$seasonpathnew" mv "$seasonpath/$endfile" "$seasonpathnew/" fi curl -s "http://"$tvhuser":"$tvhpass"@"$tvhip":9981/api/dvr/entry/filemoved" --data-urlencode "src=$mediafolder/$filepath/$sourcefile" --data-urlencode "dst=$tvhfinalpath" cd "$startpath/$filepath" rm "$sourcefile" rm "$extrafile" if [[ ! $seasonpath == "$seasonpathnew" ]]; then cd .. rmdir "$seasonpath" fi curl -s "http://192.168.1.2:32400/library/sections/1/refresh" curl -s "http://192.168.1.2:8096/emby/Library/Refresh?api_key=$embyapikey" -H "accept: */*" -d "" else echo "$endfile in use" fi else echo "$endfile not found." fi done
  2. alturismo

    [Support] binhex - Tvheadend

    name it guide.xml and drop it into /data folder, enable the xml file grabber. that should be it.
  3. alturismo

    Additional Scripts For User.Scripts Plugin

    @zacharyd3 may add something like this for his script i added this to my tvheadend script in case my file is in progress writing ... in case of handbrake i would set the seconds pretty high, only an idea in case the script runs while handbrake is in progress ... instead using a static value with sleep ... endfile=<file to move> waittime=<seconds to wait in loop if busy> while [ -n "$(lsof "$endfile")" ] do sleep $waittime echo "$endfile in use" done echo "File $endfile free"
  4. alturismo

    Additional Scripts For User.Scripts Plugin

    @zacharyd3 nice, may include inotify watch so he wont move files while in progress ? or is triggered by handbrake ?
  5. alturismo

    Additional Scripts For User.Scripts Plugin

    and you want to overwrite the old file then ?
  6. alturismo

    Additional Scripts For User.Scripts Plugin

    exactly, filebot recognizes movies and series and sort them into the proper folders ... and yes, there are dockers available, free ones (frozen older version) or new one (paid version of filebot).
  7. alturismo

    Additional Scripts For User.Scripts Plugin

    may just a sidenote, ever thought about filebot ? drop it there, it ll rename and move to the proper folder ...
  8. alturismo

    Additional Scripts For User.Scripts Plugin

    Hi, i updated my user script a little now with also moving my target files in a proper season 00 folder (2 digit instead 1 digit, default tvheadend behaviour) may someone could take a look if i may overlooked something, so far its looking good and working here ... what does it do, after i edited my .ts files and remuxed them with avisynth check if the .mkv is there, run, in case the season is 1 digit (season 1 instead season 01) it creates the proper season dir, mv the .mkv to the proper season dir, update tvh recording path, remove the files and (if season dir was changed cause 2 digit) old dir. if i have some errors or there are some things to make more simple, thanks ahead #!/bin/bash startpath="/mnt/cache/Media/" ### main place where to look for searchpattern="*.ts" ### what type of files to look for matchpattern=".mkv" ### compare if exist - work done ? extradelpattern=".idx2" ### extra delete type - sample, avidemux file seasonnaming="Season " ### Naming to check for season folders mediafolder="/Media" ### add to path beginning for TVHeadend update waittime=30 ### time to wait in case script runs while processing file tvhuser="user" tvhpass="pass" tvhip="192.168.1.2" cd $startpath find . -mindepth 2 -iname $searchpattern|sed "s|^\./||"|while read fname; do echo "$fname" sourcefile=$(basename "$fname") filenameonly="${sourcefile%.*}" endfile="$filenameonly$matchpattern" extrafile="$sourcefile$extradelpattern" filepath=$(dirname "$fname") seasonpath=$(basename "$filepath") if [[ $seasonpath == "$seasonnaming"* ]]; then seasonpathnew=$(echo "$seasonpath" | sed -E 's/\<[0-9]\>/0&/') seriespath=$(dirname "$filepath") tvhfinalpath="$mediafolder/$seriespath/$seasonpathnew/$endfile" else tvhfinalpath="$mediafolder/$filepath/$endfile" fi echo "output path is: $tvhfinalpath" cd "$startpath/$filepath" if [ -f "$endfile" ]; then echo "$endfile found, processing ..." sleep $waittime if [[ $seasonpath == "$seasonnaming"* ]]; then cd .. mkdir "$seasonpathnew" mv "$seasonpath/$endfile" "$seasonpathnew/" fi curl -s "http://"$tvhuser":"$tvhpass"@"$tvhip":9981/api/dvr/entry/filemoved" --data-urlencode "src=$mediafolder/$filepath/$sourcefile" --data-urlencode "dst=$tvhfinalpath" ### curl -s "http://"$tvhuser":"$tvhpass"@"$tvhip":9981/api/dvr/entry/filemoved" --data-urlencode "src=tvhfinalpath" --data-urlencode "dst=$mediafolder/$filepath/$sourcefile" ### uncomment to reverse cd "$startpath/$filepath" rm "$sourcefile" rm "$extrafile" if [[ ! $seasonpath == "$seasonpathnew" ]]; then cd .. rmdir "$seasonpath" fi else echo "$endfile not found." fi done
  9. alturismo

    [Support] knex666 - FileBrowser

    tried bridge mode and set your port manually ? or, there are optional settings, therefore a mount of the .filebrpwser.json is necessary (here at least).
  10. alturismo

    [Support] Linuxserver.io - Letsencrypt (Nginx)

    forgot to mention, i already did that too, also changed the client max body ... to 10G, same result, nevermind, thanks for the tipp
  11. alturismo

    [Support] Linuxserver.io - Letsencrypt (Nginx)

    Hi, i also have the issue where nextcloud downloads are limited in size ... i think i readed about it also here but cant find it anymore. what i did meanwhile set the limit in nextcloud webgui to 10G, changed the nextcloud.subfolder.conf -> proxy_max_temp_file_size 8192m; may a hint where else there could be the limiter ? thanks ahead
  12. alturismo

    [Plugin] Linuxserver.io - Unraid DVB

    ok, i never managed it, nvm, offtopic here ... the card seems to work as it looks like, he could try tvheadend just to make sure card is ok.
  13. alturismo

    [Plugin] Linuxserver.io - Unraid DVB

    if this was working inside plex on ubuntu or winserver, wich settings for your card did you use there ?
  14. alturismo

    [Plugin] Linuxserver.io - Unraid DVB

    Hi, the multi switch shouldnt bother, but ... how you come to the conclusion plex supports directly dvb-s ? https://support.plex.tv/articles/225877427-supported-dvr-tuners-and-antennas/ https://support.plex.tv/articles/community-supported-tuners/ if you check the second link there is a note "currently we dont support satellite tuners" ... so, your way would be as sample, us tvheadend with your tuners, run a proxy for plex like xteve, then you can use plex ...
  15. alturismo

    [Support] Djoss - Firefox

    may also try hostname instead ip, works here on all dockers from djoss in my setup, had the same issue with ip ...