Code:
CREATE AND DELETE FLAGS: ORIGINALDIR:0- FREE:95568904kB- WORKINGDIR:0 Free:1819352kB-
MOVEDIR:0- FREE:95568904kB- ALTERNATEMOVEDIR:0- FREE:28225008kB-
PRIMARYMOVIEDIRWRITABLE:0- FREE:95568904kB- ALTERNATEMOVIEDIR:0- FREE:28225008kB-
These lines here tell me that mythicalLibrarian said it was not able to "text">>/dir/arbitraryfile.ext && rm /dir/arbitraryfile.ext
Code:
CREATE AND DELETE FLAGS: ORIGINALDIR:1- FREE:33383328kB- WORKINGDIR:1 Free:33383328kB-
MOVEDIR:1- FREE:663965728kB- ALTERNATEMOVEDIR:1- FREE:33383328kB-
PRIMARYMOVIEDIRWRITABLE:1- FREE:663965728kB- ALTERNATEMOVIEDIR:1- FREE:33383328kB-
This shows that mythicalLibrarian was able to "text">>/dir/arbitraryfile.ext && rm /dir/arbitraryfile.ext && filesize<freespace
i can keep going
tell me what you need
[email protected]
i can also export anything from the database as a .csv if that helps
outleradam Wrote:Code:
CREATE AND DELETE FLAGS: ORIGINALDIR:0- FREE:95568904kB- WORKINGDIR:0 Free:1819352kB-
MOVEDIR:0- FREE:95568904kB- ALTERNATEMOVEDIR:0- FREE:28225008kB-
PRIMARYMOVIEDIRWRITABLE:0- FREE:95568904kB- ALTERNATEMOVIEDIR:0- FREE:28225008kB-
These lines here tell me that mythicalLibrarian said it was not able to "text">>/dir/arbitraryfile.ext && rm /dir/arbitraryfile.ext
Code:
CREATE AND DELETE FLAGS: ORIGINALDIR:1- FREE:33383328kB- WORKINGDIR:1 Free:33383328kB-
MOVEDIR:1- FREE:663965728kB- ALTERNATEMOVEDIR:1- FREE:33383328kB-
PRIMARYMOVIEDIRWRITABLE:1- FREE:663965728kB- ALTERNATEMOVIEDIR:1- FREE:33383328kB-
This shows that mythicalLibrarian was able to "text">>/dir/arbitraryfile.ext && rm /dir/arbitraryfile.ext && filesize<freespace
i dont understand your 2nd example..filesize is not a binary on my box
imagination movers:
mc2x programid: EP010806230002
thetvdb Zap2itid: EP01080623
dora
mc2xprogramid:EP003849750174
thetvdb Zap2itid: SH384975
I'm seeing patterns. I think it could increase episode recognition if I were able to remove leading EP/SH + leading 0's from ALL data received from different sources.
Removing the last 4 digits from mc2x programid would be the way to go for it.
Any idea about shows? Do you have any news shows recorded or one of the 3-4 daily spongebob's on NIK without data? I also need a movie of some sort.
watson540 Wrote:i dont understand your 2nd example..filesize is not a binary on my box
the checks for filesize are as follows:
$1= move filesize, $2 = movedir free space $3 = movedir name
depending on the check, like, originaldir and working dir, reasonable filesize values are set, 1k file size for originaldir 5M file size for workingdir.
Code:
checkpermissions () {
TMoveDirWritable=0
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
}
it's pretty straight forward.
you did change your configuration in the mythicalLibrarian.sh file correct? Did you add quotes?
certain folders will not allow the mythtv user to run scripts. /var/ for example. It's part of linux security. If you mount folders in /home/ you will always be fine.
hrm.. does your filesystem support the rm -f setting?
outleradam Wrote:the checks for filesize are as follows:
$1= move filesize, $2 = movedir free space $3 = movedir name
depending on the check, like, originaldir and working dir, reasonable filesize values are set, 1k file size for originaldir 5M file size for workingdir.
Code:
checkpermissions () {
TMoveDirWritable=0
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
}
it's pretty straight forward.
you did change your configuration in the mythicalLibrarian.sh file correct? Did you add quotes?
certain folders will not allow the mythtv user to run scripts. /var/ for example. It's part of linux security. If you mount folders in /home/ you will always be fine.
hrm.. does your filesystem support the rm -f setting?
yes everything is set right..you may not believe me, but i didnt get these permission errors till i upgraded the script..coincidence..i dunno
you see the proof in the pudding.i showed you free space on every drive and I was able to "touch" a file in each and every folder i have set. i have already proven that what more could you want here? how can it STILL be my fault when ive gone through at least 3 times and made sure the owner was mythtv (where possible.not posssible on ntfs but I still have no problems writing to it)
also set chmod -R 0777 to every freakin folder in use just now and no change
myth
[email protected]Myth ~/mythicalLibrarian $ rm --version
rm (GNU coreutils) 7.4
Copyright © 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Paul Rubin, David MacKenzie, Richard M. Stallman,
and Jim Meyering.
i use rm -rf all the time to remove directories
well, that's the function in question. what is your command line output like?
Code:
[email protected] ~/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
}
[email protected] ~/mythicalLibrarian $ ./check
[email protected] ~/mythicalLibrarian $
Code:
[email protected] ~/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
I can't get past this without an error
$1=2048
$2=2048
$3="/mnt/ntfs/tv"
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)
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 [email protected]@@@@@@@@@@@@
%%%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
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