SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #101  
Old 09-08-2015, 05:00 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by SWKerr View Post
Answered my own question! Just needed to post before I could solve it.
(') single quote is bad! Needed "

c:
cd \Data\PhoenixTools
phoenix-renamer --tvMask "${MediaTitle}/${MediaTitle} - S${SeasonNumber:%02d}E${EpisodeNumber:%02d} - ${EpisodeName}" --tvOutDir "G:\Temp\TV" G:\Temp
And I assume that using the directory separator / in the mask worked to move create directory? (I thought I added that ability)
Reply With Quote
  #102  
Old 12-22-2015, 11:15 AM
nateziemann nateziemann is offline
Sage User
 
Join Date: Jun 2010
Location: MN
Posts: 70
Using with comskip

What is the best way to use this tool with recordings while accommodating for a delay? Specifically for two reasons. (1) to allow comskip to finish and close it's files & (2) allow auto conversion to complete (I convert all the .ts kids shows to low res mp4 for tablets). At that point, run renamer on the new recording and all associated files. Is there a way to force a 20 minute delay before processing all the files? If anyone has examples for reuse that would be great.

Also, when sagetv picks up the renamed files, is there a way to force sage to import as recording? So 'keep at most' and other favorite settings are retained.
Reply With Quote
  #103  
Old 12-23-2015, 04:41 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by nateziemann View Post
What is the best way to use this tool with recordings while accommodating for a delay? Specifically for two reasons. (1) to allow comskip to finish and close it's files & (2) allow auto conversion to complete (I convert all the .ts kids shows to low res mp4 for tablets). At that point, run renamer on the new recording and all associated files. Is there a way to force a 20 minute delay before processing all the files? If anyone has examples for reuse that would be great.

Also, when sagetv picks up the renamed files, is there a way to force sage to import as recording? So 'keep at most' and other favorite settings are retained.
I use the renamer with --watchDir which basically starts the renamer where it watches a directory for changes (ie new files), and then after --watchSeconds of idle time, it will do the rename.

The renamer can detect when a file being written to and so it uses --watchSeconds is used to only rename the file after --watchSeconds of idle time. I guess you could use --watchSeconds 1200. This would wait 20 minutes (60 seconds * 20 minutes = 1200 seconds) after the last time it noticed a change to the file before attempting to rename it.

You can see the full documentation here
https://github.com/stuckless/phoenix-renamer
Reply With Quote
  #104  
Old 12-23-2015, 01:44 PM
riemers riemers is offline
Sage User
 
Join Date: Dec 2015
Location: Netherlands
Posts: 7
So i was trying out your tool, since i was setting up automation.

Sadly i am stuck at the renaming part. It errors out by saying:

DEBUG - Processing sagex.phoenix.vfs.impl.FileMediaFile [Id: \var\plex\media\incoming\the movie title\h0nZ340IRYQ2VGDBrKGi.mkv, Title: h0nZ340IRYQ2VGDBrKGi.mkv]
IMDB getting URL:http://www.imdb.com/find?s=tt&mx=200&q=the movie title
DEBUG - Attempting to use folder name as the file name for h0nZ340IRYQ2VGDBrKGi.mkv
search cache hit
WARN - Cannot rename h0nZ340IRYQ2VGDBrKGi.mkv

So the "the movie title" can be found on imdb if i do it manually, 1 hit so that is good.

Just keeps complaining, i checked the posts and its on the same file system (linux) tried it from within the folder and outside the folder too. Also seperated and used the movie output option too but no luck. Then also checked permissions to the point i just ran it as root, but still no luck.

What am i missing here?

p.s. besides that little problem, i think it would be a great tool.
Reply With Quote
  #105  
Old 01-01-2016, 06:57 PM
riemers riemers is offline
Sage User
 
Join Date: Dec 2015
Location: Netherlands
Posts: 7
Ok, so for some reason it seems to pick it up now. Don't know why but its good still errors but then still does the job.

Next issue is that i try and execute a script after the rename is done. The script is run only the directory name is still the "old" name and not the new one. I used the parent folder name in the script, so it renames the parent folder to the correct movie but this is not the folder/filename.ext it sends to the script.

Basicly i have no automation to get the new directory name, since i want to move it after its finished. I can do * , but ofcourse you would only want to do it on a correct renaming.

Example:

INFO - Renamed parent's directory to Newmovie (2016)
INFO - Executing Command '/var/plex/media/PhoenixTools/move-films "/var/plex/media/films_incoming/NEWMOVIE (2016)/Newmovie (2016).mkv"'

So i think only the filename is correctly pased on, but not the dir. Any help would be appreciated
Reply With Quote
  #106  
Old 01-02-2016, 02:24 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
A couple things...
1. I don't use movie folders, so, it's likely you found a bug. I did review the code, and I think that when you rename the folder, it holds the original filename, and I need to reparent that reference before I send it into the script. (I'll look into that)
2. "Renamed Failed" will happen for any number of reasons, pemissions, network, etc. But a logfile is written to the phoenix-renamer.log file (somewhere under in the installation directory). I would check that log file and see what the actual error is.
Reply With Quote
  #107  
Old 01-03-2016, 01:51 PM
riemers riemers is offline
Sage User
 
Join Date: Dec 2015
Location: Netherlands
Posts: 7
I think the same issue happens with the rename action too. Since it moved the parent, for some reason it wants to rename it again which fails.

See complete output logs of a movie rename action error: http://pastebin.com/CAepgE5p
Reply With Quote
  #108  
Old 01-04-2016, 10:57 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by riemers View Post
I think the same issue happens with the rename action too. Since it moved the parent, for some reason it wants to rename it again which fails.

See complete output logs of a movie rename action error: http://pastebin.com/CAepgE5p
I did end up checking the code, and there is a bug in there related to renaming the parent folder. ie, I get a reference to the original file, and then rename the folder, but, the original file path, will holds the previous structure. I'll see about getting a fix this.
Reply With Quote
  #109  
Old 01-05-2016, 12:17 PM
riemers riemers is offline
Sage User
 
Join Date: Dec 2015
Location: Netherlands
Posts: 7
Thanks for the support
Reply With Quote
  #110  
Old 01-23-2016, 02:11 PM
riemers riemers is offline
Sage User
 
Join Date: Dec 2015
Location: Netherlands
Posts: 7
Anything i can do to help out? I am not that good in java though..
Reply With Quote
  #111  
Old 01-23-2016, 03:25 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by riemers View Post
Anything i can do to help out? I am not that good in java though..
Sorry I haven't gotten to this yet... My time has been spent on other projects I don't have an ETA on this.
Reply With Quote
  #112  
Old 01-24-2016, 07:54 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
I managed to find some time to work on this. I "think" this build will fix your rename issue.

https://bintray.com/stuckless/sagetv...er/1.0.11/view
Reply With Quote
  #113  
Old 01-25-2016, 02:12 PM
riemers riemers is offline
Sage User
 
Join Date: Dec 2015
Location: Netherlands
Posts: 7
Looks a lot better, i think its almost there now:

INFO - Phoenix Standalone is online and ready for commands
INFO - Renaming Promo film.mp4 to Strange Days (1995).mp4
INFO - Renamed /var/plex/media/films_incoming/Strange Days (1995)/Promo film.mp4 to /var/plex/media/films_incoming/Strange Days (1995)/Strange Days (1995).mp4
INFO - Executing Command '/var/plex/media/PhoenixTools/move-films "/var/plex/media/films_incoming/Strange Days (1995)/Strange Days (1995).mp4"'
OUTPUT>/var/plex/media/films_incoming/Strange Days (1995)
INFO - Renaming mNnrDjezpvG2mJu9fIto.mkv to Strange Days (1995).mkv
WARN - Cannot rename mNnrDjezpvG2mJu9fIto.mkv

So as you can see the executed command is the correct name (i use a bash script that just takes the folder so it moves it to a correct place) but what you also see is that after the first file it will execute the command, but it still had to do the other file too. So i have a feeling it will just run the execution the moment it renames the first file. (i could just remove .mp4 files, since i usually don't get those) But perhaps its easy to check for you to see if that is the issue. Thanks for the work again, this already saves a lot of work.
Reply With Quote
  #114  
Old 01-25-2016, 03:07 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by riemers View Post
Looks a lot better, i think its almost there now:

INFO - Phoenix Standalone is online and ready for commands
INFO - Renaming Promo film.mp4 to Strange Days (1995).mp4
INFO - Renamed /var/plex/media/films_incoming/Strange Days (1995)/Promo film.mp4 to /var/plex/media/films_incoming/Strange Days (1995)/Strange Days (1995).mp4
INFO - Executing Command '/var/plex/media/PhoenixTools/move-films "/var/plex/media/films_incoming/Strange Days (1995)/Strange Days (1995).mp4"'
OUTPUT>/var/plex/media/films_incoming/Strange Days (1995)
INFO - Renaming mNnrDjezpvG2mJu9fIto.mkv to Strange Days (1995).mkv
WARN - Cannot rename mNnrDjezpvG2mJu9fIto.mkv

So as you can see the executed command is the correct name (i use a bash script that just takes the folder so it moves it to a correct place) but what you also see is that after the first file it will execute the command, but it still had to do the other file too. So i have a feeling it will just run the execution the moment it renames the first file. (i could just remove .mp4 files, since i usually don't get those) But perhaps its easy to check for you to see if that is the issue. Thanks for the work again, this already saves a lot of work.
I'm not sure this is even a bug... since it's not something that is intended from the renamer point of view.

ie, you appear to have a 2 videos in a folder and you are trying to rename both videos and then rename the folder, which I can say is not something the renamer would handle very well, nor was it intended to do so.

The basic premise of renaming the parent folder is that you have a single video in the folder (and possible artifacts like, subtitles), but not that you'd multiple video files.

It doesn't make sense to me to have 2 videos in a folder that going to end up with the same name... and then rename the parent folder.

The other bug, was a bug, and as such, I felt it needed to be fixed. This is more an enhancement of how the renamer fundamentally works, and a such, It's not something that I have to time to rework all that logic.
Reply With Quote
  #115  
Old 01-27-2016, 02:42 PM
riemers riemers is offline
Sage User
 
Join Date: Dec 2015
Location: Netherlands
Posts: 7
In my particular case, mp4 was a trailer or advertising. So i now just wipe *.mp4 before handling the download. And indeed, i normally only have 1 movie in there. So far its now going good. So now its all automated.

So in my current setup, you have a download, you get a nzb, the filename of the nzb at least resembles some way of the movie name. It downloads it, triggers the renamer now and then moves it, only if it can find a match. Then it auto gets picked up by the media manager and its all done. i use the "Exec" option to move the folder into the correct section, so in sabnzbd i have categories so i can "channel" into what folder it goes (like kids/normal/3d as example)

Maybe i'll write a mini howto, because usually people used couchpotato to do this, but that is a lot of overhead. Especially if you your native language isn't english (since then the whole couchpotate concept doesn't work if you do not have the subs)

Anyways, a happy person \o/
Reply With Quote
  #116  
Old 01-27-2016, 03:01 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by riemers View Post
In my particular case, mp4 was a trailer or advertising. So i now just wipe *.mp4 before handling the download. And indeed, i normally only have 1 movie in there. So far its now going good. So now its all automated.

So in my current setup, you have a download, you get a nzb, the filename of the nzb at least resembles some way of the movie name. It downloads it, triggers the renamer now and then moves it, only if it can find a match. Then it auto gets picked up by the media manager and its all done. i use the "Exec" option to move the folder into the correct section, so in sabnzbd i have categories so i can "channel" into what folder it goes (like kids/normal/3d as example)

Maybe i'll write a mini howto, because usually people used couchpotato to do this, but that is a lot of overhead. Especially if you your native language isn't english (since then the whole couchpotate concept doesn't work if you do not have the subs)

Anyways, a happy person \o/
Glad it's working.... I don't mind if you enter a defect/enhancement on the github issue site for this project to request the behaviour to support multiple videos... just won't happen very quickly
Reply With Quote
  #117  
Old 04-27-2017, 10:42 AM
BobGod8 BobGod8 is offline
New Member
 
Join Date: Apr 2017
Posts: 1
Phoenix Renamer bugs

I think I've found 3 bugs in how the Phoenix Renamer handles filename/metadata names. I'm lumping them into 3 categories, anyway. Raw pastes here: https://pastebin.com/WnLuqa19

1. Capitals/punctuation, where my tests are iZombie, Law and Order SVU, and Marvel's Agents of S.H.I.E.l.D. The renamer splits capitals (iZombe to I+Zombie, SVU to S+V+U, etc). With the periods in SHIELD it might make sense, but it doesn't especially for iZombie.

2. Dropping years. It seems to search twice, once with the year and once without, and then ignore the first search...

3. No idea what's going on, but issue with small word, where test case is Once.Upon.a.Time. It gets Once+Upon.a.+Time which is just weird.

I'd take workarounds instead, like hardcoding, but these seem like internal parsing errors.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Phoenix Error after deleting Phoenix UI wayner Phoenix 9 01-03-2012 11:08 PM
Is this possible in Phoenix? Kirby Phoenix 0 10-22-2011 10:20 AM
Phoenix Source (and how to rebuild Phoenix from sources) stuckless Phoenix 2 09-22-2011 10:26 PM
Phoenix API stuckless SageTV Customizations 264 03-17-2011 11:36 AM


All times are GMT -6. The time now is 12:56 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.