SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - 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: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) (/showthread.php?tid=75949) |
Cannot sysopen file '/.tvdb.db': Permission denied - Xian - 2014-05-29 Hei, I'm using windows 8 and Strawberry Pearl. I end up with similar problem to Scorrsburg. (2012-12-09, 15:41)cliffe Wrote:(2012-12-09, 06:55)Scottsburg Wrote: (2012-12-10, 01:07)Scottsburg Wrote: I debugged 'sorttv.pl' and the script was stopping at line #294 I don't get how to solve it. And I dont understand how to implement Scottsburg solution. Kinda new when it comes to programing, Any help would be much appericiated. Many Thx RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - zapho - 2014-06-09 Hi cliffe, Thanks for a wonderful script - it was exactly what I was looking for! I've only been using the script (version 1.37) a short while and noticed a slight issue which I think is worth reporting. Its not exactly a bug but hopefully this might help you out in the future. I was having trouble trying to match this file with name: "harry_potter_and_the_philosphers_stone" - it would find the right result but fail after "INFO: Comparing ......". I noticed the problem was that the sub "fixtitle" was producing two different results from the $title and $moviename - and the reason was due to all the underscores. Fixtitle won't remove the substrings "and" or "the" from my example filename because the regex you're using is looking for whitespaces on either side of the those substrings. The simple fix was to add the following right before line 1044. $title =~ s/_/ /ig; Anyway, hope this helps. Cheers! RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - mybrain87 - 2014-06-16 What would I need to edit to make sorttv rename tv shows and movies all in lowcase. I want all my files to be lowcase. can somebody help me please? SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - Fox - 2014-06-16 (2014-06-16, 20:32)mybrain87 Wrote: What would I need to edit to make sorttv rename tv shows and movies all in lowcase. I don't think there is such an option right now, but if you feel like editing the code a bit it should be fairly simple. Around row 1819 where you have the if($usedots eq "TRUE") {, I say around because I don't think I have the latest version, if you add $newfilename = lc($newfilename); just above I think that should do the trick, but thats the hard-coded and not so nice version. If you want to make it changeable from the config have a look at the use-dots-instead-of-spaces bool and do something similar. RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - mybrain87 - 2014-06-16 (2014-06-16, 21:01)Fox Wrote:(2014-06-16, 20:32)mybrain87 Wrote: What would I need to edit to make sorttv rename tv shows and movies all in lowcase. That worked great for tvshows. Thank you very much. What do i need to change to make lowcase work for movies? RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - Fox - 2014-06-16 (2014-06-16, 21:14)mybrain87 Wrote: That worked great for tvshows. Thank you very much. Oh thought that would fix it for both, but then maybe you could change it in the cleanup_filename function instead. If you add $title = lc($title); at the end of the function (but before the return) it should clean it up for both. RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - mybrain87 - 2014-06-16 (2014-06-16, 21:53)Fox Wrote:(2014-06-16, 21:14)mybrain87 Wrote: That worked great for tvshows. Thank you very much. Thanks that did it DBM::Deep cannot write to a readonly filehandle - mrbrookz - 2014-07-17 Hi! The script works well, thank you so much for this. I have encountered a problem and I'm not quite sure as to how I could go about resolving it: I have installed the modules with cpan as explained in the tread and the readme. I installed the modules using the "sudo" option rather than "local:lib" as I wanted other users to be able to access them too in case they would want to run the script. Here is the problem I encounter: When I run the script as a user Code: perl ./sorttv.pl Code: DBM::Deep: Cannot write to a readonly filehandle at /usr/local/lib/perl5/site_perl/5.20.0/TVDB/API.pm line 458 Code: sudo perl ./sorttv.pl Is this caused by installation of modules with cpan using the "sudo" option? If so, should I reinstall them with cpan and the local:lib option? I did have to force install the module "File::Glob". The other problem I encounter is when running the other line of code recommended in the readme: Code: perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::SAX::Expat))->save_parsers()" Code: Can't locate XML/Parser.pm in @INC (you may need to install the XML::Parser module) (@INC contains: /usr/local/lib/perl5/site_perl/5.20.0/x86_64-linux /usr/local/lib/perl5/site_perl/5.20.0 /usr/local/lib/perl5/5.20.0/x86_64-linux /usr/local/lib/perl5/5.20.0 .) at /usr/local/lib/perl5/site_perl/5.20.0/XML/SAX/Expat.pm line 11. Do I need to install other modules? Not sure this is essential since the script seems to run fine without it. In case this is important, I am running this on ubuntu 12.04. Any help is highly appreciated. EDIT: I think I may not have had the right permissions on the script or contents in its folder. Code: sudo chmod -R user:user /opt/sorttv/ Cron error - mrbrookz - 2014-07-21 I have been testing this script with cron, and using the README instructions I have: Code: 0 * * * * nice perl /opt/sorttv/sorttv.pl But I get the error message: Code: Can't locate WWW/TheMovieDB.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl +.) at /opt/sorttv/sorttv.pl line 58. I have installed all the modules, when running cpan .... all required modules are installed successfully and are up to date. The script works fine when run from a user in the terminal. I have entered the information using "crontab -e" under the same user account. Not sure if this is a permissions problem? RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - etnstyles - 2014-08-09 Hi I am sortTV installed and i have the below perl cpan modules installed. #instmodsh Available commands are: l - List all installed modules m <module> - Select a module q - Quit the program cmd? l Installed modules are: Algorithm:iff DBM:eep Debug::Simple Encode::Locale File::Copy::Recursive File::Glob::Windows File::Listing HTML:arser HTML::Tagset HTTP::Cookies HTTP:aemon HTTP:ate HTTP::Message HTTP::Negotiate IO::HTML LWP LWP::MediaTypes Module::Build Net::HTTP Perl Spiffy Sub::Uplevel Switch Test::Base Test:eep Test::Exception Test::NoWarnings Test::Tester Test::Warn Text:iff URI WWW::RobotRules WWW::TheMovieDB::Search XML::NamespaceSupport XML::SAX XML::SAX::Base The sortTV sorts tv episodes fine when I run: perl5.14.2 sorttv.pl --directory-to-sort:/home/me/Desktop/videos/unsorted-tv/ --directory-to-sort-into:/media/tv However when I run the command on a movie folder I get the following output. perl5.14.2 sorttv.pl --directory-to-sort:/home/me/Desktop/videos/unsorted-film/ --directory-to-sort-into:/media/film (Also lots of html and looks like it is from the sorttv sourceforge website and then below). SKIP: Matches ignore list: sample.avi WARN: Failed to get WWW YIFY series information on the tvdb.com. WARN: Failed to get WWW YIFY series information on the tvdb.com. I have removed all the weird titles and but I am really unsure what to do next - looking at the sorttv.log just outputs the same. Sorting: From /home/me/Desktop/videos/unsorted-film/ TV episodes into /media/film/ 2:28:26, 10-7-2014 SKIP: Matches ignore list: sample.avi WARN: Failed to get WWW YIFY series information on the tvdb.com. WARN: Failed to get WWW YIFY series information on the tvdb.com. Any ideas would be great thanks. RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - npkamen - 2014-08-17 When attempting to run the script on Mac OS 10.9 I get the following error each time: Quote:SKIP: File /Users/nick/Movies/Kids Shows/Baby Einstein/Season 1/Baby Einstein - S01E06 - Numbers Nursery.m4v already exists, skipping. It just seems to time out. Any way to get more information on what is timing out? Ran sorttv.pl again with verbose output turned on and get a little bit more information. It seems that the TVDB module is failing. Quote:INFO: Failed to get season 2 details: Could not find sorttv.xml in ./ at /Library/Perl/5.16/TVDB/API.pm line 260. Upgrading my CPAN modules now so we'll see if that fixes the issue. Fingers crossed. Man this update takes quite a long time though RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - Ballistic - 2014-08-21 Sorttv on Freebsd10-RELEASE does not require any other installation steps anymore. The default step (same as Linux) is enough. RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - fliberdygibits - 2014-08-24 -deleted- RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - true_blue - 2014-09-01 Hi - new here! The modules didn't install for me so I have manually installed the moviedb module and now I can't install the JSON:arse module. It says: Code: dll.exp: file not recognized: File format not recognized EDIT: I am trying active perl now to see if that helps.. but I have noticed that in both strawberry and active perl, I am getting an error about "configure.com not being compatible with windows 64bit" while installing the File::Glob module. EDIT2: Still no luck.. saying TVDB::API is not installed now.. have installed ALL modules with the force command. Also still getting "dmake.exe -- NOT OK" error on a few other modules like TVDB::API EDIT3: Solved this by uninstalling my anti-virus program, then I reinstalled it when the modules were installed. PITA. Works fine but a tip to all.. make sure you go through the configs before you use it, because once it starts renaming stuff there is no way back. I rushed in and now my movies don't show whether they are SD or HD as the [QUALITY] switch is disabled by default.. Bit of a bummer and will have to edit them all manually now!! Oh well.. this tool is still amazing and I will be donating this month. Cheers! Cheers RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc - simonind - 2014-10-05 Many thanks for the addition of [RATING], I can now automatically segregate movies the kids can watch from those for 'grown-ups' automatically. Cheers |