![]() |
MythSExx - A MythTV renamer tool for XBMC - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116) +--- Thread: MythSExx - A MythTV renamer tool for XBMC (/showthread.php?tid=63510) |
MythSExx - A MythTV renamer tool for XBMC - outleradam - 2009-12-07 MythSExx a versitile library exportation tool for MythTV --------------------------------------------------------------------------------------------- edit: Before you try MythSExx, try out mythicalLibrarian it's a much better tool. MythSExx is a Ubuntu tool which will import your MythTV library into XBMC format. It is a versitile tool with very good logging. It will reference theTvDb.com and obtain the Series and Episode information so that your files can be imported into XBMC I am striving to make this the best Myth interface tool available for XBMC library recognition. I am eagerly awaiting problem reports. I define problem reports as "Anything which you as the user determine to be abnormal operation" Key features: --------------------------
Code: /home/mythtv/MythSExx/MythSExx.sh "%TITLE%" "%SUBTITLE%" "%DIR%/%FILE%" ----------------------- MYthSExx will generate usable content for XBMC out of your MythTV recorded libraries by utilizing the standard Showname.SxxExx (Episode Title).ext format. It can be configured in the following ways
in progress: ------------------------
You can find full documentation here: http://wiki.xbmc.org/?title=MythSExx - Anaerin - 2009-12-07 Out of curiosity, why would anyone use this over and above the existing mythrename.pl script that is included with MythTV? Place it in a cron job (or as a user job if you wish), and it will rename, or make hard links, in pretty much any format you like. I have a cron job that I use that does this all for me - it looks like this: Code: #!/bin/bash - robweber - 2009-12-07 Anaerin Wrote:Out of curiosity, why would anyone use this over and above the existing mythrename.pl script that is included with MythTV? Place it in a cron job (or as a user job if you wish), and it will rename, or make hard links, in pretty much any format you like. It's been a while since I've looked at mythrename.pl (kind of forgot it existed), but does it create links rather than copy the entire file so that you can leave the default in the regular myth directory? - Anaerin - 2009-12-08 robweber Wrote:It's been a while since I've looked at mythrename.pl (kind of forgot it existed), but does it create links rather than copy the entire file so that you can leave the default in the regular myth directory? It has the option to do both. If you pass in the "--link" parameter (as I do above), it does indeed create hard links, if you leave it out, it moves the files (and updates the database to reflect their new location, so Myth still knows how to get to the files). - outleradam - 2009-12-08 Anaerin Wrote:Out of curiosity, why would anyone use this over and above the existing mythrename.pl script that is included with MythTV? Place it in a cron job (or as a user job if you wish), and it will rename, or make hard links, in pretty much any format you like. This tool will reference TheTvDb.com to obtain the Season and Episode information so the file can be imported into the XBMC library. Without Season and Episode, XBMC is clueless. Another bonus is proper naming of all shows. Sometimes your cable guide will have errors and they can be corrected with MythSExx. - pinthenet - 2009-12-10 well done outleradam! this is just what I wanted, and as you say it offers much more than the mythrename script when using XBMC. I'd started a similar solution using perl & the TVDB::API module, but wasn't so far. I've processed a few recordings manually using BashSExx with no problems (after fixing a couple of typos). Next step is to run it as a post-recording job. A question - on Sourceforge there are several files with the same name/size/date, & I see that there's also a copy on the XBMC Wiki referred to as MythSExx- which is the right one? I only noticed the MythSExx version this morning I downloaded one of the sourceforge files and there were 2 syntax errors (missing ] on an if, and missing $ on a variable reference) but it worked after I'd fixed them Thanks John - outleradam - 2009-12-10 Thank you for pointing that out John. I will be closing the sourceforge version soon and BashSExx will be superceeded by MythSExx. Please keep in mind that this is also my first bash program. It is still in development and will not be complete until all avenues are traveled thoroughly. The name change denotes the compatability introduced by utiliziation of SymLinks. I'm very glad this progam could help someone. Please, let me know if there are any other problems with this program. I will go ahead and fix those errors you mentioned - prupert - 2009-12-10 Ahh, now if only you had posted this about a month ago ![]() I was looking for a script like this, to take stuff from mythTV and put it into XBMC, so I ended up doing it myself, it is no where near as cool as your though, but I thought I'd share it with you in case it uses something you like (its called mythtvremodel (REnameMOveDELete)): Code: #! /bin/sh As you can see, it is SO basic, it basically calls mythrename to create nice names for the recorded files (renaming the actual files, not links), then it moves all the recordings (based on file extension) to a special folder. Then it deletes the references to these files in the mythtv database using myth_find_orphans. The cool thing is, that I put in under /etc/rc0.d, so it runs as the machine is shutting down. I can't remember why I did it this way, rather than as a job that mythtv runs at the end of the recording. Oh yeah, I remember, I didn't want it to be run as a job if two programs were recording one after the other, since it would end up moving the currently recording file, which would be BAD. I guess I did that because of my mega hacky way of moving the file in the first place ![]() Anyway, thought I would share it with you in case it is of interest. I guess it probably isn't, since I wrote it for my very specific case: -mythtv box only used to record TV, it doesn't do anything else (probably a waste, but I found it so hard to get mythtv up and running in conjunction with mythwelcome so it starts up and shuts down automatically that I didn't want to risk messing up the set up), -all recordings moved to a shared drive on my ubuntu server (not the mythtv box) where they are transcoded by an ffmpeg script and analysed using comskip into an MKV file with chapters as commercial markers, -I manually use ember media manager to ID each recording and move them to the necessary folder on my a special Video drive, -when I turn on the XBMC box, it uses rsync to mirror the Video drive to its own local drive and then XBMC updates its library based on those new files (that way I have a back-up of all my media on the XBMC box). Kinda a crazy way of doing it all I know, but it was great fun learning how to get it all running. Anyway, use and abuse if you feel so inclined, though clearly yours is WAY better than mine... - outleradam - 2009-12-10 ^^ I started this project almost a month ago because I could not find anything which would do the job. - outleradam - 2009-12-11 Comming Soon:
- outleradam - 2009-12-12 Features added in latest release:
Comming soon:
- outleradam - 2009-12-12 As of this release, I would like to start receiving bug reports. Please cut-n-paste a MythSExx output.log debug log here if you have problems. - outleradam - 2009-12-13 There is currently a problem with free space handling on multiple drives. A 0 length file will be created even if the file is not moved. I am working to correct this problem so that the job can just be rerun. Origininal files are not affected, however, the alternate move dir is not currently functional. This problem will be corrected today. - outleradam - 2009-12-14 problem corrected. Move only moves to Alternate Dir - jaygardner - 2009-12-14 Hi- below is output from debug enabled log... my setup was to move to a 2nd directory on the same drive as my myth recordings... which is a 2nd drive in the myth backend... /media/datadrive/tv-recordings is the normal myth recording directory, and my movedir in your script is set to be /media/datadrive/TVShows but when executed from myth or mythweb, the script only moves the files to my alternate directory - /jay/home/Shared However, if I run the script interactively from my login account, jay, it works fine. I downloaded the script on Saturday pm or Sunday am - before your updated version from last night... output log: Code: @@@@@@@@@@NEW SEARCH INITIATED AT Mon Dec 14 07:28:14 MST 2009@@@@@@@@@@@@@ -thanks, jay |