Kodi Community Forum

Full Version: mythicalLibrarian - a tool to build Movie and TV Show library from MythTV recordings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
^^Fixed.

SVN rev 481 to stable.

no more problems? Any features required?
No other problems here, working like a charm. But I am still on Karmic / MythTV 0.22 / XBMC Camelot, so when I upgrade all three I will likely break something...

/gkk
GregoryK Wrote:No other problems here, working like a charm. But I am still on Karmic / MythTV 0.22 / XBMC Camelot, so when I upgrade all three I will likely break something...

/gkk

I'm running next versions of all three with no problems what so ever.
I generally like to run and code on pre-release versions so you should be fine running current releases.

Let me know if there are any issues.
Firstly, thanks for creating such a great script - it has made things a lot easier for me to get shows into XBMC. I have had problems with tv shows which have an '&' in the tile.

"Law & Order: Special Victims Unit" was being saved as "Law & Order: Special Victims Unit" and "Brothers & Sisters" was being incorrectly matched against "Brothers And Sisters (1979)".

The SVU issue I traced back to the '&' character not being properly
escaped in the SED commands which are supposed to replace '&' with '&'. They currently look like this:

sed s/"&"/"&"/g


but should actually look like this:

sed s/"&"/"\&"/g


The Brothers & Sisters issue related to "&" character not being replaced
with "%26" in the tvdb search url. The result was that TheTVDB was searching for series containing the words "Brothers" and "Sisters", rather than searching for a series with the phrase "Brothers & Sisters". I fixed it by making the following
change:

tvdbshowname=`echo $ShowName | sed s/" "/"%20"/g |sed s/"&"/"%26"/g`

mythicalLibrarian now correctly finds and names both shows.

Could you please make the above changes to the SVN so that I can continue to use the upgrade function?.

Another tweak I have made to my install is to change the permissions of files to allow read/write access to members of the mythtv group. This is because I still need to rename some of the files, but at the moment I need to mess around with either root access or running as the mythtv user in order to rename files (or move files around in directories created by mythicalLibrarian). Can you consider giving 'group' read/write access by default going forward?

Cheers.
Both suggested changes were made, totaling 4 lines. I have not tested them yet.
http://code.google.com/p/mythicallibrari...tail?r=482 . Please run mythicalLibrarian --update and make sure they are solid so that I can commit SVN 482 to stable.

What do you mean giving group read/write access by default? I don't understand the circumstances? I will make any changes as long as they do not eliminate any other functions.
Now that I think about it... I may have left a hole when I was doing POSIX compliance for OS X in mythicalSetup. OSX did not support chown user:group /path/file, only chown user /path/file. Are your groups still read to root?
outleradam Wrote:Now that I think about it... I may have left a hole when I was doing POSIX compliance for OS X in mythicalSetup. OSX did not support chown user:group /path/file, only chown user /path/file. Are your groups still read to root?

Hmm, sorry don't know what you mean by "Are your groups still read to root?".

If it helps at all, I got around it by adding in the following custom user job in the script:

chmod g=rw "$MoveDir/$ShowFileName.$originalext"

Will my user job be preserved in an upgrade?

Regarding the changes you made, there are still some more seds to fix, in the following guise:
sed s/'&'/'&'/g

(lines 853, 856, 1589, 1590)
I will hit those tonight.

I'm still not understanding the permissions portion. Ive never had an issue with that. I added xbmc to the mythtv group. The permissions for mythtv recordings are set by mythtv. I never had an issue with access to the files.

How did you set up mythtv? Mine was set up through the default Ubuntu package manager.

What I was talking about was a mythicalSetup problem. When mythicalSetup creates new folders it creates them as root and then chowns them to the sudo user. It does not change the group of the folder or file.
outleradam Wrote:I will hit those tonight.

I'm still not understanding the permissions portion. Ive never had an issue with that. I added xbmc to the mythtv group. The permissions for mythtv recordings are set by mythtv. I never had an issue with access to the files.

How did you set up mythtv? Mine was set up through the default Ubuntu package manager.

What I was talking about was a mythicalSetup problem. When mythicalSetup creates new folders it creates them as root and then chowns them to the sudo user. It does not change the group of the folder or file.

I installed via the ubuntu package manager. In my setup (not sure whether this is unique) new folders and files created by the script have the following privelidges 'rwx r-- r--' (the owner being mythtv). Because of that my user account couldn't rename or delete recording files. I am not sure if it only happened with files placed in folders created by the script. I have since chmod'd all of the relevant files & directories.

Maybe it's just my setup - I'll live with it for the mean time.
For the intial scan, you should run it as user mythtv.
Code:
sudo su mythtv
mythicalLibrarian --scan mpg /path/to/files
From then on, mythtv should be in control of the user jobs. I will add your userjob workaround to the FAQ Wiki. It should help people who want to delete files from within XBMC when they have SYMLINK=Disabled set.

I never noticed the problem. I let mythtv autoexpire when it needs space. I have autoexpirefreespace in mythweb set to 20 (gigs of free space). When it sees less then 20 gigs, it expires recordings until it frees up enough space.


I know I said I would take care of the issues today, but it is my birthday and I am relaxing. I will hit them tomorrow.
SVN REV 483= if symlinking mode is Disabled, then set the group permissions chmod g=rw "$MoveDir/$ShowFileName.$originalext"
Fixed Star rating on shows, Fixed & errors, fixed a few others. Thanks
Let me know if there are any other problems.
My only connect to my mythtv system is rsync downloads
Can I use it, I currently using Mythsexx, and mythlink?