SageTV Community  

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

Notices

SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github.

Reply
 
Thread Tools Search this Thread Display Modes
  #21  
Old 09-30-2015, 07:00 AM
mikejaner's Avatar
mikejaner mikejaner is offline
Sage Icon
 
Join Date: Oct 2003
Location: Chantilly VA
Posts: 2,087
Send a message via MSN to mikejaner
Quote:
Originally Posted by PLUCKYHD View Post
it does move them to proper folder structure so leaving them in current location wouldn't work but IIRC sagetv metadata for recorded tv is in the file so you can move it and as long as that new directory is in your sage imports to you shouldn't lose it in sage. (someone will correct me if I remember wrongly)
Sounds good, I am looking forward to trying it out!
__________________
Mike Janer
SageTV HD300 Extender X2
Sage Server: AMD X4 620,2048MB RAM,SageTV 7.x ,2X HDHR Primes, 2x HDHomerun(original). 80GB OS Drive, Video Drives: Local 2TB Drive GB RAID5
Reply With Quote
  #22  
Old 09-30-2015, 08:01 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
It was close to being done but then I went on and decided to add a GUI and then a resolution checker (ie when renaming if existing is already there only override if new is high resolution). It's becoming pretty powerful and useful and there is an implementation in there for windows media center recordings although it isn't finished or functioning fully (more metadata to retrieve vs sage just using bmt data). I did this kind of a as a side project for someone else but now that I am starting to migrate back to sagePVR I will use it as well.
Reply With Quote
  #23  
Old 09-30-2015, 12:10 PM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
Quote:
Originally Posted by PLUCKYHD View Post
it does move them to proper folder structure so leaving them in current location wouldn't work but IIRC sagetv metadata for recorded tv is in the file so you can move it and as long as that new directory is in your sage imports to you shouldn't lose it in sage. (someone will correct me if I remember wrongly)
I don't know about the metadata, but the rest is spot on. Sage sees the recordings disappear from the recording directory and removes them from your recordings list. Then, it sees a brand new file in an import directory during its next scan and looks it up, adding it to your imported media list.
__________________
Server: XP, SuperMicro X9SAE-V, i7 3770T, Thermalright Archon SB-E, 32GB Corsair DDR3, 2 x IBM M1015, Corsair HX1000W PSU, CoolerMaster CM Storm Stryker case
Storage: 2 x Addonics 5-in-3 3.5" bays, 1 x Addonics 4-in-1 2.5" bay, 24TB
Client: Windows 7 64-bit, Foxconn G9657MA-8EKRS2H, Core2Duo E6600, Zalman CNPS7500, 2GB Corsair, 320GB, HIS ATI 4650, Antec Fusion
Tuners: 2 x HD-PVR (HTTP tuning), 2 x HDHR, USB-UIRT
Software: SageTV 7
Reply With Quote
  #24  
Old 09-30-2015, 09:07 PM
traker1001 traker1001 is offline
Sage Aficionado
 
Join Date: Jul 2006
Posts: 338
Hello, I would love to see an addon for kodi using sage as a back end. One thing about that is my wife is visually impaired. Kodi has a speech addon that allows for doing about everything in kodi. So Yes while the pvr portion of Kodi needs work its about the only thing out there that is truly usable for a visually impaired person. This is especially true since it isn't possible to make the interface to SageTv accessible.

Now when we had sage running, pre-kodi. We were able to use the web guide with speech to control the recording and playback of many items on the various tuners. However, Kodi actually takes it to a new level. Combo of the two would be awesome.
__________________
Reply With Quote
  #25  
Old 10-01-2015, 05:52 AM
Monedeath Monedeath is offline
Sage Expert
 
Join Date: Sep 2009
Location: Idaho
Posts: 514
Quote:
Originally Posted by PLUCKYHD View Post
it does move them to proper folder structure so leaving them in current location wouldn't work but IIRC sagetv metadata for recorded tv is in the file so you can move it and as long as that new directory is in your sage imports to you shouldn't lose it in sage. (someone will correct me if I remember wrongly)
Now if only there was a way to automate the introduction of new video import directories into SageTV, otherwise the first run of such a utility could turn into quite the exercise for the unwary.

It does mostly works along that line, I think it is going to try to first look for the airing ID that Sage includes in the file name at the time of recording, failing that it will then try to match against season/episode number. I'm not sure at what step it tries to look at metadata within the recording itself, but I guess if someone wanted to dig through the source code, an answer would be found.

