- outleradam - 2010-02-02 05:02
well, that's the function in question. what is your command line output like?
- watson540 - 2010-02-02 05:48
Code:
mythtv@myth ~/mythicalLibrarian $ cat check
checkpermissions () {
TMoveDirWritable=0
$1=2048
$2=2048
$3="/mnt/ntfs/tv"
if [ ! -z $2 ] && [ ! -z "$1" ] && [ $1 -lt $2 ]; then
echo "Testing write permission on $3">$3/arbitraryfile.ext
if [ -f "$3/arbitraryfile.ext" -a -s "$3/arbitraryfile.ext" ]; then
rm -f "$3/arbitraryfile.ext"
test ! -f "$3/arbitraryfile.ext" && TMoveDirWritable=1 || TMoveDirWritable=0
else
TMoveDirWritable=0
echo "CHECK PERMISSIONS ON $MoveDir"
fi
elif [ -z "$2" ] || [ $1 -ge $2 ]; then
TMoveDirWritable=0
echo "UNUSABLE SPACE-CHECK:$3"
fi
}
mythtv@myth ~/mythicalLibrarian $ ./check
mythtv@myth ~/mythicalLibrarian $
Code:
mythtv@myth ~/mythicalLibrarian $ ./mythicalLibrarian.sh "Family Guy" "Da Boom" "/mnt/ntfs/myth/1015_20100201220000.mpg"
Accessing MythTV DataBase:
COMMERCIAL DATA START:9649 STOP:14341
COMMERCIAL DATA START:24246 STOP:30292
COMMERCIAL DATA START:42080 STOP:46625
0
RECSTART:2010-02-01 22:00:00 MOVIEYEAR:1999 SERIESDATE:1999-12-26
PROGRAMID:EP002960010012 ShowCategory:Comedy STARS:0 RATING:0
PLOT: Paranoid about Y2K, Peter herds the family into the basement for protection.
TESTING FOR ZAP2IT SERIES ID MATCH:Family Guy
DATABASE IS MAINTAINED. TIME IS:1265083063 NEXT UPDATE IS:1265160381
No direct Zap2it match found. Please update TheTvDb.com
USING FUZZY LOGIC FOR EPISODE RECOGNITION
Family Guy
FUZZY LOGIC SHOW NAME: Family Guy ID: 75978
./mythicalLibrarian.sh: line 425: [: : integer expression expected
./mythicalLibrarian.sh: line 467: [: : integer expression expected
FUZZY Exx NUMBER:35
EPISODE:Da Boom ABSOLUTE NUMBER:35 S02E03
FILE SIZE:584738kB
MOVEDIR FREE SPACE: 91065912kB- WRITABLE:0
ALTMOVEDIR FREE SPACE: 28225008kB- WRITABLE:0
MOVIEDIR FREE SPACE: 91065848kB- WRITABLE:0
ALTMOVIEDIR FREE SPACE: 28225008kB- WRITABLE:0
PLOT: Paranoid about Y2K, Peter herds the family into the basement for protection.
FAILSAFE FLAG WAS SET
I also exported $MOVEDIR as an environment variable. 'export MOVEDIR="/mnt/ntfs/tv"' ..just for running ./check
looks to me like $TvDbTime is not being set
- outleradam - 2010-02-02 07:16
I can't get past this without an error
$1=2048
$2=2048
$3="/mnt/ntfs/tv"
Code:
adam@adam-desktop:~$ $1=2048
=2048: command not found
adam@adam-desktop:~$ $2=2048
=2048: command not found
adam@adam-desktop:~$ $3="/mnt/ntfs/tv"
bash: =/mnt/ntfs/tv: No such file or directory
Basically, the checkpermissions function is called 6 separate times, from within the sanity checks portion of the script. For some reason, those dirs are being called bad and it's not free space. Those flags are only set in one portion of the program. The only way the workingdir can be set as bad is if you can't >>/workingdir/arbitraryfile.ext
Is there an arbitraryfile.ext somewhere?
How old is the version that you are working with? The code I'm looking at on code.google.com shows that the terminal will either display flags of 1 or an error message of some type. Every step along hte way it has a choice, it either sets a bad flag and exits from the checkpermissions () or it sets the writable flag after it deletes the arbitraryfile.ext.
I don't see how it's even possible for us to be running the same script and be seeing this.
Does fidora define datatypes for variables?
that would be a function of the
Code:
bash --version
GNU bash, version 4.0.33(1)-release (i486-pc-linux-gnu)
- watson540 - 2010-02-02 07:18
for the record..i ran this as root..still the same permissions error.. I think this rules out any error on my part
Code:
myth mythicalLibrarian # ./mythicalLibrarian.sh "Family Guy" "Da Boom" "/mnt/ntfs/myth/1015_20100201220000.mpg"
Accessing MythTV DataBase:
COMMERCIAL DATA START:9649 STOP:14341
COMMERCIAL DATA START:24246 STOP:30292
COMMERCIAL DATA START:42080 STOP:46625
0
RECSTART:2010-02-01 22:00:00 MOVIEYEAR:1999 SERIESDATE:1999-12-26
PROGRAMID:EP002960010012 ShowCategory:Comedy STARS:0 RATING:0
PLOT: Paranoid about Y2K, Peter herds the family into the basement for protection.
TESTING FOR ZAP2IT SERIES ID MATCH:Family Guy
DATABASE IS MAINTAINED. TIME IS:1265088203 NEXT UPDATE IS:1265160381
No direct Zap2it match found. Please update TheTvDb.com
USING FUZZY LOGIC FOR EPISODE RECOGNITION
Family Guy
FUZZY LOGIC SHOW NAME: Family Guy ID: 75978
DATABASE IS MAINTAINED. TIME IS:1265088204 NEXT UPDATE IS:1265160381
FUZZY Exx NUMBER:35
EPISODE:Da Boom ABSOLUTE NUMBER:35 S02E03
FILE SIZE:584738kB
MOVEDIR FREE SPACE: 89730136kB- WRITABLE:0
ALTMOVEDIR FREE SPACE: 28225008kB- WRITABLE:0
MOVIEDIR FREE SPACE: 89730136kB- WRITABLE:0
ALTMOVIEDIR FREE SPACE: 28225008kB- WRITABLE:0
PLOT: Paranoid about Y2K, Peter herds the family into the basement for protection.
FAILSAFE FLAG WAS SET
myth mythicalLibrarian # cat output.log
@@@@@@@@@@@NEW SEARCH INITIATED AT Tue Feb 2 00:17:48 EST 2010@@@@@@@@@@@@@
%%%NO DATABASE INFORMATION. CHECK LOGIN/PASS OR FILE %%%%%
SEARCHING: www.TheTvDb.com SHOW NAME: Family Guy EPISODE: Da Boom
FILE NAME: /mnt/ntfs/myth/1015_20100201220000.mpg
SEARCH FOUND:Family Guy ID#: 75978
USING FUZZY LOGIC FOR EPISODE RECOGNITION
No direct Zap2it match found. Please update TheTvDb.com
SEARCH FOUND:Family Guy ID#: 75978
DEFINED ABSOLOUTE EPISODE NUMBER: 35
###################DEBUG MODE ENABLED####################
LISTING INTERNAL VARIABLES USED BY mythicalLibrarian.
INTERNET TIMEOUT:50- TVDB API KEY:6DF511BB2A64E0E9- mythicalLibrarian WORKING DIR:/home/mythtv/mythicalLibrarian-
MOVE DIR:/mnt/ntfs/tv- USING SHOWNAME AS FOLDER:Enabled-
FAILSAFE MODE:Disabled- FAILSAFE DIR:/home/mythtv- ALTERNATE MOVE DIR:/mnt/extra/tv-
USE ORIGINAL DIR:Disabled NOTIFICATIONS:Disabled DEBUG MODE:Enabled-
INPUT SHOW NAME:Family Guy- LOCAL SHOW NAME TRANSLATION:- ShowName:Family Guy
SENT TVDB SHOW NAME:Family%20Guy-
RESOLVED SERIES ID:75978- RESOVED SHOW NAME:Family Guy-
INPUT EPISODE NAME:Da Boom- ABSOLOUTE EPISODE NUMBER:35- RESOLVED EPISODE NAME:Da Boom-
SEASON:S02- EPISODE:E03- SYMLINK MODE:LINK- FILESIZE: 584738'kB'
CREATE AND DELETE FLAGS: ORIGINALDIR:0- FREE:89730136kB- WORKINGDIR:0 Free:1802764kB-
MOVEDIR:0- FREE:89730136kB- ALTERNATEMOVEDIR:0- FREE:28225008kB-
PRIMARYMOVIEDIRWRITABLE:0- FREE:89730136kB- ALTERNATEMOVIEDIR:0- FREE:28225008kB-
DATABASE INFORMATION
RECSTART:2010-02-01 22:00:00- MOVIE YEAR:1999- ORIGINAL SERIES DATE:1999-12-26-
PROGRAMID:EP002960010012- CHANNEL ID:1015- CATEGORY:Comedy-
EXTRAPOLATED DATA DETERMINED THIS RECORDING AS A:Series With Episode Data- STARS:0 RATING:0
ZAP2IT SERIES ID:4163209- MATCHED TVDB SERIES ID:-
####################END OF DEBUG LOG#####################
FAILSAFE FLAG WAS SET CHECK PERMISSIONS AND FOLDERS
i dunno about the check script i tried to make with your function..setting the variables in the interactive shells gives me error to..the script gave no error..but im no bash scripter, i just thought thats how you defined things in a script..as a matter of fact ..i cannot export ANYTHING for $1 and etc..i dont think those are declarable
I ran this script in bash debig mode..if you're interested it'll be up on pastebin
http://pastebin.org/85299
- watson540 - 2010-02-02 07:28
the version is the latest from sourceforge..confiurmed by " ############Adept personel only beyond this point###############" the first time i saw this..it said something else in older versions
everything has been cleaned out of all working folders including recordings more than once..about once per day actually which is why its so frustrating to me
- outleradam - 2010-02-02 07:41
I just don't know fidora. If you are using the same dependencies then it should work the same. What version of bash again? Something is screwy here. All the inputs to checkpermissions are working but the outputs are comming back wrong. Does fidora have online test command? I can't get a ver on that. It's like it's testing good and then setting the 0 flag. I've got to go to bed. If you can, try testing that test command and see where it goes broke.
- watson540 - 2010-02-02 07:58
i upgraded bash the other day when i was messing with that wrong agrep version..im running gentoo not fedora..and an online test command i dunno what you mean but test is built into bash afaik
I have read bash scripting tutorials before so i know a little about the brackets [] meaning test and all that..all i can do is mess around and upgrade/downgrae stuff i guess
hope the debug log on pastebin helps
my bash version and use flags currently
[i] app-shells/bash
Available versions: 3.1_p17 3.2_p39 ~3.2_p48-r1 4.0_p35 **4.1 {afs bashlogger examples mem-scramble net nls plugins vanilla}
Installed versions: 4.0_p35(04:10:04 PM 01/28/2010)(net nls -afs -bashlogger -examples -mem-scramble -plugins -vanilla)
Homepage: http://tiswww.case.edu/php/chet/bash/bashtop.html
Description: The standard GNU Bourne again shell
- watson540 - 2010-02-02 09:04
hmm this must convince you..you introduced a bug (for me anyway) in your latest version, as I have rolled back to an earlier version i had on my drive and lo and behold ....
Code:
myth mythicalLibrarian # ./mythicalLibrarian.sh "Family Guy" "Da Boom" "/mnt/ntfs/myth/1015_20100201220000.mpg"
./mythicalLibrarian.sh: line 526: /home/mythtv/mythicalLibrarian/dir.tracking: No such file or directory
mv: cannot stat `/home/mythtv/mythicalLibrarian/dir.tracking2': No such file or directory
Accessing MythTV DataBase:
COMMERCIAL DATA START:9649 STOP:14341
COMMERCIAL DATA START:24246 STOP:30292
COMMERCIAL DATA START:42080 STOP:46625
0
RECSTART:2010-02-01 22:00:00 MOVIEYEAR:1999 SERIESDATE:1999-12-26
PROGRAMID:EP002960010012 ShowCategory:Comedy STARS:0 RATING:0
PLOT: Paranoid about Y2K, Peter herds the family into the basement for protection.
TESTING FOR ZAP2IT SERIES ID MATCH:Family Guy
DATABASE IS MAINTAINED. TIME IS:1265094396 NEXT UPDATE IS:1265160381
No direct Zap2it match found. Please update TheTvDb.com
USING FUZZY LOGIC FOR EPISODE RECOGNITION
Family Guy
FUZZY LOGIC SHOW NAME: Family Guy ID: 75978
./mythicalLibrarian.sh: line 425: [: : integer expression expected
./mythicalLibrarian.sh: line 467: [: : integer expression expected
FUZZY Exx NUMBER:35
EPISODE:Da Boom ABSOLUTE NUMBER:35 S02E03
FILE SIZE:584738kB
MOVEDIR FREE SPACE: 89131720kB- WRITABLE:1
ALTMOVEDIR FREE SPACE: 28225008kB- WRITABLE:1
MOVIEDIR FREE SPACE: 28225008kB- WRITABLE:1
ALTMOVIEDIR FREE SPACE: 89131656kB- WRITABLE:1
PLOT: Paranoid about Y2K, Peter herds the family into the basement for protection.
SET TARGET DIR AS: /mnt/ntfs/tv
CREATING LINK IN LINK MODE
myth mythicalLibrarian # ls -la /mnt/ntfs/tv
total 108
drwxrwxrwx 1 root root 4096 2010-02-02 02:01 .
drwxrwxrwx 1 root root 106496 2010-02-01 20:38 ..
drwxrwxrwx 1 root root 0 2010-02-02 02:01 Family Guy
myth mythicalLibrarian # ls -la /mnt/ntfs/tv/Family\ Guy/
total 5
drwxrwxrwx 1 root root 0 2010-02-02 02:01 .
drwxrwxrwx 1 root root 4096 2010-02-02 02:01 ..
lrwxrwxrwx 1 root root 84 2010-02-02 02:01 Family Guy.S02E03 (Da Boom).mpg -> /mnt/ntfs/myth/1015_20100201220000.mpg
-rwxrwxrwx 1 root root 85 2010-02-02 02:01 Family Guy.S02E03 (Da Boom).txt
myth mythicalLibrarian #
granted..the "integer expected error" is still there but as you see..no failsafe activated and it made the files it needed to..the integer expected i imagine may be cause i use mc2xml..i hope
pay no mind to the owner..i ran it as root the first time but im gonna change those permisssions..and they werte fine before I ran it as well
- watson540 - 2010-02-02 10:02
do you even use edl? your edl files dont work nothing comes up on screen efter edl: on the osd
however i read that mtyh:// functionality auto pulls the edl info from the backend.so i tried it..yeah ..edl info on the osd, but it doesnt skip
however.open it using dvdplayer instead of mplayer and it DOES skip commercials. this is under Mythtv though not using the "library" cause thats what your app does and the edl files must be wrong unless someone says its working for them..
i can open the files in the library with either player (the files your script adds to the library) and no edl info at all on the osd
- outleradam - 2010-02-02 14:49
if you would, please e-mail a copy of that file to me. my email is at the top of mythicalLibrarian.sh.
|