IIRC, Sage can do limited matching based on series name and season/episode number, so long it already has that information in its wiz.bin database. I recall seeing that happening in version 7 when I imported some recordings made by an outside source into SageTV, and as some other recordings from that same source for the same Series didn't get matched(episode information not present in either the wiz.bin or EPG data at time of import), and were sent into the videos section instead of recordings I think it is safe to say Sage wasn't pulling any metadata from the videos themselves in that case.

So long story short: if you remove files from a recording directory, and re-import them in another directory before the wiz.bin does a DB cleanup to remove any memory Sage has of the episode in question, you should be safe enough even without any metadata in the recording itself or as auxiliary files(.my or .properties) for other plugins to make use of. At least so long as the files being moved have season and episode numbers known to Sage.
Reply With Quote
  #26  
Old 10-01-2015, 07:37 AM
AtariJeff's Avatar
AtariJeff AtariJeff is offline
Sage Aficionado
 
Join Date: Nov 2005
Location: Ontario, Canada
Posts: 276
Quote:
Originally Posted by PLUCKYHD View Post
it does move them to proper folder structure so leaving them in current location wouldn't work but IIRC sagetv metadata for recorded tv is in the file so you can move it and as long as that new directory is in your sage imports to you shouldn't lose it in sage. (someone will correct me if I remember wrongly)
I was about to start the exact same project. After spending days just trying to find where in the code the recording names are built (remove spaces, etc) I got discouraged and set it aside for now. Can't wait to see it.
Reply With Quote
  #27  
Old 10-01-2015, 08:45 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by AtariJeff View Post
I was about to start the exact same project. After spending days just trying to find where in the code the recording names are built (remove spaces, etc) I got discouraged and set it aside for now. Can't wait to see it.
Pretty sure his renamer is for after sage records the file, it is not a change to the sage core to actually record the file to a new location and name.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #28  
Old 10-01-2015, 08:51 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by Fuzzy View Post
Pretty sure his renamer is for after sage records the file, it is not a change to the sage core to actually record the file to a new location and name.
Correct although the later is doable now that the core is exposed, but to even further extender this mine relies on BMT having the proper metadata needed as well to name (ie season,episode #'s) as the sage ones aren't always correct from the guide.
Reply With Quote
  #29  
Old 10-01-2015, 09:01 AM
AtariJeff's Avatar
AtariJeff AtariJeff is offline
Sage Aficionado
 
Join Date: Nov 2005
Location: Ontario, Canada
Posts: 276
Quote:
Originally Posted by Fuzzy View Post
Pretty sure his renamer is for after sage records the file, it is not a change to the sage core to actually record the file to a new location and name.
That works for me as long as Kodi can recognize the file and grab it's own metadata, etc. I thought it would be more efficient if Sage would initially use a Kodi friendly name to begin with thereby not needing additional processing afterward.
Reply With Quote
  #30  
Old 10-01-2015, 09:40 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
It's been something the community has wanted for a while. An alternative was a program I wrote many years ago that creates a virtual folder structure, names with community styled folders, with hard links to the sagetv recordings. This left the sage recordings untouched, and created a single folder structure that other libraries can be pointed at. It worked, but I never made a proper 'refresh' feature for it, as it was just a proof of concept. I personally, just watch everything with either Sage, or Plex, and using the Plex SageTV importer, I don't need to move or rename anything.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #31  
Old 10-01-2015, 10:57 AM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
Quote:
Originally Posted by Monedeath View Post
Now if only there was a way to automate the introduction of new video import directories into SageTV, otherwise the first run of such a utility could turn into quite the exercise for the unwary.
How so?

(Disclosure: I'm using Plucky's renamer and it works great.)
__________________
Server: XP, SuperMicro X9SAE-V, i7 3770T, Thermalright Archon SB-E, 32GB Corsair DDR3, 2 x IBM M1015, Corsair HX1000W PSU, CoolerMaster CM Storm Stryker case
Storage: 2 x Addonics 5-in-3 3.5" bays, 1 x Addonics 4-in-1 2.5" bay, 24TB
Client: Windows 7 64-bit, Foxconn G9657MA-8EKRS2H, Core2Duo E6600, Zalman CNPS7500, 2GB Corsair, 320GB, HIS ATI 4650, Antec Fusion
Tuners: 2 x HD-PVR (HTTP tuning), 2 x HDHR, USB-UIRT
Software: SageTV 7
Reply With Quote
  #32  
Old 10-01-2015, 11:06 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by Skirge01 View Post
How so?

(Disclosure: I'm using Plucky's renamer and it works great.)
I am sure it could be automated but don't think it needs to be as Skirge says it seems to work fine just moving it to a different import. For the record I do keep a small sql lite database with the metadata info when renaming this is more for undoing changes or renaming further down the line if you don't like the format or need a new one.
So again it could be automated as I keep the important parts (ie episode #,season #,episodename,airingdate,showname,showyear.) but I don't think it's necessary.
Reply With Quote
  #33  
Old 10-01-2015, 11:46 AM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
Quote:
Originally Posted by Monedeath View Post
So long story short: if you remove files from a recording directory, and re-import them in another directory before the wiz.bin does a DB cleanup to remove any memory Sage has of the episode in question, you should be safe enough even without any metadata in the recording itself or as auxiliary files(.my or .properties) for other plugins to make use of. At least so long as the files being moved have season and episode numbers known to Sage.
You don't need to worry about Wizard doing DB maintenance between these operations. A long while back we added a flag to Airing called 'persist'. This flag gets set whenever a recording is made for that Airing. This will then prevent Airings for any recordings ever made from being removed from the database.

Of course that doesn't really matter all that much because now the metadata is also embedded into the recorded file so it can recover it from that too.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #34  
Old 10-01-2015, 11:48 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by Narflex View Post
Of course that doesn't really matter all that much because now the metadata is also embedded into the recorded file so it can recover it from that too.
I knew it was something like that thanks for confirming!
Reply With Quote
  #35  
Old 10-01-2015, 12:03 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by PLUCKYHD View Post
I knew it was something like that thanks for confirming!
Unless it is converted or remuxed...
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #36  
Old 10-01-2015, 12:21 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by Fuzzy View Post
Unless it is converted or remuxed...
nope just renamed
Reply With Quote
  #37  
Old 10-01-2015, 12:35 PM
Monedeath Monedeath is offline
Sage Expert
 
Join Date: Sep 2009
Location: Idaho
Posts: 514
Quote:
Originally Posted by PLUCKYHD View Post
I am sure it could be automated but don't think it needs to be as Skirge says it seems to work fine just moving it to a different import. For the record I do keep a small sql lite database with the metadata info when renaming this is more for undoing changes or renaming further down the line if you don't like the format or need a new one.
So again it could be automated as I keep the important parts (ie episode #,season #,episodename,airingdate,showname,showyear.) but I don't think it's necessary.
So when it reorganizes things into Directory path/SeriesName(year)/Season##/SeriesNameS##E##miscelaneous.ext
format, does it create new directory paths or do you still need to go back into Sage and add them as import paths? I know from past experience that I wasn't able to get Sage to climb directory trees in the past when it comes to video imports so I imagine it doesn't(oddly, it does with pictures though).
Reply With Quote
  #38  
Old 10-01-2015, 12:44 PM
Monedeath Monedeath is offline
Sage Expert
 
Join Date: Sep 2009
Location: Idaho
Posts: 514
Quote:
Originally Posted by PLUCKYHD View Post
nope just renamed
But if it is re-encoded (mpeg2 to h264), and renamed in the same go, Sage is probably going to have a hard time pulling that metadata back out(as it probably was wiped out) leaving only a match in the filename with some uniquely identifying information(either the season##episode##, or the Airing ID) as a means of regaining the association.

Last edited by Monedeath; 10-01-2015 at 12:46 PM.
Reply With Quote
  #39  
Old 10-01-2015, 02:07 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by Monedeath View Post
But if it is re-encoded (mpeg2 to h264), and renamed in the same go, Sage is probably going to have a hard time pulling that metadata back out(as it probably was wiped out) leaving only a match in the filename with some uniquely identifying information(either the season##episode##, or the Airing ID) as a means of regaining the association.
This is how I rename my files using MCEBUDDY which parses the Sagetv XMLs. Notice it keeps the fileid. Also notice it added the year. Also MceBuddy can create folders with title and seasons... distinguish between movies transcode them and move them anywhere you want. You name it does it even refresh your library.

Scandal (2012).S01E03.Hell Hath No Fury -20226974-0.mpg

This is the XML Generated by Sage. If you set the property.
load_at_startup_runnable_classes=net.sf.sageplugins.sagexmlinfo.RecordingXmlGenerator

Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE sageShowInfo PUBLIC "-//NIELM//DTD SAGESHOWINFO XML 1.3//EN" "http://sageplugins.sourceforge.net/nielm_modules/sagexmlinfo/sageshowinfo_1_3.dtd">
<sageShowInfo version="1.3">
    <systemInfo>
        <alertLevel description="Status" level="0"/>
    </systemInfo>
    <channelList>
        <channel channelId="20378">
            <channelName>KGWDT</channelName>
            <channelDescription>KGWDT (KGW-DT) Portland, OR</channelDescription>
            <channelNetwork>NBC Affiliate</channelNetwork>
            <channelNumber>708</channelNumber>
        </channel>
    </channelList>
    <favoriteList>
        <favorite favoriteId="20896909">
            <title>Scandal</title>
            <firstRun/>
            <reRun/>
            <autoDelete/>
        </favorite>
    </favoriteList>
    <showList>
        <show epgId="EP014195350003">
            <title>Scandal</title>
            <episode>Hell Hath No Fury</episode>
            <category>Drama</category>
            <description>The team tries to help a millionaire's son who has been accused of rape; when Olivia takes on Amanda Tanner as a client, her first request is a meeting with the president.</description>
            <peopleList>
                <person role="Actor">Kerry Washington</person>
                <person role="Actor">Henry Ian Cusick</person>
                <person role="Actor">Columbus Short</person>
                <person role="Actor">Guillermo Diaz</person>
                <person role="Actor">Darby Stanchfield</person>
                <person role="Actor">Katie Lowes</person>
                <person role="Actor">Tony Goldwyn</person>
                <person role="Actor">Jeff Perry</person>
                <person role="Guest_Star">JoBeth Williams</person>
                <person role="Guest_Star">Joshua Malina</person>
                <person role="Guest_Star">Bellamy Young</person>
                <person role="Guest_Star">Matt Letscher</person>
                <person role="Guest_Star">Liza Weil</person>
                <person role="Guest_Star">Brendan Hines</person>
                <person role="Guest_Star">Curtis Armstrong</person>
                <person role="Guest_Star">Michael Cassidy</person>
                <person role="Guest_Star">Ellen Woglom</person>
                <person role="Guest_Star">Jerrika Hinton</person>
                <person role="Director">Allison Liddi-Brown</person>
                <person role="Writer">Matt Byrne</person>
                <person role="Executive_Producer">Shonda Rhimes</person>
                <person role="Executive_Producer">Betsy Beers</person>
            </peopleList>
            <language>English</language>
            <originalAirDate>2012-04-20T00:00:00.00Z</originalAirDate>
            <airing channelId="20378" duration="3600" favoriteId="20896909" sageDbId="20226974" startTime="2015-08-23T08:03:00.00Z">
                <parentalRating>TV14</parentalRating>
                <watched/>
                <recordSchedule duration="3600" startTime="2015-08-23T08:03:00.00Z"/>
                <isHDTV/>
                <stereo/>
                <closedCaptioned/>
                <mediafile duration="3598" sageDbId="20406035" startTime="2015-08-23T08:03:01.76Z" type="TV">
                    <segmentList>
                        <segment duration="3598" filePath="\\NYPLAYER\SAGEN\Scandal (2012).S01E03.Hell Hath No Fury -20226974-0.mpg" startTime="2015-08-23T08:03:01.76Z"/>
                    </segmentList>
                </mediafile>
            </airing>
        </show>
    </showList>
    <systemMessageList/>
</sageShowInfo>

Last edited by nyplayer; 10-01-2015 at 02:44 PM.
Reply With Quote
  #40  
Old 10-01-2015, 02:47 PM
Monedeath Monedeath is offline
Sage Expert
 
Join Date: Sep 2009
Location: Idaho
Posts: 514
Quote:
Originally Posted by nyplayer View Post
This is how I rename my files using MCEBUDDY which parses the Sagetv XMLs. Notice it keeps the fileid. Also notice it added the year.
Yeah, files created to retain the metadata outside of the recordings themselves is the other way to pull it off and re-import them that way.

I was discussing options that "stock" Sage will exercise. Also, you retained both the airing ID and Season## + Episode## in the file name as well as the Series Name, Sage could make an association through the wiz.bin so long as that iteration of the wiz.bin file had retained record of it. (And as per Jeff, that should be "forever" for all intents if it was recorded by that server)
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
Help migrating to Kodi (XBMC) cumak General Discussion 40 10-15-2016 06:31 AM


All times are GMT -6. The time now is 05:42 PM.


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